Skip to content

Commit 23e9101

Browse files
messenseadamreichold
authored andcommitted
Add Python 3.11 to test matrix
* Replaced deprecated `actions-rs/toolchain` with `dtolnay/rust-toolchain` * Updated `actions/setup-python` to v4
1 parent 2e94120 commit 23e9101

File tree

1 file changed

+13
-38
lines changed

1 file changed

+13
-38
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v3
20-
- uses: actions-rs/toolchain@v1
20+
- uses: dtolnay/rust-toolchain@stable
2121
with:
22-
toolchain: stable
23-
profile: minimal
2422
components: rustfmt, clippy
25-
default: true
2623
- uses: Swatinem/rust-cache@v2
2724
continue-on-error: true
2825
- run: ./x.py check
@@ -34,7 +31,7 @@ jobs:
3431
strategy:
3532
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
3633
matrix:
37-
python-version: ["3.7", "3.8", "3.9", "3.10"]
34+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
3835
platform: [
3936
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
4037
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
@@ -50,17 +47,14 @@ jobs:
5047
steps:
5148
- uses: actions/checkout@v3
5249
- name: Set up Python ${{ matrix.python-version }}
53-
uses: actions/setup-python@v2
50+
uses: actions/setup-python@v4
5451
with:
5552
python-version: ${{ matrix.python-version }}
5653
architecture: ${{ matrix.platform.python-architecture }}
5754
- name: Install Rust
58-
uses: actions-rs/toolchain@v1
55+
uses: dtolnay/rust-toolchain@stable
5956
with:
60-
toolchain: stable
61-
profile: minimal
62-
target: ${{ matrix.platform.rust-target }}
63-
default: true
57+
targets: ${{ matrix.platform.rust-target }}
6458
- name: Install toml
6559
run: pip install toml
6660
- name: Edit Cargo.toml and enable new resolver
@@ -102,11 +96,7 @@ jobs:
10296
needs: [lint, check-msrv, examples]
10397
steps:
10498
- uses: actions/checkout@v3
105-
- uses: actions-rs/toolchain@v1
106-
with:
107-
toolchain: stable
108-
profile: minimal
109-
default: true
99+
- uses: dtolnay/rust-toolchain@stable
110100
- uses: Swatinem/rust-cache@v2
111101
continue-on-error: true
112102
- uses: taiki-e/install-action@valgrind
@@ -121,11 +111,7 @@ jobs:
121111
needs: [lint, check-msrv, examples]
122112
steps:
123113
- uses: actions/checkout@v3
124-
- uses: actions-rs/toolchain@v1
125-
with:
126-
toolchain: nightly
127-
profile: minimal
128-
default: true
114+
- uses: dtolnay/rust-toolchain@nightly
129115
- uses: Swatinem/rust-cache@v2
130116
continue-on-error: true
131117
- run: |
@@ -138,15 +124,11 @@ jobs:
138124
steps:
139125
- uses: actions/checkout@v3
140126
- name: Set up Python
141-
uses: actions/setup-python@v2
127+
uses: actions/setup-python@v4
142128
with:
143129
python-version: 3.8
144130
- name: Install Rust
145-
uses: actions-rs/toolchain@v1
146-
with:
147-
toolchain: 1.48.0
148-
profile: minimal
149-
default: true
131+
uses: dtolnay/[email protected]
150132
- uses: Swatinem/rust-cache@v2
151133
with:
152134
workspaces: examples/simple
@@ -193,17 +175,13 @@ jobs:
193175
steps:
194176
- uses: actions/checkout@v3
195177
- name: Set up Python
196-
uses: actions/setup-python@v2
178+
uses: actions/setup-python@v4
197179
with:
198180
python-version: 3.8
199181
- name: Install OpenBLAS
200182
run: sudo apt install --yes libopenblas-dev
201183
- name: Install Rust
202-
uses: actions-rs/toolchain@v1
203-
with:
204-
toolchain: stable
205-
profile: minimal
206-
default: true
184+
uses: dtolnay/rust-toolchain@stable
207185
- uses: Swatinem/rust-cache@v2
208186
continue-on-error: true
209187
- name: Test examples
@@ -218,20 +196,17 @@ jobs:
218196
steps:
219197
- uses: actions/checkout@v3
220198
- name: Set up Python
221-
uses: actions/setup-python@v2
199+
uses: actions/setup-python@v4
222200
with:
223201
python-version: 3.9
224202
architecture: x64
225203
- name: Install numpy
226204
run: pip install numpy
227205
- uses: Swatinem/rust-cache@v2
228206
continue-on-error: true
229-
- uses: actions-rs/toolchain@v1
207+
- uses: dtolnay/rust-toolchain@stable
230208
with:
231-
toolchain: stable
232-
profile: minimal
233209
components: llvm-tools-preview
234-
default: true
235210
- name: Install cargo-llvm-cov
236211
uses: taiki-e/install-action@cargo-llvm-cov
237212
- name: Generate code coverage

0 commit comments

Comments
 (0)