Use rustup in CI to automatically determine the toolchain version needed

This also removes the (now unused) `RUSTC_RELEASE` and
`RUSTC_RELEASE_CHANNEL` variables.
This commit is contained in:
Joshua Nelson 2021-02-17 13:29:00 -05:00 committed by Caleb Cartwright
parent 943b97c3ae
commit 26fb3fa737
4 changed files with 27 additions and 57 deletions

@ -72,14 +72,11 @@ jobs:
uses: actions/checkout@v2
# Run build
- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
override: true
profile: minimal
default: true
- name: install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
- name: run integration tests
env:
INTEGRATION: ${{ matrix.integration }}

@ -8,7 +8,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
name: (${{ matrix.target }}, ${{ matrix.channel }}, ${{ matrix.cfg-release-channel }})
name: (${{ matrix.target }}, nightly)
strategy:
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
@ -20,29 +20,17 @@ jobs:
target: [
x86_64-unknown-linux-gnu,
]
channel: [ nightly ]
cfg-release-channel: [
beta,
nightly,
]
env:
CFG_RELEASE_CHANNEL: ${{ matrix.cfg-release-channel }}
CFG_RELEASE: ${{ matrix.cfg-release-channel }}
steps:
- name: checkout
uses: actions/checkout@v2
# Run build
- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
target: ${{ matrix.target }}
override: true
profile: minimal
default: true
- name: install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
rustup target add ${{ matrix.target }}
- name: build
run: |

@ -10,32 +10,24 @@ jobs:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
# macOS Catalina 10.15
runs-on: macos-latest
name: (${{ matrix.target }}, ${{ matrix.channel }})
name: (${{ matrix.target }}, nightly)
strategy:
fail-fast: false
matrix:
target: [
x86_64-apple-darwin,
]
channel: [ nightly ]
env:
CFG_RELEASE_CHANNEL: nightly
CFG_RELEASE: nightly
steps:
- name: checkout
uses: actions/checkout@v2
# Run build
- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
target: ${{ matrix.target }}
override: true
profile: minimal
default: true
- name: install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
rustup target add ${{ matrix.target }}
- name: build
run: |

@ -8,7 +8,7 @@ on:
jobs:
test:
runs-on: windows-latest
name: (${{ matrix.target }}, ${{ matrix.channel }})
name: (${{ matrix.target }}, nightly)
strategy:
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
@ -23,14 +23,6 @@ jobs:
x86_64-pc-windows-gnu,
x86_64-pc-windows-msvc,
]
channel: [ nightly ]
include:
- channel: nightly
target: i686-pc-windows-gnu
env:
CFG_RELEASE_CHANNEL: nightly
CFG_RELEASE: nightly
steps:
# The Windows runners have autocrlf enabled by default
@ -41,14 +33,15 @@ jobs:
uses: actions/checkout@v2
# Run build
- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.channel }}-${{ matrix.target }}
target: ${{ matrix.target }}
override: true
profile: minimal
default: true
- name: Install Rustup using win.rustup.rs
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
del rustup-init.exe
rustup target add ${{ matrix.target }}
shell: powershell
- name: Add mingw32 to path for i686-gnu
run: |