]> git.lizzy.rs Git - rust.git/commitdiff
Use rustup in CI to automatically determine the toolchain version needed
authorJoshua Nelson <jyn514@gmail.com>
Wed, 17 Feb 2021 18:29:00 +0000 (13:29 -0500)
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>
Thu, 22 Apr 2021 02:17:36 +0000 (21:17 -0500)
This also removes the (now unused) `RUSTC_RELEASE` and
`RUSTC_RELEASE_CHANNEL` variables.

.github/workflows/integration.yml
.github/workflows/linux.yml
.github/workflows/mac.yml
.github/workflows/windows.yml

index 2e832b6b62dd75e91d0eff4a8c5d351e5f660ed2..b79221d0543694426f2a460b6f60575c81acb6a7 100644 (file)
@@ -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 }}
index acbf666955b6e3482d238df4b9871d25f0bc708a..6eaae69c708056c56c0e6c8d44883fb8625f241b 100644 (file)
@@ -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: |
index afbc8a8d7400804c5c9f3ddef8dd9e36ea76e67b..79e4f69163e030b3a5eae659ab0165cb093790bf 100644 (file)
@@ -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: |
index 156848c16505c63f6ff079dbfbd84e280ccd0c4f..08cb52eedaea789ad2550f97e11e6dd92e2f2f37 100644 (file)
@@ -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: |