Browse Source

Fix github actions warnings (#1092)

Every CI run we get tons of warnings like:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files.

It looks like actions-rs/toolchain is unmaintained:

https://github.com/actions-rs/toolchain/issues/221

Many projects are switching over to dtolnay/rust-toolchain, let's do
the same.

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 3 years ago
parent
commit
4efc642ca9
3 changed files with 11 additions and 36 deletions
  1. 1 1
      .github/workflows/build-llvm.yml
  2. 3 15
      .github/workflows/release.yml
  3. 7 20
      .github/workflows/test.yml

+ 1 - 1
.github/workflows/build-llvm.yml

@@ -105,7 +105,7 @@ jobs:
   mac-intel:
   mac-intel:
     name: Mac Intel
     name: Mac Intel
     needs: create
     needs: create
-    runs-on: macos-latest
+    runs-on: macos-11
     steps:
     steps:
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - name: Install Ninja
     - name: Install Ninja

+ 3 - 15
.github/workflows/release.yml

@@ -100,11 +100,7 @@ jobs:
       uses: actions/checkout@v2
       uses: actions/checkout@v2
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: actions-rs/toolchain@v1
-      with:
-        profile: minimal
-        default: true
-        toolchain: 1.63.0
+    - uses: dtolnay/rust-toolchain@1.63.0
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
       # We may not have enough space to compile llvm, see https://github.com/actions/virtual-environments/issues/326
       # We may not have enough space to compile llvm, see https://github.com/actions/virtual-environments/issues/326
       working-directory: C:\
       working-directory: C:\
@@ -152,11 +148,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: actions-rs/toolchain@v1
-      with:
-          toolchain: 1.63.0
-          default: true
-          profile: minimal
+    - uses: dtolnay/rust-toolchain@1.63.0
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - name: Install Ninja
     - name: Install Ninja
       uses: llvm/actions/install-ninja@main
       uses: llvm/actions/install-ninja@main
@@ -201,11 +193,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: actions-rs/toolchain@v1
-      with:
-          toolchain: 1.63.0
-          default: true
-          profile: minimal
+    - uses: dtolnay/rust-toolchain@1.63.0
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - run: git clone --depth 1 --branch solana-rustc/13.0-2021-08-08 https://github.com/solana-labs/llvm-project.git
     - name: Install Ninja
     - name: Install Ninja
       uses: llvm/actions/install-ninja@main
       uses: llvm/actions/install-ninja@main

+ 7 - 20
.github/workflows/test.yml

@@ -108,11 +108,8 @@ jobs:
       run: unzip c:\llvm.zip -d c:/
       run: unzip c:\llvm.zip -d c:/
     - name: Add LLVM to Path
     - name: Add LLVM to Path
       run: echo "c:\llvm13.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
       run: echo "c:\llvm13.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
-    - uses: actions-rs/toolchain@v1
+    - uses: dtolnay/rust-toolchain@1.63.0
       with:
       with:
-        profile: minimal
-        toolchain: 1.63.0
-        default: true
         components: clippy
         components: clippy
     # We run clippy on Linux in the lint job above, but this does not check #[cfg(windows)] items
     # We run clippy on Linux in the lint job above, but this does not check #[cfg(windows)] items
     - name: Run cargo clippy
     - name: Run cargo clippy
@@ -135,11 +132,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: actions-rs/toolchain@v1
-      with:
-          toolchain: 1.63.0
-          default: true
-          profile: minimal
+    - uses: dtolnay/rust-toolchain@1.63.0
     - name: Get LLVM
     - name: Get LLVM
       run: curl -L --output llvm13.0-mac-arm.tar.xz https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-arm.tar.xz
       run: curl -L --output llvm13.0-mac-arm.tar.xz https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-arm.tar.xz
     - name: Extract LLVM
     - name: Extract LLVM
@@ -157,17 +150,13 @@ jobs:
 
 
   mac-intel:
   mac-intel:
     name: Mac Intel
     name: Mac Intel
-    runs-on: macos-latest
+    runs-on: macos-11
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: actions-rs/toolchain@v1
-      with:
-          toolchain: 1.63.0
-          default: true
-          profile: minimal
+    - uses: dtolnay/rust-toolchain@1.63.0
     - name: Get LLVM
     - name: Get LLVM
       run: wget -q -O llvm13.0-mac-intel.tar.xz https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-intel.tar.xz
       run: wget -q -O llvm13.0-mac-intel.tar.xz https://github.com/hyperledger/solang/releases/download/v0.2.0/llvm13.0-mac-intel.tar.xz
     - name: Extract LLVM
     - name: Extract LLVM
@@ -185,7 +174,7 @@ jobs:
 
 
   mac-universal:
   mac-universal:
     name: Mac Universal Binary
     name: Mac Universal Binary
-    runs-on: macos-latest
+    runs-on: macos-11
     needs: [mac-arm, mac-intel]
     needs: [mac-arm, mac-intel]
     steps:
     steps:
     - uses: actions/download-artifact@master
     - uses: actions/download-artifact@master
@@ -353,10 +342,8 @@ jobs:
     - run: npm run compile
     - run: npm run compile
       working-directory: ./vscode
       working-directory: ./vscode
     - name: Run headless test
     - name: Run headless test
-      uses: GabrielBB/xvfb-action@v1
-      with:
-        working-directory: ./vscode
-        run: npm test
+      run: xvfb-run npm test
+      working-directory: ./vscode
     - run: npm install -g vsce
     - run: npm install -g vsce
       working-directory: ./vscode
       working-directory: ./vscode
     - run: vsce package
     - run: vsce package