-
Notifications
You must be signed in to change notification settings - Fork 10
97 lines (73 loc) · 3.07 KB
/
rust.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
rust: [stable, beta, nightly, 1.57.0, 1.64.0, 1.83.0]
steps:
- uses: actions/checkout@v2
- name: ci-all-versions
run: |
rustup override set ${{ matrix.rust }}
cargo update
cd "${{github.workspace}}/const_format_proc_macros/"
cargo test
cd "${{github.workspace}}/const_format/"
cargo test --features "__test"
cargo test --features "__test assertcp"
- uses: actions/checkout@v2
- name: ci-stable
if: ${{ matrix.rust == '1.64.0' }}
run: |
cargo update
cd "${{github.workspace}}/const_format/"
cargo test --features "__test rust_1_64"
- uses: actions/checkout@v2
- name: ci-nighly
if: ${{ matrix.rust != '1.57.0' && matrix.rust != '1.64.0' }}
run: |
rustup override set ${{ matrix.rust }}
cargo update
cd "${{github.workspace}}/const_format/"
cargo test --features "__test"
cargo test --features "__test more_str_macros"
cargo test --features "__test assertcp"
cargo test --features "__test fmt"
cargo test --features "__test assertc"
cargo test --features "__test derive"
cargo test --features "__test constant_time_as_str"
cargo test --features "__test rust_1_83"
cargo test --features "__test derive constant_time_as_str"
cargo test --features "__test derive constant_time_as_str assertc"
cargo test --features "__test derive constant_time_as_str assertc more_str_macros rust_1_83"
- uses: actions/checkout@v2
- name: ci-nighly
if: ${{ matrix.rust == 'nightly' && runner.os == 'Linux' }}
run: |
rustup override set ${{ matrix.rust }}
cargo update -Z minimal-versions
cd "${{github.workspace}}/const_format_proc_macros/"
cargo test
cd "${{github.workspace}}/const_format/"
cargo test --features "__inline_const_pat_tests derive constant_time_as_str assertc more_str_macros rust_1_83"
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-check-number-validity -Zmiri-symbolic-alignment-check"
echo "Installing latest nightly with Miri"
echo "$MIRI_NIGHTLY"
rustup set profile minimal
rustup default "$MIRI_NIGHTLY"
rustup override set "$MIRI_NIGHTLY"
rustup component add miri
cargo miri setup
cargo clean
# tests the crate without the constant_time_as_str feature
# (and also without any feature that implies it)
cargo miri test --tests --features "__test derive fmt assertc"
# tests the crate with every feature, including constant_time_as_str
cargo miri test \
--features "__inline_const_pat_tests derive constant_time_as_str assertc more_str_macros rust_1_83"