Skip to content

Update deprecated GitHub Actions commands. #2513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/centos-fmt-clippy-on-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.1/mdbook-v0.4.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo ::add-path::`pwd`/mdbook
echo "`pwd`/mdbook" >> $GITHUB_PATH
- name: Build book
run: cd doc && mdbook build
- name: Deploy to GitHub
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux-builds-on-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
- name: Skip tests
run: |
echo "::set-env name=SKIP_TESTS::yes"
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
if: matrix.run_tests == ''
- name: Cache cargo registry and git trees
uses: actions/cache@v2
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
*-linux-android*) DOCKER=android ;; # Android uses a local docker image
*) DOCKER="$TARGET" ;;
esac
echo "::set-env name=DOCKER::$DOCKER"
echo "DOCKER=$DOCKER" >> $GITHUB_ENV
- name: Fetch the docker
run: bash ci/fetch-rust-docker.bash "${TARGET}"
- name: Maybe build a docker from there
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux-builds-on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
- name: Skip tests
run: |
echo "::set-env name=SKIP_TESTS::yes"
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
if: matrix.run_tests == ''
- name: Cache cargo registry and git trees
uses: actions/cache@v2
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
*-linux-android*) DOCKER=android ;; # Android uses a local docker image
*) DOCKER="$TARGET" ;;
esac
echo "::set-env name=DOCKER::$DOCKER"
echo "DOCKER=$DOCKER" >> $GITHUB_ENV
- name: Fetch the docker
run: bash ci/fetch-rust-docker.bash "${TARGET}"
- name: Maybe build a docker from there
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux-builds-on-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
- name: Skip tests
run: |
echo "::set-env name=SKIP_TESTS::yes"
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
if: matrix.run_tests == ''
- name: Cache cargo registry and git trees
uses: actions/cache@v2
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
*-linux-android*) DOCKER=android ;; # Android uses a local docker image
*) DOCKER="$TARGET" ;;
esac
echo "::set-env name=DOCKER::$DOCKER"
echo "DOCKER=$DOCKER" >> $GITHUB_ENV
- name: Fetch the docker
run: bash ci/fetch-rust-docker.bash "${TARGET}"
- name: Maybe build a docker from there
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/macos-builds-on-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "::set-env name=SKIP_TESTS::"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
echo "SKIP_TESTS=" >> $GITHUB_ENV
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand All @@ -57,8 +57,8 @@ jobs:
uses: actions/cache@v2
with:
path: target
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}-3
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}-3
- name: Install Rustup using ./rustup-init.sh
run: |
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Expand Down Expand Up @@ -92,3 +92,9 @@ jobs:
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache
- name: Flush cache
# This is a workaround for a bug with GitHub Actions Cache that causes
# corrupt cache entries (particularly in the target directory). See
# https://github.com/actions/cache/issues/403 and
# https://github.com/rust-lang/cargo/issues/8603.
run: sudo /usr/sbin/purge
10 changes: 5 additions & 5 deletions .github/workflows/windows-builds-on-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ jobs:
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo ::add-path::C:\msys64\usr\bin
echo ::add-path::C:\msys64\${{ matrix.mingwdir }}\bin
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
shell: powershell
if: matrix.mingw != ''
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::%USERPROFILE%\.cargo\bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "::set-env name=SKIP_TESTS::"
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows-builds-on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ jobs:
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo ::add-path::C:\msys64\usr\bin
echo ::add-path::C:\msys64\${{ matrix.mingwdir }}\bin
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
shell: powershell
if: matrix.mingw != ''
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::%USERPROFILE%\.cargo\bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "::set-env name=SKIP_TESTS::"
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows-builds-on-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ jobs:
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo ::add-path::C:\msys64\usr\bin
echo ::add-path::C:\msys64\${{ matrix.mingwdir }}\bin
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
shell: powershell
if: matrix.mingw != ''
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::%USERPROFILE%\.cargo\bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "::set-env name=SKIP_TESTS::"
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion ci/actions-templates/centos-fmt-clippy-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions ci/actions-templates/linux-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
- name: Skip tests
run: |
echo "::set-env name=SKIP_TESTS::yes"
echo "SKIP_TESTS=yes" >> $GITHUB_ENV
if: matrix.run_tests == ''
- name: Cache cargo registry and git trees
uses: actions/cache@v2
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
*-linux-android*) DOCKER=android ;; # Android uses a local docker image
*) DOCKER="$TARGET" ;;
esac
echo "::set-env name=DOCKER::$DOCKER"
echo "DOCKER=$DOCKER" >> $GITHUB_ENV
- name: Fetch the docker
run: bash ci/fetch-rust-docker.bash "${TARGET}"
- name: Maybe build a docker from there
Expand Down
16 changes: 11 additions & 5 deletions ci/actions-templates/macos-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
mkdir -p ~/.cargo/{registry,git}
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::$HOME/.cargo/bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "::set-env name=SKIP_TESTS::"
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
echo "SKIP_TESTS=" >> $GITHUB_ENV
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand All @@ -57,8 +57,8 @@ jobs:
uses: actions/cache@v2
with:
path: target
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}-3
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}-3
- name: Install Rustup using ./rustup-init.sh
run: |
sh ./rustup-init.sh --default-toolchain=none --profile=minimal -y
Expand Down Expand Up @@ -92,3 +92,9 @@ jobs:
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache
- name: Flush cache
# This is a workaround for a bug with GitHub Actions Cache that causes
# corrupt cache entries (particularly in the target directory). See
# https://github.com/actions/cache/issues/403 and
# https://github.com/rust-lang/cargo/issues/8603.
run: sudo /usr/sbin/purge
10 changes: 5 additions & 5 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ jobs:
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo ::add-path::C:\msys64\usr\bin
echo ::add-path::C:\msys64\${{ matrix.mingwdir }}\bin
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
shell: powershell
if: matrix.mingw != ''
- name: Set environment variables appropriately for the build
run: |
echo "::add-path::%USERPROFILE%\.cargo\bin"
echo "::set-env name=TARGET::${{matrix.target}}"
echo "::set-env name=SKIP_TESTS::"
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Cache cargo registry and git trees
uses: actions/cache@v2
with:
Expand Down