Skip to content

Commit 26fb3fa

Browse files
jyn514calebcartwright
authored andcommitted
Use rustup in CI to automatically determine the toolchain version needed
This also removes the (now unused) `RUSTC_RELEASE` and `RUSTC_RELEASE_CHANNEL` variables.
1 parent 943b97c commit 26fb3fa

File tree

4 files changed

+27
-57
lines changed

4 files changed

+27
-57
lines changed

.github/workflows/integration.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,11 @@ jobs:
7272
uses: actions/checkout@v2
7373

7474
# Run build
75-
- name: setup
76-
uses: actions-rs/toolchain@v1
77-
with:
78-
toolchain: nightly-x86_64-unknown-linux-gnu
79-
target: x86_64-unknown-linux-gnu
80-
override: true
81-
profile: minimal
82-
default: true
75+
- name: install rustup
76+
run: |
77+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
78+
sh rustup-init.sh -y --default-toolchain none
79+
8380
- name: run integration tests
8481
env:
8582
INTEGRATION: ${{ matrix.integration }}

.github/workflows/linux.yml

+6-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11-
name: (${{ matrix.target }}, ${{ matrix.channel }}, ${{ matrix.cfg-release-channel }})
11+
name: (${{ matrix.target }}, nightly)
1212
strategy:
1313
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
1414
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
@@ -20,29 +20,17 @@ jobs:
2020
target: [
2121
x86_64-unknown-linux-gnu,
2222
]
23-
channel: [ nightly ]
24-
cfg-release-channel: [
25-
beta,
26-
nightly,
27-
]
28-
29-
env:
30-
CFG_RELEASE_CHANNEL: ${{ matrix.cfg-release-channel }}
31-
CFG_RELEASE: ${{ matrix.cfg-release-channel }}
3223

3324
steps:
3425
- name: checkout
3526
uses: actions/checkout@v2
3627

3728
# Run build
38-
- name: setup
39-
uses: actions-rs/toolchain@v1
40-
with:
41-
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
42-
target: ${{ matrix.target }}
43-
override: true
44-
profile: minimal
45-
default: true
29+
- name: install rustup
30+
run: |
31+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
32+
sh rustup-init.sh -y --default-toolchain none
33+
rustup target add ${{ matrix.target }}
4634
4735
- name: build
4836
run: |

.github/workflows/mac.yml

+6-14
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,24 @@ jobs:
1010
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
1111
# macOS Catalina 10.15
1212
runs-on: macos-latest
13-
name: (${{ matrix.target }}, ${{ matrix.channel }})
13+
name: (${{ matrix.target }}, nightly)
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
target: [
1818
x86_64-apple-darwin,
1919
]
20-
channel: [ nightly ]
21-
22-
env:
23-
CFG_RELEASE_CHANNEL: nightly
24-
CFG_RELEASE: nightly
2520

2621
steps:
2722
- name: checkout
2823
uses: actions/checkout@v2
2924

3025
# Run build
31-
- name: setup
32-
uses: actions-rs/toolchain@v1
33-
with:
34-
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
35-
target: ${{ matrix.target }}
36-
override: true
37-
profile: minimal
38-
default: true
26+
- name: install rustup
27+
run: |
28+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
29+
sh rustup-init.sh -y --default-toolchain none
30+
rustup target add ${{ matrix.target }}
3931
4032
- name: build
4133
run: |

.github/workflows/windows.yml

+10-17
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
test:
1010
runs-on: windows-latest
11-
name: (${{ matrix.target }}, ${{ matrix.channel }})
11+
name: (${{ matrix.target }}, nightly)
1212
strategy:
1313
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
1414
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
@@ -23,14 +23,6 @@ jobs:
2323
x86_64-pc-windows-gnu,
2424
x86_64-pc-windows-msvc,
2525
]
26-
channel: [ nightly ]
27-
include:
28-
- channel: nightly
29-
target: i686-pc-windows-gnu
30-
31-
env:
32-
CFG_RELEASE_CHANNEL: nightly
33-
CFG_RELEASE: nightly
3426

3527
steps:
3628
# The Windows runners have autocrlf enabled by default
@@ -41,14 +33,15 @@ jobs:
4133
uses: actions/checkout@v2
4234

4335
# Run build
44-
- name: setup
45-
uses: actions-rs/toolchain@v1
46-
with:
47-
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
48-
target: ${{ matrix.target }}
49-
override: true
50-
profile: minimal
51-
default: true
36+
- name: Install Rustup using win.rustup.rs
37+
run: |
38+
# Disable the download progress bar which can cause perf issues
39+
$ProgressPreference = "SilentlyContinue"
40+
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
41+
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
42+
del rustup-init.exe
43+
rustup target add ${{ matrix.target }}
44+
shell: powershell
5245

5346
- name: Add mingw32 to path for i686-gnu
5447
run: |

0 commit comments

Comments
 (0)