diff --git a/.github/workflows/hero_build.yml b/.github/workflows/hero_build.yml index 1e097780..9a07960b 100644 --- a/.github/workflows/hero_build.yml +++ b/.github/workflows/hero_build.yml @@ -16,10 +16,10 @@ jobs: matrix: include: - target: x86_64-unknown-linux-musl - os: ubuntu-latest + os: alpine-latest short-name: linux-i64 - target: aarch64-unknown-linux-musl - os: ubuntu-latest + os: alpine-latest short-name: linux-arm64 arch: arm64 - target: aarch64-apple-darwin @@ -29,7 +29,7 @@ jobs: # os: macos-13 # short-name: macos-i64 runs-on: ${{ matrix.os }} - + steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -38,11 +38,16 @@ jobs: - uses: maxim-lobanov/setup-xcode@v1 if: runner.os == 'macOS' with: - xcode-version: latest-stable + xcode-version: latest-stable - name: Check out repository code uses: actions/checkout@v4 + # - name: Setup dependencies on Alpine + # if: runner.os == 'Linux' + # run: | + # sudo apk add --no-cache gcc musl-dev openssl-dev openssl-libs-static + - name: Setup V & Herolib id: setup run: | @@ -59,12 +64,16 @@ jobs: timeout-minutes: 15 run: | set -e - v -w -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }} + if [ "${{ runner.os }}" = "Linux" ]; then + v -w -d use_openssl -enable-globals -cflags -cc gcc -static cli/hero.v -o cli/hero-${{ matrix.target }} + else + v -w -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }} + fi - name: Upload uses: actions/upload-artifact@v4 with: name: hero-${{ matrix.target }} - path: cli/hero-${{ matrix.target }} + path: cli/hero-${{ matrix.target }} release_hero: needs: build