ci: try to generate lockfile before caching
This commit is contained in:
parent
29040fd0e6
commit
c9c3778ce2
1 changed files with 33 additions and 27 deletions
60
.github/workflows/ci.yaml
vendored
60
.github/workflows/ci.yaml
vendored
|
|
@ -20,15 +20,6 @@ jobs:
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: mamba-org/setup-micromamba@v1
|
- uses: mamba-org/setup-micromamba@v1
|
||||||
with:
|
with:
|
||||||
environment-name: ci
|
environment-name: ci
|
||||||
|
|
@ -40,6 +31,17 @@ jobs:
|
||||||
post-cleanup: 'all'
|
post-cleanup: 'all'
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Generate lockfile
|
||||||
|
run: cargo generate-lockfile
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash -el {0}
|
shell: bash -el {0}
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
|
|
@ -62,15 +64,6 @@ jobs:
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: mamba-org/setup-micromamba@v1
|
- uses: mamba-org/setup-micromamba@v1
|
||||||
with:
|
with:
|
||||||
environment-name: ci
|
environment-name: ci
|
||||||
|
|
@ -82,6 +75,17 @@ jobs:
|
||||||
post-cleanup: 'all'
|
post-cleanup: 'all'
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Generate lockfile
|
||||||
|
run: cargo generate-lockfile
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
|
|
@ -103,15 +107,6 @@ jobs:
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
||||||
- uses: mamba-org/setup-micromamba@v1
|
- uses: mamba-org/setup-micromamba@v1
|
||||||
with:
|
with:
|
||||||
environment-name: ci
|
environment-name: ci
|
||||||
|
|
@ -125,6 +120,17 @@ jobs:
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}-apple-darwin
|
targets: ${{ matrix.target }}-apple-darwin
|
||||||
|
- name: Generate lockfile
|
||||||
|
run: cargo generate-lockfile
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash -el {0}
|
shell: bash -el {0}
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue