diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 17:00:59 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 17:00:59 +0300 |
| commit | 8fd1bc56cec7a8a45198518184ae80521e969e32 (patch) | |
| tree | 7fdc422ba695c6f0b087364404d8f2e9d0bfa150 /.github/workflows/release.yml | |
| parent | b2e6929aa8199574565fd4adf1e631c68d479e6c (diff) | |
ci: build and cache vendored libghostty-vt in release workflow
Diffstat (limited to '.github/workflows/release.yml')
| -rw-r--r-- | .github/workflows/release.yml | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca1620ae..1138edfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,18 +48,35 @@ jobs: with: targets: ${{ matrix.target }} - - name: Install musl tools (Linux x86_64) - if: matrix.target == 'x86_64-unknown-linux-musl' - run: sudo apt-get update && sudo apt-get install -y musl-tools + - name: Install Zig + uses: mlugg/setup-zig@v2 + with: + version: 0.15.2 + + - name: Install Linux build tools + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y cmake ninja-build musl-tools gcc-aarch64-linux-gnu crossbuild-essential-arm64 - - name: Install cross-compilation tools (Linux aarch64) + - name: Install macOS build tools + if: runner.os == 'macOS' + run: brew install cmake ninja + + - name: Set Linux aarch64 linker if: matrix.target == 'aarch64-unknown-linux-musl' - run: | - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools - # Install aarch64 musl cross-compiler - sudo apt-get install -y crossbuild-essential-arm64 - echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV + run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV + + - name: Cache Rust artifacts + uses: Swatinem/rust-cache@v2 + with: + key: release-${{ matrix.target }} + + - name: Cache vendored libghostty-vt build outputs + uses: actions/cache@v4 + with: + path: | + vendor/libghostty-vt/.zig-cache + vendor/libghostty-vt/zig-out + key: ${{ runner.os }}-${{ matrix.target }}-libghostty-${{ hashFiles('vendor/libghostty-vt.vendor.json', 'vendor/libghostty-vt/build.zig', 'vendor/libghostty-vt/build.zig.zon', 'vendor/libghostty-vt/VERSION', 'build.rs') }} - name: Build run: cargo build --release --locked --target ${{ matrix.target }} |
