Skip to content

Commit a392da8

Browse files
authored
chore: update from change in other projects (#137)
1 parent 1cdeadd commit a392da8

File tree

8 files changed

+46
-66
lines changed

8 files changed

+46
-66
lines changed

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@
2929
/bin
3030
/justfile
3131
/rustfmt.toml
32-
/target
33-
/target-tarpaulin
32+
/target*
3433
/tarpaulin.toml

.github/workflows/audit-check.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: Security audit
22

33
on:
44
# TODO re-enable once project is set up properly
5-
#push:
6-
#schedule:
7-
# - cron: '0 0 * * *'
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
9+
# schedule:
10+
# - cron: '0 0 * * *'
811
workflow_dispatch:
912

1013
jobs:

.github/workflows/ci.yml

Lines changed: 18 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: CI
22

33
on:
44
# TODO re-enable once project is set up properly
5-
#push:
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
69
workflow_dispatch:
710

811
env:
@@ -82,60 +85,43 @@ jobs:
8285
cache-on-failure: true
8386

8487
- name: Install required tools
85-
uses: taiki-e/install-action@e328d9d001c908ed6a5c128f1d6881ab8525f4e3 # v2.51.3
88+
uses: taiki-e/install-action@6c6479b49816fcc0975a31af977bdc1f847c2920 # v2.52.1
8689
with:
87-
tool: just,cargo-hack,cargo-minimal-versions,cargo-msrv-prep
90+
tool: just@1.40.0,cargo-hack@0.6.36,cargo-minimal-versions@0.1.30,cargo-msrv-prep@2.1.1
8891
env:
8992
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9093

9194
- name: Run checks using cargo-minimal-versions
9295
run: just toolchain=${{ matrix.toolchain }} check-minimal
9396

9497
build:
95-
name: Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}
98+
name: Build for Rust ${{ matrix.toolchain }} on ${{ matrix.os }}
9699
strategy:
97100
fail-fast: false
98101
matrix:
99-
toolchain: [ 1.68.2, stable, beta, nightly ] # TODO: change 1.68.2 for your minimum supported Rust version
102+
toolchain: [ 1.68.2, stable ] # TODO: change 1.68.2 for your minimum supported Rust version
100103
os: [ ubuntu-24.04, macos-14, windows-2022 ]
101-
ignore-lock: [ false, true ]
102-
include:
103-
- experimental: false
104-
- toolchain: beta
105-
experimental: true
106-
- toolchain: nightly
107-
experimental: true
108-
exclude:
109-
- toolchain: 1.68.2 # TODO: change this version to match the minimum supported Rust version specified above
110-
ignore-lock: true
111104
runs-on: ${{ matrix.os }}
112-
continue-on-error: ${{ matrix.experimental }}
113105
steps:
114106
- name: Checkout code
115107
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
116108

117-
- name: Remove Cargo.lock
118-
if: ${{ matrix.ignore-lock }}
119-
run: rm Cargo.lock
120-
121109
- name: Install Rust ${{ matrix.toolchain }}
122110
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
123111
with:
124112
toolchain: ${{ matrix.toolchain }}
125113
cache: false
126114

127115
- name: Rust Cache
128-
if: ${{ !matrix.experimental }}
129116
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
130117
with:
131-
prefix-key: v3-rust
132-
key: ignore-lock-${{ matrix.ignore-lock }}
118+
prefix-key: v4-rust
133119
cache-on-failure: true
134120

135121
- name: Install required tools
136-
uses: taiki-e/install-action@e328d9d001c908ed6a5c128f1d6881ab8525f4e3 # v2.51.3
122+
uses: taiki-e/install-action@6c6479b49816fcc0975a31af977bdc1f847c2920 # v2.52.1
137123
with:
138-
tool: just,cargo-hack
124+
tool: just@1.40.0,cargo-hack@0.6.36
139125
env:
140126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141127

@@ -159,9 +145,9 @@ jobs:
159145
cache: false
160146

161147
- name: Install required tools
162-
uses: taiki-e/install-action@e328d9d001c908ed6a5c128f1d6881ab8525f4e3 # v2.51.3
148+
uses: taiki-e/install-action@6c6479b49816fcc0975a31af977bdc1f847c2920 # v2.52.1
163149
with:
164-
tool: just,cargo-llvm-cov
150+
tool: just@1.40.0,cargo-llvm-cov@0.6.16
165151
env:
166152
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167153

@@ -184,39 +170,22 @@ jobs:
184170
target/llvm-cov/html/
185171
186172
doc:
187-
name: Rustdoc check for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }}
188-
strategy:
189-
fail-fast: false
190-
matrix:
191-
toolchain: [ stable, nightly ]
192-
include:
193-
- experimental: false
194-
- toolchain: nightly
195-
experimental: true
173+
name: Rustdoc check
196174
runs-on: ubuntu-24.04
197-
continue-on-error: ${{ matrix.experimental }}
198175
steps:
199176
- name: Checkout code
200177
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
201178

202-
- name: Install Rust ${{ matrix.toolchain }}
179+
- name: Install Rust nightly
203180
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
204181
with:
205-
toolchain: ${{ matrix.toolchain }}
182+
toolchain: nightly
206183
cache: false
207184

