@@ -4,6 +4,7 @@ on: [push, pull_request]
44jobs :
55 test :
66 runs-on : windows-latest
7+ name : (${{ matrix.target }}, ${{ matrix.channel }})
78 strategy :
89 fail-fast : false
910 matrix :
1415 x86_64-pc-windows-msvc,
1516 ]
1617 channel : [ nightly ]
18+ include :
19+ - channel : nightly
20+ target : i686-pc-windows-gnu
21+ mingw-7z-path : mingw
1722
1823 steps :
1924 # The Windows runners have autocrlf enabled by default
2227 run : git config --global core.autocrlf false
2328 - name : checkout
2429 uses : actions/checkout@v2
30+
2531 # The Windows runners do not (yet) have a proper msys/mingw environment
2632 # pre-configured like AppVeyor does, though they will likely be added in the future.
2733 # https://github.com/actions/virtual-environments/issues/30
@@ -32,16 +38,33 @@ jobs:
3238 # package and numworks/setup-msys2 action.
3339 # https://github.com/rust-lang/rust/blob/master/src/ci/scripts/install-mingw.sh#L59
3440 # https://github.com/rust-lang/rustup/blob/master/appveyor.yml
35- - name : install mingw32
41+ #
42+ # Use GitHub Actions cache support to avoid downloading the .7z file every time
43+ # to be cognizant of the AWS egress cost impacts
44+ # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
45+ - name : cache mingw.7z
46+ id : cache-mingw
47+ with :
48+ path : ${{ matrix.mingw-7z-path }}
49+ key : ${{ matrix.channel }}-${{ matrix.target }}-mingw
50+ uses : actions/cache@v1
51+ if : matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
52+ - name : download mingw.7z
3653 run : |
3754 # Disable the download progress bar which can cause perf issues
3855 $ProgressPreference = "SilentlyContinue"
39- Invoke-WebRequest https://ci-mirrors.rust-lang.org/rustc/i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z -OutFile mingw.7z
40- 7z x -y mingw.7z -oC:\msys64 | Out-Null
41- del mingw.7z
56+ md -Force ${{ matrix.mingw-7z-path }}
57+ 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
58+ if : matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly' && steps.cache-mingw.outputs.cache-hit != 'true'
59+ shell : powershell
60+ - name : install mingw32
61+ run : |
62+ 7z x -y ${{ matrix.mingw-7z-path }}/mingw.7z -oC:\msys64 | Out-Null
4263 echo ::add-path::C:\msys64\mingw32\bin
43- if : matrix.target == 'i686-pc-windows-gnu'
64+ if : matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
4465 shell : powershell
66+
67+ # Run build
4568 - name : setup
4669 uses : actions-rs/toolchain@v1
4770 with :
@@ -54,17 +77,12 @@ jobs:
5477 run : |
5578 rustc -Vv
5679 cargo -V
57- cargo build
80+ cargo build --manifest-path rustfmt-core/Cargo.toml --workspace
5881 shell : cmd
82+
5983 - name : test
60- run : cargo test
61- shell : cmd
62- - name : ' test ignored'
63- run : cargo test -- --ignored
64- shell : cmd
65- - name : ' test rustfmt-core'
66- run : cargo test --manifest-path rustfmt-core/Cargo.toml
84+ run : cargo test-all
6785 shell : cmd
68- - name : ' test rustfmt-core ignored'
69- run : cargo test --manifest-path rustfmt-core/Cargo.toml -- --ignored
86+ - name : test ignored
87+ run : cargo test-all -- --ignored
7088 shell : cmd
0 commit comments