Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/audit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Security audit

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
Expand Down Expand Up @@ -56,39 +59,32 @@ jobs:
args: --all

build:
name: Build for Rust ${{ matrix.toolchain }}${{ matrix.experimental && ' (experimental)' || '' }} on ${{ matrix.os }}${{ matrix.ignore-lock && ' without Cargo.lock' || '' }}
name: Build on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain: [ 1.81.0, stable ]
os: [ ubuntu-24.04 ]
ignore-lock: [ false ]
os: [ ubuntu-24.04, macos-14, windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Remove Cargo.lock
if: ${{ matrix.ignore-lock }}
run: rm Cargo.lock

- name: Install Rust ${{ matrix.toolchain }}
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
with:
toolchain: ${{ matrix.toolchain }}
toolchain: stable
cache: false

- name: Rust Cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
with:
prefix-key: v3-rust
key: ignore-lock-${{ matrix.ignore-lock }}
prefix-key: v4-rust
cache-on-failure: true

- name: Install required tools
uses: taiki-e/install-action@2db346588ecc179293df26b2f8dcc61d3b3ecc40 # v2.49.46
uses: taiki-e/install-action@6c6479b49816fcc0975a31af977bdc1f847c2920 # v2.52.1
with:
tool: just,cargo-hack
tool: just@1.40.0,cargo-hack@0.6.36
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ codecov.json
# Local environment overrides
.env

# Always include .keep files
!**/.keep

# aocf input cache
.aocf/cache
14 changes: 8 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ force_prep_flag := if force_prep == "true" { "--force" } else { "" }

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

rustdoc_extra_flags := if toolchain == "nightly" { "--cfg docsrs" } else { "" }

skip_test_reqs_value := "running"

[private]
Expand Down Expand Up @@ -72,7 +74,7 @@ tidy: clippy fmt

# Run `cargo hack clippy` for the feature powerset
clippy *extra_args:
{{cargo_hack}} clippy {{package_flag}} {{all_targets_flag}} {{feature_powerset_flag}} {{message_format_flag}} {{target_tuple_flag}} {{extra_args}} {{clippy_flags}}
{{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}}

# Run rustfmt
fmt *extra_args:
Expand All @@ -84,7 +86,7 @@ check *extra_args:

# Run `cargo hack check` for the feature powerset
check-powerset *extra_args:
{{cargo_hack}} check {{package_flag}} --no-dev-deps --lib --bins {{feature_powerset_flag}} {{message_format_flag}} {{target_tuple_flag}} {{release_flag}} {{extra_args}}
{{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}}

# Run `cargo build`
build *extra_args:
Expand Down Expand Up @@ -116,7 +118,7 @@ update *extra_args:
# Generate documentation with rustdoc
doc: _doc

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

# Check doc coverage with Nightly rustdoc
Expand All @@ -137,11 +139,11 @@ _check-minimal-only: (_rimraf "target/check-minimal-target")
{{cargo}} minimal-versions check --target-dir target/check-minimal-target {{package_flag}} --lib --bins {{all_features_flag}} {{message_format_flag}}

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

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

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

# Prints state of docker container to stdout
# Prints state of a docker container to stdout
@_check-container-state name:
docker container ls --filter "name={{name}}" --format "{{{{.State}}"

Expand Down
Loading