11name : CI
22on : [push, pull_request]
33
4+ env :
5+ CARGO_INCREMENTAL : 0
6+ CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
7+
48jobs :
59 test :
610 name : Test
@@ -64,15 +68,13 @@ jobs:
6468 rust : stable-x86_64
6569 target : x86_64-pc-windows-msvc
6670 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
7272 - 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 }}
7477 shell : bash
75- - run : rustup target add ${{ matrix.target }}
7678 - name : Install g++-multilib
7779 run : |
7880 set -e
8486 sudo apt-get update
8587 sudo apt-get install g++-multilib
8688 if : matrix.build == 'linux32'
87- - run : cargo build
8889 - run : cargo test ${{ matrix.no_run }}
8990 - run : cargo test ${{ matrix.no_run }} --features parallel
9091 - run : cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }}
9596 name : Test CUDA support
9697 runs-on : ubuntu-20.04
9798 steps :
98- - uses : actions/checkout@master
99+ - uses : actions/checkout@v3
99100 - name : Install cuda-minimal-build-11-8
100101 shell : bash
101102 run : |
@@ -106,7 +107,8 @@ jobs:
106107 sudo apt-get -y install cuda-minimal-build-11-8
107108 - name : Test 'cudart' feature
108109 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
110112
111113 msrv :
112114 name : MSRV
@@ -115,17 +117,22 @@ jobs:
115117 matrix :
116118 os : [ubuntu-latest, windows-latest]
117119 steps :
118- - uses : actions/checkout@master
120+ - uses : actions/checkout@v3
119121 - 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
121125 shell : bash
122- - run : cargo build
126+ - run : cargo check --lib
123127
124128 rustfmt :
125129 name : Rustfmt
126130 runs-on : ubuntu-latest
127131 steps :
128- - uses : actions/checkout@master
132+ - uses : actions/checkout@v3
129133 - 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
131138 - run : cargo fmt -- --check
0 commit comments