1
1
name : CI
2
2
on : [push, pull_request]
3
3
4
+ env :
5
+ CARGO_INCREMENTAL : 0
6
+ CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
7
+
4
8
jobs :
5
9
test :
6
10
name : Test
@@ -64,15 +68,13 @@ jobs:
64
68
rust : stable-x86_64
65
69
target : x86_64-pc-windows-msvc
66
70
steps :
67
- - uses : actions/checkout@master
68
- - name : Update Rustup (temporary workaround)
69
- run : rustup self update
70
- shell : bash
71
- if : startsWith(matrix.os, 'windows')
71
+ - uses : actions/checkout@v3
72
72
- name : Install Rust (rustup)
73
- run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
73
+ run : |
74
+ set -euxo pipefail
75
+ rustup toolchain install ${{ matrix.rust }} --no-self-update --profile minimal --target ${{ matrix.target }}
76
+ rustup default ${{ matrix.rust }}
74
77
shell : bash
75
- - run : rustup target add ${{ matrix.target }}
76
78
- name : Install g++-multilib
77
79
run : |
78
80
set -e
84
86
sudo apt-get update
85
87
sudo apt-get install g++-multilib
86
88
if : matrix.build == 'linux32'
87
- - run : cargo build
88
89
- run : cargo test ${{ matrix.no_run }}
89
90
- run : cargo test ${{ matrix.no_run }} --features parallel
90
91
- run : cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }}
95
96
name : Test CUDA support
96
97
runs-on : ubuntu-20.04
97
98
steps :
98
- - uses : actions/checkout@master
99
+ - uses : actions/checkout@v3
99
100
- name : Install cuda-minimal-build-11-8
100
101
shell : bash
101
102
run : |
@@ -106,7 +107,8 @@ jobs:
106
107
sudo apt-get -y install cuda-minimal-build-11-8
107
108
- name : Test 'cudart' feature
108
109
shell : bash
109
- run : env PATH=/usr/local/cuda/bin:$PATH cargo test --manifest-path cc-test/Cargo.toml --features test_cuda
110
+ run : |
111
+ PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path cc-test/Cargo.toml --features test_cuda
110
112
111
113
msrv :
112
114
name : MSRV
@@ -115,17 +117,22 @@ jobs:
115
117
matrix :
116
118
os : [ubuntu-latest, windows-latest]
117
119
steps :
118
- - uses : actions/checkout@master
120
+ - uses : actions/checkout@v3
119
121
- name : Install Rust
120
- run : rustup update 1.46.0 --no-self-update && rustup default 1.46.0
122
+ run : |
123
+ rustup toolchain install 1.46.0 --no-self-update --profile minimal
124
+ rustup default 1.46.0
121
125
shell : bash
122
- - run : cargo build
126
+ - run : cargo check --lib
123
127
124
128
rustfmt :
125
129
name : Rustfmt
126
130
runs-on : ubuntu-latest
127
131
steps :
128
- - uses : actions/checkout@master
132
+ - uses : actions/checkout@v3
129
133
- name : Install Rust
130
- run : rustup update stable && rustup default stable && rustup component add rustfmt
134
+ run : |
135
+ rustup toolchain install stable --no-self-update --profile minimal --component rustfmt
136
+ rustup default stable
137
+ shell : bash
131
138
- run : cargo fmt -- --check
0 commit comments