@@ -14,74 +14,119 @@ env:
1414RUSTDOCFLAGS :-D warnings --cfg docsrs
1515
1616jobs :
17- build :
17+ get-package-info :
1818runs-on :ubuntu-latest
19+ outputs :
20+ msrv :${{ steps.msrv.outputs.metadata }}
21+ name :${{ steps.name.outputs.metadata }}
22+ version :${{ steps.version.outputs.metadata }}
23+ steps :
24+ -uses :actions/checkout@v4
25+ -name :Get MSRV
26+ id :msrv
27+ uses :nicolaiunrein/cargo-get@v1.4.0
28+ with :
29+ subcommand :' package.rust_version'
30+ -name :Get package name
31+ id :name
32+ uses :nicolaiunrein/cargo-get@v1.4.0
33+ with :
34+ subcommand :' package.name'
35+ -name :Get package version
36+ id :version
37+ uses :nicolaiunrein/cargo-get@v1.4.0
38+ with :
39+ subcommand :' package.version'
40+
41+ build_test :
42+ needs :get-package-info
43+ runs-on :${{ matrix.os }}
1944strategy :
2045matrix :
46+ os :[ ubuntu-latest, windows-latest ]
2147rust :
48+ -${{ needs.get-package-info.outputs.msrv }}
2249 -stable
2350 -beta
2451 -nightly
2552steps :
26- -uses :actions/checkout@v2
27- -name :Install toolchain
28- uses :actions-rs/ toolchain@v1
29- with :
53+ -uses :actions/checkout@v4
54+ -name :Install toolchain
55+ uses :dtolnay/rust- toolchain@master
56+ with :
3057toolchain :${{ matrix.rust }}
31- override :true
3258components :rustfmt, clippy
33- -name :Build
34- run :cargo build --verbose
35- -name :Run tests with all features
36- run :cargo test --all-features --verbose
37- -name :Run tests without features
38- run :cargo test --no-default-features --verbose
39- -name :Package
40- run :cargo package
41- -name :Test package
42- run :cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test
43- -name :Test package without features
44- run :cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test --no-default-features
45- -name :Build docs
46- if :matrix.rust == 'nightly'
47- run :cargo doc --all-features --verbose
48- -name :Check formatting
49- if :matrix.rust == 'stable'
50- run :cargo fmt --all --check
51- -name :Check clippy
52- if :matrix.rust == 'stable'
53- run :cargo clippy --all-features --lib --tests --examples --verbose
54- -name :Check benchmarks with clippy
55- if :matrix.rust == 'nightly'
56- run :cargo clippy --all-features --benches --verbose
57- -name :Check fuzz tests with clippy
58- if :matrix.rust == 'stable'
59- working-directory :fuzz
60- run :cargo clippy --all-features --all-targets --verbose
61- -name :Check fuzz tests formatting
62- if :matrix.rust == 'stable'
63- working-directory :fuzz
64- run :cargo fmt --all --check
65- msrv :
59+ -name :Use tinyvec 1.6.0
60+ if :matrix.rust == ${{ needs.get-package-info.outputs.msrv }}
61+ run :cargo update -p tinyvec --precise 1.6.0
62+ -name :Build
63+ run :cargo build --verbose
64+ -name :Run tests with all features
65+ run :cargo test --all-features --verbose
66+ -name :Run tests without features
67+ run :cargo test --no-default-features --verbose
68+ -name :Package
69+ run :cargo package --offline
70+ -name :Test package
71+ working-directory :target/package/${{ needs.get-package-info.outputs.name }}-${{ needs.get-package-info.outputs.version }}/
72+ run :cargo test --offline
73+ -name :Test package without features
74+ working-directory :target/package/${{ needs.get-package-info.outputs.name }}-${{ needs.get-package-info.outputs.version }}/
75+ run :cargo test --no-default-features --offline
76+
77+ docs :
78+ runs-on :ubuntu-latest
79+ steps :
80+ -uses :actions/checkout@v4
81+ -name :Install toolchain
82+ uses :dtolnay/rust-toolchain@master
83+ with :
84+ toolchain :nightly
85+ -name :Build docs
86+ run :cargo doc --all-features --verbose
87+
88+ lints :
89+ runs-on :ubuntu-latest
90+ steps :
91+ -uses :actions/checkout@v4
92+ -name :Install toolchain
93+ uses :dtolnay/rust-toolchain@master
94+ with :
95+ toolchain :stable
96+ components :rustfmt, clippy
97+ -name :Check formatting
98+ run :cargo fmt --all --check
99+ -name :Check clippy
100+ run :cargo clippy --all-features --lib --tests --examples --verbose
101+ -name :Check fuzz tests with clippy
102+ working-directory :fuzz
103+ run :cargo clippy --all-features --all-targets --verbose
104+ -name :Check fuzz tests formatting
105+ working-directory :fuzz
106+ run :cargo fmt --all --check
107+
108+ bench-lints :
66109runs-on :ubuntu-latest
67110steps :
68- -uses :actions/checkout@v2
69- -name :Install msrv toolchain
70- uses :dtolnay/rust-toolchain@1.36.0
71- -name :Use tinyvec 1.6.0
72- run :cargo update -p tinyvec --precise 1.6.0
73- -name :Build
74- run :cargo build --verbose --all-features
111+ -uses :actions/checkout@v4
112+ -name :Install toolchain
113+ uses :dtolnay/rust-toolchain@master
114+ with :
115+ toolchain :nightly
116+ components :rustfmt, clippy
117+ -name :Check benchmarks with clippy
118+ run :cargo clippy --all-features --benches --verbose
119+
75120regen :
76121runs-on :ubuntu-latest
77122steps :
78- -uses :actions/checkout@v3
79- -uses :actions/setup-python@v5
80- with :
81- python-version :' 3.12'
82- -name :Regen
83- run :cd scripts && python3 unicode.py
84- -name :Diff tables
85- run :diff src/tables.rs scripts/tables.rs
86- -name :Diff tests
87- run :diff tests/data/normalization_tests.rs scripts/normalization_tests.rs
123+ -uses :actions/checkout@v3
124+ -uses :actions/setup-python@v5
125+ with :
126+ python-version :' 3.12'
127+ -name :Regen
128+ run :cd scripts && python3 unicode.py
129+ -name :Diff tables
130+ run :diff src/tables.rs scripts/tables.rs
131+ -name :Diff tests
132+ run :diff tests/data/normalization_tests.rs scripts/normalization_tests.rs