From 926bcbf9781e6c05ff49fd52f0d5969c0f10b07c Mon Sep 17 00:00:00 2001 From: Johannes Kresner Date: Mon, 2 Nov 2026 15:08:21 +0100 Subject: [PATCH] ci: add build pipeline --- .gitea/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..99a229b --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,30 @@ +name: build +on: + push: + branches: [main] +env: + MACOS_SDK: "14.5" +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: [x86_64-unknown-linux-gnu, aarch64-apple-darwin] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + - if: matrix.target == 'x86_64-unknown-linux-gnu' + run: cargo build --release --locked --target ${{ matrix.target }} -p hx-cli + # macOS: zig as cross C compiler/linker, Apple SDK for Security.framework etc. + - if: matrix.target == 'aarch64-apple-darwin' + run: | + pip install ziglang cargo-zigbuild + curl -fsSL "https://github.com/joseluisq/macosx-sdks/releases/download/${MACOS_SDK}/MacOSX${MACOS_SDK}.sdk.tar.xz" | tar -xJ -C "$HOME" + SDKROOT="$HOME/MacOSX${MACOS_SDK}.sdk" cargo zigbuild --release --locked --target ${{ matrix.target }} -p hx-cli + - uses: actions/upload-artifact@v3 + with: + name: hx-${{ matrix.target }} + path: target/${{ matrix.target }}/release/hx