-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (72 loc) · 2.78 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
name: Rust
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
# TODO: add stable/beta once they're versions >= 1.83
rust: [beta, nightly, 1.83.0, 1.65.0, 1.61.0, 1.57.0]
steps:
- uses: actions/checkout@v2
- name: enable-rust-1_61
if: matrix.rust == '1.61.0'
run: echo "rustv=rust_1_61" >> $GITHUB_ENV
- name: enable-rust-1_65
if: matrix.rust == '1.65.0'
run: echo "rustv=rust_1_65" >> $GITHUB_ENV
- name: enable-rust-1_83
if: matrix.rust == '1.83.0'
run: echo "rustv=rust_1_83" >> $GITHUB_ENV
- name: enable-rust-stable
if: matrix.rust == 'stable' || matrix.rust == 'beta' || matrix.rust == 'nightly'
run: echo "rustv=rust_stable" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: ci-all-versions
run: |
echo "rustv = ${{env.rustv}}"
set -ex
rustup override set ${{ matrix.rust }}
cargo update
cd "${{github.workspace}}/"
cargo test --no-default-features
cargo test --no-default-features --features "${{env.rustv}}"
cargo test --no-default-features --features "alloc"
cargo test --no-default-features --features "proc_macros"
cargo test --no-default-features --features "${{env.rustv}} proc_macros alloc"
- uses: actions/checkout@v2
- name: ci-nighly
if: ${{ matrix.rust == 'nightly' && runner.os == 'Linux' }}
run: |
set -ex
rustup override set ${{ matrix.rust }}
cd "${{github.workspace}}/"
cargo build
cargo test --no-default-features --features \
"rust_stable adt_const_marker"
cargo test --no-default-features --features \
"rust_stable adt_const_marker alloc"
cargo test --no-default-features --features \
"rust_stable adt_const_marker proc_macros alloc"
# "rust_stable adt_const_marker proc_macros __ui_tests alloc"
cargo test --no-default-features --features \
"rust_stable adt_const_marker alloc"
# "rust_stable adt_const_marker __ui_tests alloc"
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
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
env RUST_BACKTRACE=0 cargo miri test --no-default-features \
--features "${{env.rustv}} adt_const_marker proc_macros alloc"