ci: build and cache vendored libghostty-vt in release workflow
This commit is contained in:
@@ -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 cross-compilation tools (Linux aarch64)
|
||||
- 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 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 }}
|
||||
|
||||
Reference in New Issue
Block a user