Skip to content

Commit b8f7163

Browse files
authored
chore: merge updates from template (#34)
1 parent 990e61d commit b8f7163

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

.github/workflows/audit-check.yml

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

33
on:
44
push:
5+
branches:
6+
- main
7+
pull_request:
58
workflow_dispatch:
69

710
jobs:

.github/workflows/ci.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CI
22

33
on:
44
push:
5+
branches:
6+
- main
7+
pull_request:
58
workflow_dispatch:
69

710
env:
@@ -56,39 +59,32 @@ jobs:
5659
args: --all
5760

5861
build:
59-
name: Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}
62+
name: Build on ${{ matrix.os }}
6063
strategy:
6164
fail-fast: false
6265
matrix:
63-
toolchain: [ 1.81.0, stable ]
64-
os: [ ubuntu-24.04 ]
65-
ignore-lock: [ false ]
66+
os: [ ubuntu-24.04, macos-14, windows-2022 ]
6667
runs-on: ${{ matrix.os }}
6768
steps:
6869
- name: Checkout code
6970
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7071

71-
- name: Remove Cargo.lock
72-
if: ${{ matrix.ignore-lock }}
73-
run: rm Cargo.lock
74-
75-
- name: Install Rust ${{ matrix.toolchain }}
72+
- name: Install Rust
7673
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
7774
with:
78-
toolchain: ${{ matrix.toolchain }}
75+
toolchain: stable
7976
cache: false
8077

8178
- name: Rust Cache
8279
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
8380
with:
84-
prefix-key: v3-rust
85-
key: ignore-lock-${{ matrix.ignore-lock }}
81+
prefix-key: v4-rust
8682
cache-on-failure: true
8783

8884
- name: Install required tools
89-
uses: taiki-e/install-action@2db346588ecc179293df26b2f8dcc61d3b3ecc40 # v2.49.46
85+
uses: taiki-e/install-action@6c6479b49816fcc0975a31af977bdc1f847c2920 # v2.52.1
9086
with:
91-
tool: just,cargo-hack
87+
tool: just@1.40.0,cargo-hack@0.6.36
9288
env:
9389
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9490

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ codecov.json
2828
# Local environment overrides
2929
.env
3030

31+
# Always include .keep files
32+
!**/.keep
33+
3134
# aocf input cache
3235
.aocf/cache

justfile

Lines changed: 8 additions & 6 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
@@ -137,11 +139,11 @@ _check-minimal-only: (_rimraf "target/check-minimal-target")
137139
{{cargo}} minimal-versions check --target-dir target/check-minimal-target {{package_flag}} --lib --bins {{all_features_flag}} {{message_format_flag}}
138140

139141
# Run `cargo msrv` with `cargo minimal-versions check`
140-
msrv-minimal: (prep "--manifest-backup-suffix .msrv-prep.outer.bak") && (unprep "--manifest-backup-suffix .msrv-prep.outer.bak")
142+
msrv: (prep "--manifest-backup-suffix .msrv-prep.outer.bak") && (unprep "--manifest-backup-suffix .msrv-prep.outer.bak")
141143
{{cargo}} msrv find -- {{just}} _check-minimal-only
142144

143145
# Run `cargo msrv` with `cargo check`
144-
msrv *extra_args: (prep "--manifest-backup-suffix .msrv-prep.outer.bak --no-merge-pinned-dependencies") && (unprep "--manifest-backup-suffix .msrv-prep.outer.bak")
146+
msrv-full *extra_args: (prep "--manifest-backup-suffix .msrv-prep.outer.bak --no-merge-pinned-dependencies") && (unprep "--manifest-backup-suffix .msrv-prep.outer.bak")
145147
{{cargo}} msrv find -- {{just}} _msrv-check {{extra_args}}
146148

147149
_msrv-check *extra_args: (_rimraf "target/msrv-target") (check "--target-dir target/msrv-target" extra_args)
@@ -172,7 +174,7 @@ unprep *extra_args:
172174
@_rimraf-it target_dir:
173175
Remove-Item "{{target_dir}}" -Recurse
174176

175-
# Prints state of docker container to stdout
177+
# Prints state of a docker container to stdout
176178
@_check-container-state name:
177179
docker container ls --filter "name={{name}}" --format "{{{{.State}}"
178180

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy