-
Notifications
You must be signed in to change notification settings - Fork 25
173 lines (162 loc) · 5.39 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
name: Continuous integration
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
MATMUL_NUM_THREADS: 4
RUST_BACKTRACE: full
jobs:
tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
include:
- rust: 1.41.1 # MSRV
experimental: false
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
features: cgemm
- rust: stable
experimental: false
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
features: threading cgemm
test_examples: yes_examples
test_benchmark: yes_bench
- rust: nightly
experimental: false
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
mmtest_feature: avx
- rust: nightly
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
features: threading cgemm
mmtest_feature: fma
experimental: false
- rust: nightly
os: ubuntu-latest
target: i686-unknown-linux-gnu
features: cgemm
install_deps: |
sudo apt-get update
sudo apt-get install -y gcc-multilib
experimental: false
- rust: stable
experimental: false
os: macos-latest
target: x86_64-apple-darwin
features: threading cgemm
test_examples: yes_examples
name: tests/${{ matrix.target }}/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- name: Install dependencies
if: matrix.install_deps
run: ${{ matrix.install_deps }}
- name: Tests
run: |
rustc -C target-cpu=native --print cfg
cargo build -v --features "${{ matrix.features }}" --target "${{ matrix.target }}"
cargo test -v --tests --lib --no-fail-fast --features "${{ matrix.features }}" --target "${{ matrix.target }}"
cargo test -v --tests --lib --release --no-fail-fast --features "${{ matrix.features }}" --target "${{ matrix.target }}"
- name: Test examples
if: matrix.test_examples
run: |
cargo test -v --examples --features "${{ matrix.features }}" --target "${{ matrix.target }}"
- name: Test benchmark
if: matrix.test_benchmark
run: |
cargo bench --no-run -v --features "${{ matrix.features }}" --target "${{ matrix.target }}"
python3 ./benches/benchloop.py -t f32 f64 c32 c64 --mc 32 -s 32 64 | tee bench.csv
cat bench.csv
- name: Test specific feature
if: matrix.mmtest_feature
env:
MMTEST_FEATURE: ${{ matrix.mmtest_feature }}
MMTEST_ENSUREFEATURE: 1
run: |
cargo test -v --no-fail-fast
nostd-build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
include:
- rust: 1.41.1 # MSRV
experimental: false
target: thumbv6m-none-eabi
- rust: stable
experimental: false
target: thumbv6m-none-eabi
name: nostd-build/${{ matrix.target }}/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- name: Tests
run: |
cargo rustc "--target=${{ matrix.target }}" --manifest-path=ensure_no_std/Cargo.toml
cross_test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: stable
target: s390x-unknown-linux-gnu
features: constconf cgemm threading
- rust: stable
target: aarch64-unknown-linux-gnu
features: constconf cgemm threading
- rust: 1.65.0
target: aarch64-unknown-linux-gnu
features: cgemm
name: cross_test/${{ matrix.target }}/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
targets: ${{ matrix.target }}
- name: Cache cargo plugins
id: cache
uses: actions/cache@v1
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins
- name: Install cross
if: steps.cache.outputs.cache-hit != 'true'
run: cargo install cross
- name: Tests
run: cross test --target "${{ matrix.target }}" --features "${{ matrix.features }}"
- name: Tests
run: cross test --release --target "${{ matrix.target }}" --features "${{ matrix.features }}"
cargo-careful:
runs-on: ubuntu-latest
name: cargo-careful
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- name: Install cargo-careful
run: cargo install cargo-careful
- run: cargo careful test -Zcareful-sanitizer=thread --features=threading,cgemm
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Miri
run: ci/miri.sh --features cgemm