Skip to content
Closed
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
39 changes: 35 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ jobs:
clippy:
name: clippy (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 15
env:
CARGO_INCREMENTAL: 0
strategy:
fail-fast: false
matrix:
Expand All @@ -64,13 +66,28 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: zackees/zccache@1.15.4
with:
zccache-version: 1.15.4
shared-key: clippy
cache-target: true
target-restore-fallback: true
save-cache: true
# The action's Windows install probe starts the daemon before the cache
# restore, so it misses every restored entry until restarted.
- if: runner.os == 'Windows'
run: zccache stop && zccache start
- run: cargo clippy --workspace --all-targets -- -D warnings
# Saves the caches; a composite action has no post step to do it.
- if: always()
uses: zackees/zccache/action/cleanup@1.15.4

test:
name: test (${{ matrix.os }}${{ matrix.partition && format(', {0}', matrix.partition) || '' }})
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ matrix.os == 'windows-latest' && 15 || 10 }}
timeout-minutes: ${{ matrix.os == 'windows-latest' && 30 || 20 }}
env:
CARGO_INCREMENTAL: 0
strategy:
fail-fast: false
matrix:
Expand All @@ -86,7 +103,19 @@ jobs:
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Partitions on one OS build the same artifacts, so the first one saves
# the caches for all of them.
- uses: zackees/zccache@1.15.4
with:
zccache-version: 1.15.4
shared-key: test
cache-target: true
target-restore-fallback: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Disable target fallback for the CI test gate

When a PR run can restore a target snapshot from an earlier source tree, Cargo may accept the restored fingerprints and run stale test binaries instead of rebuilding changed crates, allowing nextest and the similarly configured clippy job to report false success. The action's restore policy explicitly disables this fallback by default because stale Cargo fingerprints and build-script outputs can make a PR merge ref appear fresh; retain exact target restores or disable cache-target, but do not enable target-restore-fallback on these required checks.

AGENTS.md reference: AGENTS.md:L8-L14

Useful? React with 👍 / 👎.

save-cache: ${{ (!matrix.partition || startsWith(matrix.partition, '1/')) && 'true' || 'false' }}
# The action's Windows install probe starts the daemon before the cache
# restore, so it misses every restored entry until restarted.
- if: runner.os == 'Windows'
run: zccache stop && zccache start
- uses: taiki-e/install-action@nextest
# The taskwarrior todo tests run against taskwarrior 3.5 or later, the
# release built on the taskchampion devkit embeds, which Homebrew ships.
Expand All @@ -112,6 +141,8 @@ jobs:
- name: Build without default features
if: matrix.os != 'windows-latest' && matrix.partition != '2/2'
run: cargo build --workspace --no-default-features
- if: always()
uses: zackees/zccache/action/cleanup@1.15.4

postgres:
name: postgres todo backend and rules source
Expand Down
Loading