3 Commits
Author SHA1 Message Date
gitea-actions dbb95fed49 ci: bin.json v0.1.11 2026-11-29 11:26:31 +00:00
gitea-actions 62ea7eeb8d ci: bin.json v0.1.10 2026-11-17 16:12:31 +00:00
Johannes KresnerandClaude Opus 5.5 a28b8f0123 ci: build in the cargo-zigbuild image instead of installing the toolchain per run
build / version (push) Successful in 12s
build / build (aarch64-apple-darwin) (push) Successful in 4m28s
build / build (x86_64-unknown-linux-musl) (push) Successful in 4m40s
build / release (push) Successful in 23s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:03:28 +01:00
2 changed files with 14 additions and 22 deletions

No files matched your search

+11 -19
View File
@@ -4,8 +4,6 @@ on:
branches: [main]
paths-ignore: [bin.json]
workflow_dispatch:
env:
MACOS_SDK: "14.5"
jobs:
# next version = highest vX.Y.Z tag with the patch bumped; push a tag by hand for minor/major
version:
@@ -33,28 +31,22 @@ jobs:
fail-fast: false
matrix:
target: [x86_64-unknown-linux-musl, aarch64-apple-darwin]
# rust, zig, cargo-zigbuild, both targets and a macOS SDK (SDKROOT) prebuilt;
# the runner keeps the pulled image, so no per-run toolchain/SDK setup
container:
image: ghcr.io/rust-cross/cargo-zigbuild:0.24.1
steps:
# the image has no node, which act_runner needs for the JS actions below
- run: |
case "$(uname -m)" in x86_64) a=x64 ;; aarch64) a=arm64 ;; esac
curl -fsSL "https://nodejs.org/dist/v22.11.0/node-v22.11.0-linux-$a.tar.xz" \
| tar -xJ -C /usr/local --strip-components=1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# caches ~/.cargo registry/git and target/, keyed on Cargo.lock + toolchain
# caches ~/.cargo registry/git and target/, keyed on Cargo.lock + toolchain;
# a no-op until the runner's cache server is enabled
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
# zig as cross C compiler/linker for both musl and macOS (rusqlite bundles sqlite)
- run: pip install ziglang cargo-zigbuild
# macOS: Apple SDK for system frameworks
- if: matrix.target == 'aarch64-apple-darwin'
id: sdk-cache
uses: actions/cache@v4
with:
path: ~/MacOSX${{ env.MACOS_SDK }}.sdk
key: macos-sdk-${{ env.MACOS_SDK }}
- if: matrix.target == 'aarch64-apple-darwin' && steps.sdk-cache.outputs.cache-hit != 'true'
run: curl -fsSL "https://github.com/joseluisq/macosx-sdks/releases/download/${MACOS_SDK}/MacOSX${MACOS_SDK}.sdk.tar.xz" | tar -xJ -C "$HOME"
- if: matrix.target == 'aarch64-apple-darwin'
run: echo "SDKROOT=$HOME/MacOSX${MACOS_SDK}.sdk" >> "$GITHUB_ENV"
- run: cargo zigbuild --release --locked --target ${{ matrix.target }}
env:
ORCH_VERSION: ${{ needs.version.outputs.version }}
+3 -3
View File
@@ -1,7 +1,7 @@
{
"version": "0.1.9",
"version": "0.1.11",
"sha256": {
"aarch64-apple-darwin": "a4b5d69d4b55893dd6202c1d36f2eebbac6ab72954a7462983f8d7b833ef14b1",
"x86_64-unknown-linux-musl": "395019a2154cb4f8cfdda0ffa63130c6fc9693286bced1648d77586b8995bec3"
"aarch64-apple-darwin": "e4d8cfffdba6dbb7456f7069cbfde5476bf6e34ef2f6d3d101700d78b11e169d",
"x86_64-unknown-linux-musl": "2e8c197ed37747aa049d3331a55b8f8c57511e83946e31c5b4e1bf6ae850ae8b"
}
}