-
Notifications
You must be signed in to change notification settings - Fork 10
137 lines (123 loc) · 3.69 KB
/
ci.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on:
push:
branches: [ "master", "ci" ]
pull_request:
branches: [ "master", "ci" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
build:
strategy:
matrix:
os: [macos-11, windows-2019, ubuntu-20.04]
rust: [stable, 1.48.0]
c-compiler: ['']
cxx-compiler: ['']
target: ['']
include:
- os: ubuntu-20.04
rust: nightly
- os: ubuntu-20.04
rust: beta
- os: ubuntu-20.04
target: i686-unknown-linux-gnu
rust: stable
- os: ubuntu-20.04
rust: stable
- os: windows-2019
target: i686-pc-windows-msvc
rust: stable
- os: windows-2019
rust: stable
- os: ubuntu-20.04
rust: stable
- os: ubuntu-20.04
c-compiler: clang
cxx-compiler: clang++
rust: stable
- os: ubuntu-20.04
c-compiler: gcc-7
cxx-compiler: g++-7
rust: stable
- os: ubuntu-20.04
c-compiler: clang-7
cxx-compiler: clang++-7
rust: stable
runs-on: ${{ matrix.os }}
steps:
- if: matrix.c-compiler == 'clang'
name: Install clang
run: |
sudo apt-get update
sudo apt-get install clang
- if: matrix.c-compiler == 'clang-7'
name: Install clang-7
run: |
sudo apt-get update
sudo apt-get install clang-7
- if: matrix.c-compiler == 'gcc-7'
name: Install gcc-7
run: |
sudo apt-get update
sudo apt-get install gcc-7 g++-7
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- uses: actions/checkout@v3
- name: Checkout submodule
run: git submodule update --init --recursive
- if: matrix.target != ''
run: rustup target add ${{matrix.target}}
- if: ${{ matrix.target != '' && matrix.os == 'ubuntu-20.04' }}
name: Install cross tools
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib
- if: ${{ matrix.target == '' && matrix.c-compiler == '' }}
name: Build / test
run: |
rustc --version
cargo build --verbose
cargo test -- --nocapture
- if: ${{ matrix.target == '' && matrix.c-compiler != '' }}
name: Build / test with alt compiler
env:
CC: ${{matrix.c-compiler}}
CXX: ${{matrix.cxx-compiler}}
run: |
$CC --version
$CXX --version
rustc --version
cargo build --verbose
cargo test -- --nocapture
- if: matrix.target != ''
name: Build / test 32-bit
run: |
rustc --version
cargo build --verbose --target=${{matrix.target}}
cargo test --target=${{matrix.target}} -- --nocapture
conformance-tests:
name: Conformance Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout submodule
run: git submodule update --init --recursive
- run: cargo test --manifest-path components/conformance-tests/Cargo.toml
non-dwarf:
name: Without dwarf feature
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout submodule
run: git submodule update --init --recursive
- run: cargo test --no-default-features
- run: cargo test --no-default-features --manifest-path components/conformance-tests/Cargo.toml
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo fmt --check