1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test
# Stage 2 of the pipeline. Triggers on completion of the `Check` workflow
# and runs only when Check succeeded. Tests the exact commit Check
# validated (workflow_run checks out the default branch by default, so we
# pin the ref to the triggering commit).
on:
workflow_run:
workflows:
types:
permissions:
contents: read
jobs:
test:
name: "test (${{ matrix.os }} · ${{ matrix.features.label }})"
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# Two independent axes, run as parallel jobs. OS: ubuntu omits the
# Apple Secure Enclave backend, macOS compiles it. Features: X25519's
# software backend is feature-selected — the `x25519-cryptoxide`
# default feature picks cryptoxide, `--no-default-features` falls back
# to eccoxide — so cover every backend, with and without `async-io`,
# to keep both paths from rotting and prove byte-for-byte interop.
matrix:
os:
features:
- label: "default (cryptoxide X25519)"
flags: ""
- label: "all features (cryptoxide X25519 + async-io)"
flags: "--all-features"
- label: "no default features (eccoxide X25519)"
flags: "--no-default-features"
- label: "eccoxide X25519 + async-io"
flags: "--no-default-features --features async-io"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
# Key the cache per feature set: matrix instances of one job share
# a key by default, so without this the configs would evict each
# other and thrash on every run.
key: ${{ matrix.features.flags }}
- name: "cargo test (${{ matrix.features.label }})"
run: cargo test ${{ matrix.features.flags }}