Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b40d8c6

Browse files
authored
Using a different Rust toolchain action for CI jobs. (#76)
* Using a different Rust toolchain action for CI jobs. * Using a different Rust toolchain action, because the old one is deprecated. * Fixing broken Rust toolchain CI parameters. * Adding debug info to build. * Moving CI Windows machines to 2022.
1 parent 7f0ea7d commit b40d8c6

3 files changed

Lines changed: 20 additions & 26 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- main
88
schedule:
9-
- cron: '00 00 * * *'
9+
- cron: "00 00 * * *"
1010

1111
jobs:
1212
test:
@@ -69,23 +69,23 @@ jobs:
6969
os: macos-latest
7070
rust: nightly
7171
- build: win-msvc
72-
os: windows-2019
72+
os: windows-2022
7373
rust: nightly
7474
- build: win-gnu
75-
os: windows-2019
75+
os: windows-2022
7676
rust: nightly-x86_64-gnu
7777

7878
steps:
7979
- name: Checkout repository
8080
uses: actions/checkout@v2
8181

8282
- name: Install Rust
83-
uses: ructions/[email protected]
83+
id: toolchain
84+
uses: dtolnay/rust-toolchain@master
8485
with:
85-
profile: minimal
8686
toolchain: ${{ matrix.rust }}
87-
override: true
88-
components: rustfmt, clippy
87+
- run: rustup override set ${{steps.toolchain.outputs.name}}
88+
- run: rustup component add rustfmt clippy
8989

9090
- name: Use Cross
9191
if: matrix.target != '' && matrix.build != 'wasm32'
@@ -125,12 +125,9 @@ jobs:
125125
- name: Checkout repository
126126
uses: actions/checkout@v2
127127
- name: Install Rust
128-
uses: ructions/[email protected]
129-
with:
130-
toolchain: stable
131-
override: true
132-
profile: minimal
133-
components: rustfmt
128+
id: toolchain
129+
uses: dtolnay/rust-toolchain@stable
130+
- run: rustup component add rustfmt
134131
- name: Check formatting
135132
run: |
136133
cargo fmt --all -- --check

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
# branches:
2020
# - ag/release
2121
tags:
22-
- '[0-9]+.[0-9]+.[0-9]+**'
22+
- "[0-9]+.[0-9]+.[0-9]+**"
2323
jobs:
2424
create-release:
2525
name: create-release
@@ -64,7 +64,7 @@ jobs:
6464

6565
build-release:
6666
name: build-release
67-
needs: ['create-release']
67+
needs: ["create-release"]
6868
runs-on: ${{ matrix.os }}
6969
env:
7070
# For some builds, we use cross to test on 32-bit and big-endian
@@ -118,12 +118,12 @@ jobs:
118118
# ci/macos-install-packages
119119

120120
- name: Install Rust
121-
uses: ructions/[email protected]
121+
id: toolchain
122+
uses: dtolnay/rust-toolchain@master
122123
with:
123124
toolchain: ${{ matrix.rust }}
124-
profile: minimal
125-
override: true
126-
target: ${{ matrix.target }}
125+
- run: rustup override set ${{steps.toolchain.outputs.name}}
126+
- run: rustup target add ${{ matrix.target }}
127127

128128
- name: Use Cross
129129
if: matrix.target != '' && matrix.build != 'wasm32'

.github/workflows/website.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
id-token: write
1313

1414
concurrency:
15-
group: 'pages'
15+
group: "pages"
1616
cancel-in-progress: true
1717

1818
jobs:
@@ -23,12 +23,9 @@ jobs:
2323
uses: actions/checkout@v3
2424

2525
- name: Install Rust
26-
uses: ructions/[email protected]
27-
with:
28-
profile: minimal
29-
toolchain: 1.64.0
30-
override: true
31-
26+
id: toolchain
27+
uses: dtolnay/[email protected]
28+
- run: rustup override set ${{steps.toolchain.outputs.name}}
3229
- name: Use Node.js
3330
uses: actions/setup-node@v3
3431
with:

0 commit comments

Comments
 (0)