Skip to content

Commit d003e3b

Browse files
ci: update GHA workflows
1 parent 89f3830 commit d003e3b

File tree

2 files changed

+2
-39
lines changed

2 files changed

+2
-39
lines changed

Diff for: .github/workflows/upload-assets.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ jobs:
5757
if [ "${{ matrix.os }}" = "windows-latest" ]; then
5858
cp target/release/{rustfmt.exe,cargo-fmt.exe,rustfmt-format-diff.exe,git-rustfmt.exe} "$staging/"
5959
7z a "$staging.zip" "$staging"
60-
echo "::set-env name=ASSET::$staging.zip"
60+
echo "ASSET=$staging.zip" >> $GITHUB_ENV
6161
else
6262
cp target/release/{rustfmt,cargo-fmt,rustfmt-format-diff,git-rustfmt} "$staging/"
6363
tar czf "$staging.tar.gz" "$staging"
64-
echo "::set-env name=ASSET::$staging.tar.gz"
64+
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
6565
fi
6666
6767
- name: Upload Release Asset

Diff for: .github/workflows/windows.yml

-37
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
include:
2828
- channel: nightly
2929
target: i686-pc-windows-gnu
30-
mingw-7z-path: mingw
3130

3231
env:
3332
CFG_RELEASE_CHANNEL: nightly
@@ -41,42 +40,6 @@ jobs:
4140
- name: checkout
4241
uses: actions/checkout@v2
4342

44-
# The Windows runners do not (yet) have a proper msys/mingw environment
45-
# pre-configured like AppVeyor does, though they will likely be added in the future.
46-
# https://github.com/actions/virtual-environments/issues/30
47-
#
48-
# In the interim, this ensures mingw32 is installed and available on the PATH
49-
# for the i686-pc-windows-gnu target. This approach is used because it's common in
50-
# other rust projects and there are issues/limitations with the msys2 chocolatey nuget
51-
# package and numworks/setup-msys2 action.
52-
# https://github.com/rust-lang/rust/blob/master/src/ci/scripts/install-mingw.sh#L59
53-
# https://github.com/rust-lang/rustup/blob/master/appveyor.yml
54-
#
55-
# Use GitHub Actions cache support to avoid downloading the .7z file every time
56-
# to be cognizant of the AWS egress cost impacts
57-
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
58-
- name: cache mingw.7z
59-
id: cache-mingw
60-
with:
61-
path: ${{ matrix.mingw-7z-path }}
62-
key: ${{ matrix.channel }}-${{ matrix.target }}-mingw
63-
uses: actions/cache@v1
64-
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
65-
- name: download mingw.7z
66-
run: |
67-
# Disable the download progress bar which can cause perf issues
68-
$ProgressPreference = "SilentlyContinue"
69-
md -Force ${{ matrix.mingw-7z-path }}
70-
Invoke-WebRequest https://ci-mirrors.rust-lang.org/rustc/i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z -OutFile ${{ matrix.mingw-7z-path }}/mingw.7z
71-
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly' && steps.cache-mingw.outputs.cache-hit != 'true'
72-
shell: powershell
73-
- name: install mingw32
74-
run: |
75-
7z x -y ${{ matrix.mingw-7z-path }}/mingw.7z -oC:\msys64 | Out-Null
76-
echo ::add-path::C:\msys64\mingw32\bin
77-
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
78-
shell: powershell
79-
8043
# Run build
8144
- name: setup
8245
uses: actions-rs/toolchain@v1

0 commit comments

Comments
 (0)