From 6dcd1bf99f4b715bf78156af8bac91a0c546914f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20S=C3=A1ren=C3=ADk?= Date: Sat, 20 Jun 2026 09:24:29 +0200 Subject: [PATCH] Add GitHub Actions workflow for build&release From Google AI build aarch64 rust binary from git repository ... Is there any freely available 3rd party service (like gitpod.com in the past) that would produce the final binary for me?https://github.com/jsarenik/hal I'll be happy to add anything needed to the repository to make GitHub do it. Help me please. Update AArch64 build workflow for version tagging Yes. To Releases please Update workflow for static AArch64 binary build Make the binary statically built for musl-aarch64 please. Update GitHub Actions workflow for ARM64 build Added a step to patch the jobserver dependency for compatibility and modified the build command to allow for the updated patch. Update actions/checkout from v4 to v5 Upgrade action-gh-release from v2 to v3 Release a few resulting binaries --- .github/workflows/build-and-release.yml | 70 +++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/build-and-release.yml diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml new file mode 100644 index 0000000..391ed11 --- /dev/null +++ b/.github/workflows/build-and-release.yml @@ -0,0 +1,70 @@ +name: Build and Release Static Multi-Arch Binaries + +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: write + +jobs: + build-and-release: + name: Build (${{ matrix.target }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - target: aarch64-unknown-linux-musl + os: ubuntu-24.04-arm + binary_name: hal + output_name: hal-aarch64-unknown-linux-musl + - target: x86_64-unknown-linux-musl + os: ubuntu-24.04 + binary_name: hal + output_name: hal-x86_64-unknown-linux-musl + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Install musl-tools (Linux Only) + if: contains(matrix.target, 'linux-musl') + run: | + sudo apt-get update + sudo apt-get install -y musl-tools musl-dev + + - name: Set up Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.74.0 + targets: ${{ matrix.target }} + + - name: Cache Cargo dependencies + uses: swatinem/rust-cache@v2 + with: + key: ${{ matrix.target }} + + - name: Patch broken jobserver dependency + run: cargo update -p jobserver + + - name: Build static binary + run: cargo build --release --target ${{ matrix.target }} + + - name: Prepare binary for upload + if: matrix.os != 'windows-latest' + run: | + cd target/${{ matrix.target }}/release/ + cp ${{ matrix.binary_name }} ${{ matrix.output_name }} + + - name: Create or Update Release and Upload Binary + uses: softprops/action-gh-release@v3 + with: + files: | + target/${{ matrix.target }}/release/${{ matrix.output_name }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}