CI workflow
This commit is contained in:
@@ -14,13 +14,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
wheels:
|
wheels:
|
||||||
runs-on: ${{ matrix.platform.runner }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- runner: ubuntu-latest
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
@@ -35,7 +29,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Cache Rust and sccache
|
- name: Setup caching
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@@ -45,6 +39,7 @@ jobs:
|
|||||||
~/.cache/pip
|
~/.cache/pip
|
||||||
~/.cache/pip-wheel
|
~/.cache/pip-wheel
|
||||||
~/.cache/sccache
|
~/.cache/sccache
|
||||||
|
~/.cache/cargo-xwin
|
||||||
key: rust-cache-${{ matrix.platform.target }}-${{ hashFiles('**/Cargo.lock') }}-${{ runner.os }}-${{ github.ref }}
|
key: rust-cache-${{ matrix.platform.target }}-${{ hashFiles('**/Cargo.lock') }}-${{ runner.os }}-${{ github.ref }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
rust-cache-${{ matrix.platform.target }}-${{ runner.os }}-
|
rust-cache-${{ matrix.platform.target }}-${{ runner.os }}-
|
||||||
@@ -69,7 +64,17 @@ jobs:
|
|||||||
pip install maturin ziglang
|
pip install maturin ziglang
|
||||||
if ! command -v sccache >/dev/null 2>&1; then
|
if ! command -v sccache >/dev/null 2>&1; then
|
||||||
cargo install sccache || pip install sccache
|
cargo install sccache || pip install sccache
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Install xwin
|
||||||
|
run: |
|
||||||
|
export RUSTUP_HOME="${{ runner.temp }}/rustup"
|
||||||
|
export CARGO_HOME="${{ runner.temp }}/cargo"
|
||||||
|
source "$CARGO_HOME/env" 2>/dev/null || true
|
||||||
|
if ! command -v cargo-xwin >/dev/null 2>&1; then
|
||||||
cargo install cargo-xwin || pip install cargo-xwin
|
cargo install cargo-xwin || pip install cargo-xwin
|
||||||
|
cargo xwin cache xwin
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user