fix(ci): use correct build cache keys
Some checks failed
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Blocked by required conditions
Build Zenyx ⚡ / 🔧 Setup Environment (push) Successful in 35s
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Has been cancelled
Some checks failed
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Blocked by required conditions
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Blocked by required conditions
Build Zenyx ⚡ / 🔧 Setup Environment (push) Successful in 35s
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Has been cancelled
This commit is contained in:
parent
1d01c449e0
commit
729ff93b3b
1 changed files with 31 additions and 5 deletions
|
@ -21,7 +21,9 @@ jobs:
|
|||
path: |
|
||||
~/.cargo/bin
|
||||
/tmp/zig
|
||||
key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
key: cargo-tools-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-tools-
|
||||
|
||||
- name: 🦀 Install Rust toolchain
|
||||
uses: https://github.com/actions-rs/toolchain@v1
|
||||
|
@ -39,9 +41,31 @@ jobs:
|
|||
tar -Jxf zig-linux-x86_64.tar.xz -C /tmp/zig --strip-components=1
|
||||
cargo install cargo-zigbuild
|
||||
|
||||
cargo-test:
|
||||
name: 🧪 Run Cargo Tests
|
||||
needs: setup
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 📥 Checkout source
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: 🗄️ Restore Cargo cache
|
||||
uses: https://github.com/actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-
|
||||
|
||||
- name: 🚀 Run tests
|
||||
run: cargo test --release
|
||||
|
||||
build:
|
||||
name: 🏗️ Build ${{ matrix.target }}
|
||||
needs: setup
|
||||
needs: [setup, cargo-test]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -71,7 +95,9 @@ jobs:
|
|||
path: |
|
||||
~/.cargo/bin
|
||||
/tmp/zig
|
||||
key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
key: cargo-tools-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-tools-
|
||||
|
||||
- name: 📍 Add Zig to PATH
|
||||
run: echo "/tmp/zig" >> $GITHUB_PATH
|
||||
|
@ -90,9 +116,9 @@ jobs:
|
|||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
key: cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
cargo-${{ matrix.target }}-
|
||||
cargo-
|
||||
|
||||
- name: 🚀 Build release binary
|
||||
run: cargo zigbuild --target ${{ matrix.target }} --release
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue