Debian Codegraph @

.cargo/vendor/unicode-ident/.github/workflows/ci.yml

raw
1 name: CI
2
3 on:
4 push:
5 pull_request:
6 workflow_dispatch:
7 schedule: [cron: "40 1 * * *"]
8
9 permissions:
10 contents: read
11
12 env:
13 RUSTFLAGS: -Dwarnings
14
15 jobs:
16 pre_ci:
17 uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
18
19 unicode:
20 name: latest Unicode
21 runs-on: ubuntu-latest
22 if: github.event_name != 'pull_request'
23 timeout-minutes: 45
24 steps:
25 - uses: actions/checkout@v4
26 - uses: dtolnay/rust-toolchain@stable
27 - id: ucd-generate
28 run: echo "version=$(grep 'ucd-generate [0-9]\+\.[0-9]\+\.[0-9]\+' tests/tables/tables.rs --only-matching)" >> $GITHUB_OUTPUT
29 - run: cargo install ucd-generate
30 - run: curl https://www.unicode.org/Public/zipped/latest/UCD.zip --location --remote-name --silent --show-error --fail --retry 2
31 - run: unzip UCD.zip -d UCD
32 - run: ucd-generate property-bool UCD --include XID_Start,XID_Continue > tests/tables/tables.rs
33 - run: ucd-generate property-bool UCD --include XID_Start,XID_Continue --fst-dir tests/fst
34 - run: ucd-generate property-bool UCD --include XID_Start,XID_Continue --trie-set > tests/trie/trie.rs
35 - run: cargo run --manifest-path generate/Cargo.toml
36 - run: sed --in-place 's/ucd-generate [0-9]\+\.[0-9]\+\.[0-9]\+/${{steps.ucd-generate.outputs.version}}/' tests/tables/tables.rs tests/trie/trie.rs
37 - run: git diff --exit-code
38
39 test:
40 name: Rust ${{matrix.rust}}
41 needs: pre_ci
42 if: needs.pre_ci.outputs.continue
43 runs-on: ubuntu-latest
44 strategy:
45 fail-fast: false
46 matrix:
47 rust: [nightly, beta, stable, 1.70.0]
48 timeout-minutes: 45
49 steps:
50 - uses: actions/checkout@v4
51 - uses: dtolnay/rust-toolchain@master
52 with:
53 toolchain: ${{matrix.rust}}
54 - name: Enable type layout randomization
55 run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
56 if: matrix.rust == 'nightly'
57 - run: cargo test
58 - run: cargo check --benches
59
60 msrv:
61 name: Rust 1.31.0
62 needs: pre_ci
63 if: needs.pre_ci.outputs.continue
64 runs-on: ubuntu-latest
65 timeout-minutes: 45
66 steps:
67 - uses: actions/checkout@v4
68 - uses: dtolnay/[email protected]
69 - run: cargo check --manifest-path tests/crate/Cargo.toml
70
71 clippy:
72 name: Clippy
73 runs-on: ubuntu-latest
74 if: github.event_name != 'pull_request'
75 timeout-minutes: 45
76 steps:
77 - uses: actions/checkout@v4
78 - uses: dtolnay/rust-toolchain@clippy
79 - run: cargo clippy --tests --benches --workspace -- -Dclippy::all -Dclippy::pedantic
80
81 outdated:
82 name: Outdated
83 runs-on: ubuntu-latest
84 if: github.event_name != 'pull_request'
85 timeout-minutes: 45
86 steps:
87 - uses: actions/checkout@v4
88 - uses: dtolnay/install@cargo-outdated
89 - run: cargo outdated --workspace --exit-code 1