208-
- name: Rust Cache
209-
if: ${{ !matrix.experimental }}
210-
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
211-
with:
212-
prefix-key: v2-rust
213-
cache-targets: false
214-
cache-on-failure: true
215-
216185
- name: Install just
217-
uses: taiki-e/install-action@e328d9d001c908ed6a5c128f1d6881ab8525f4e3 # v2.51.3
186+
uses: taiki-e/install-action@6c6479b49816fcc0975a31af977bdc1f847c2920 # v2.52.1
218187
with:
219-
tool: just
188+
tool: just@1.40.0
220189
env:
221190
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
222191

.github/workflows/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ on:
88

99
jobs:
1010
build-release-files:
11-
name: Build release files for ${{ matrix.arch }}-${{ matrix.platform }} with Rust ${{ matrix.toolchain }}
12-
if: github.repository_owner == 'clechasseur' # Don't build on forks
11+
name: Build release files for ${{ matrix.arch }}-${{ matrix.platform }}
12+
# Don't build on forks
13+
if: github.repository_owner == 'clechasseur'
1314
strategy:
15+
fail-fast: false
1416
matrix:
15-
toolchain: [ stable ]
1617
arch: [ aarch64, x86_64 ]
1718
platform: [ unknown-linux-gnu, unknown-linux-musl, unknown-freebsd, apple-darwin, pc-windows-msvc ]
1819
include:
19-
- os: ubuntu-latest
20+
- arch: universal
21+
platform: apple-darwin
22+
- os: ubuntu-24.04
2023
- platform: apple-darwin
21-
os: macos-latest
24+
os: macos-14
2225
- platform: pc-windows-msvc
23-
os: windows-latest
26+
os: windows-2022
2427
- crt-static: false
2528
- link-self-contained: false
2629
- platform: pc-windows-msvc
@@ -38,10 +41,10 @@ jobs:
3841
- name: Checkout code
3942
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4043

41-
- name: Install Rust ${{ matrix.toolchain }}
44+
- name: Install Rust
4245
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
4346
with:
44-
toolchain: ${{ matrix.toolchain }}
47+
toolchain: stable
4548
cache: false
4649

4750
- name: Setup cross-compilation tools

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ codecov.json
2727

2828
# Local environment overrides
2929
.env
30+
31+
# Always include .keep files
32+
!**/.keep

DEVELOPMENT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ If you want to run tests with coverage locally, you'll need to install [`cargo-l
4646
```bash
4747
cargo install cargo-llvm-cov --locked
4848
```
49+
4950
You can also install it via [cargo-binstall](https://github.com/cargo-bins/cargo-binstall):
5051

5152
```bash

justfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ force_prep_flag := if force_prep == "true" { "--force" } else { "" }
4141

4242
just := "just all_features=" + all_features + " all_targets=" + all_targets + " message_format=" + message_format + " target_tuple=" + target_tuple + " release=" + release + " workspace=" + workspace + " package=" + package + " warnings_as_errors=" + warnings_as_errors + " force_prep=" + force_prep
4343

44+
rustdoc_extra_flags := if toolchain == "nightly" { "--cfg docsrs" } else { "" }
45+
4446
skip_test_reqs_value := "running"
4547

4648
[private]
@@ -72,7 +74,7 @@ tidy: clippy fmt
7274

7375
# Run `cargo hack clippy` for the feature powerset
7476
clippy *extra_args:
75-
{{cargo_hack}} clippy {{package_flag}} {{all_targets_flag}} {{feature_powerset_flag}} {{message_format_flag}} {{target_tuple_flag}} {{extra_args}} {{clippy_flags}}
77+
{{cargo_hack}} clippy --target-dir target/clippy-target {{package_flag}} {{all_targets_flag}} {{feature_powerset_flag}} {{message_format_flag}} {{target_tuple_flag}} {{extra_args}} {{clippy_flags}}
7678

7779
# Run rustfmt
7880
fmt *extra_args:
@@ -84,7 +86,7 @@ check *extra_args:
8486

8587
# Run `cargo hack check` for the feature powerset
8688
check-powerset *extra_args:
87-
{{cargo_hack}} check {{package_flag}} --no-dev-deps --lib --bins {{feature_powerset_flag}} {{message_format_flag}} {{target_tuple_flag}} {{release_flag}} {{extra_args}}
89+
{{cargo_hack}} check --target-dir target/check-powerset-target {{package_flag}} --no-dev-deps --lib --bins {{feature_powerset_flag}} {{message_format_flag}} {{target_tuple_flag}} {{release_flag}} {{extra_args}}
8890

8991
# Run `cargo build`
9092
build *extra_args:
@@ -116,7 +118,7 @@ update *extra_args:
116118
# Generate documentation with rustdoc
117119
doc: _doc
118120

119-
_doc $RUSTDOCFLAGS="-D warnings":
121+
_doc $RUSTDOCFLAGS=("-D warnings " + rustdoc_extra_flags):
120122
{{cargo}} doc {{ if env('CI', '') != '' { '--no-deps' } else { '--open' } }} {{package_flag}} {{all_features_flag}} {{message_format_flag}}
121123

122124
# Check doc coverage with Nightly rustdoc

tarpaulin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
workspace = true
33
all-features = true
44
engine = "Llvm"
5-
exclude-files = [ "target*/*", "src/bin/*", "src/main.rs" ]
5+
exclude-files = [ "target*/*", "resources/*", "*/src/bin/*", "*/src/main.rs" ]
66
run-types = [ "Tests" ]
77
out = [ "Html", "Xml" ]

0 commit comments

Comments
 (0)