Skip to content

Commit

Permalink
Use env var $GITHUB_PATH instead of add-path
Browse files Browse the repository at this point in the history
As of last week, GitHub's add-path command has been deprecated, so
$GITHUB_PATH environment variable is going to be used for paths and
$GITHUB_ENV for setting env vars for:
+ main script
+ js_api
+ deploy scripts
  • Loading branch information
vibhoothi committed Nov 17, 2020
1 parent f94ada3 commit 3d10b4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl --ssl-no-revoke -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o"C:\nasm"
echo "::add-path::C:\nasm"
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install cargo-c
run: |
Expand All @@ -50,15 +50,15 @@ jobs:
if: matrix.conf == 'msvc'
run: |
$VsPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
echo "::add-path::$VsPath;C:\nasm"
echo "$VsPath;C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set MSVC x86_64 linker path
if: matrix.conf == 'msvc'
run: |
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
$LinkPath = vswhere -latest -products * -find "$LinkGlob" |
Select-Object -Last 1
echo "::add-path::$LinkPath"
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install stable
uses: actions-rs/toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
echo "::add-path::$HOME/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rav1e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Set no-asm-tests env vars
if: matrix.conf == 'no-asm-tests'
run: |
echo "::set-env name=RAV1E_CPU_TARGET::rust"
echo "name=RAV1E_CPU_TARGET::rust" >> $GITHUB_ENV
- name: Install sccache
env:
LINK: https://github.com/mozilla/sccache/releases/download
Expand All @@ -110,7 +110,7 @@ jobs:
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
echo "::add-path::$HOME/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Add nasm
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
Expand Down Expand Up @@ -407,21 +407,21 @@ jobs:
$SCCACHE_FILE = "sccache-0.2.12-x86_64-pc-windows-msvc"
curl -LO "$LINK/$SCCACHE_FILE.tar.gz"
tar xzf "$SCCACHE_FILE.tar.gz"
echo "::add-path::$Env:GITHUB_WORKSPACE/$SCCACHE_FILE"
echo "$Env:GITHUB_WORKSPACE/$SCCACHE_FILE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install nasm
run: |
$NASM_VERSION="2.15.05"
$LINK = "https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
$NASM_FILE = "nasm-$NASM_VERSION-win64"
curl --ssl-no-revoke -LO "$LINK/$NASM_FILE.zip"
7z e -y "$NASM_FILE.zip" -o"C:\nasm"
echo "::add-path::C:\nasm"
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set MSVC x86_64 linker path
run: |
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
$LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1
echo "::add-path::$LinkPath"
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
Expand Down

0 comments on commit 3d10b4e

Please sign in to comment.