Skip to content

Commit

Permalink
Generate lockfiles if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Dec 30, 2024
1 parent 233592c commit c107bcd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
default: true
components: rustfmt, clippy

- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: cargo +${{ matrix.msrv }} check
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -97,5 +102,10 @@ jobs:
toolchain: nightly
args: -Zminimal-versions

- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Test the code
run: python3 ./bin/test --rust-version stable --test all
5 changes: 5 additions & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@ jobs:
default: true
components: rustfmt, clippy

- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Test the code
run: python3 ./bin/test --rust-version nightly --test all --extra-clippy-flags "-A clippy::arc_with_non_send_sync" # extra clippy args since lint is nightly only for now
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ jobs:
override: true
components: rustfmt, clippy

- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Test the code
run: python3 ./bin/test --rust-version ${{matrix.rust}} --test all

Expand Down Expand Up @@ -80,6 +85,11 @@ jobs:
override: true
components: rustfmt, clippy

- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Test the code
run: python3 ./bin/test --rust-version ${{matrix.rust}} --test all

Expand All @@ -104,6 +114,11 @@ jobs:
run: |
cargo install cross --locked
- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Test the code
uses: actions-rs/cargo@v1
with:
Expand All @@ -128,6 +143,11 @@ jobs:
mingw64/mingw-w64-x86_64-pkg-config \
mingw64/mingw-w64-x86_64-rust
- name: cargo generate-lockfile
# enable this ci template to run regardless of whether the lockfile is checked in or not
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Run the tests
shell: msys2 {0}
run: |
Expand Down

0 comments on commit c107bcd

Please sign in to comment.