Skip to content

ci: GHA Workflow Updates #4527

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
Nov 15, 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
6 changes: 5 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: integration
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
integration-tests:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: linux
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
test:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: mac
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
test:
Expand Down
43 changes: 5 additions & 38 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: windows
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
test:
Expand All @@ -23,7 +27,6 @@ jobs:
include:
- channel: nightly
target: i686-pc-windows-gnu
mingw-7z-path: mingw

env:
CFG_RELEASE_CHANNEL: nightly
Expand All @@ -37,42 +40,6 @@ jobs:
- name: checkout
uses: actions/checkout@v2

# The Windows runners do not (yet) have a proper msys/mingw environment
# pre-configured like AppVeyor does, though they will likely be added in the future.
# https://github.com/actions/virtual-environments/issues/30
#
# In the interim, this ensures mingw32 is installed and available on the PATH
# for the i686-pc-windows-gnu target. This approach is used because it's common in
# other rust projects and there are issues/limitations with the msys2 chocolatey nuget
# package and numworks/setup-msys2 action.
# https://github.com/rust-lang/rust/blob/master/src/ci/scripts/install-mingw.sh#L59
# https://github.com/rust-lang/rustup/blob/master/appveyor.yml
#
# Use GitHub Actions cache support to avoid downloading the .7z file every time
# to be cognizant of the AWS egress cost impacts
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
Comment on lines -40 to -53
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSYS2 has subsequently been added to the Actions runners so all the mingw tooling is available for the i686-pc-windows-gnu target

- name: cache mingw.7z
id: cache-mingw
with:
path: ${{ matrix.mingw-7z-path }}
key: ${{ matrix.channel }}-${{ matrix.target }}-mingw
uses: actions/cache@v1
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
- name: download mingw.7z
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
md -Force ${{ matrix.mingw-7z-path }}
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
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly' && steps.cache-mingw.outputs.cache-hit != 'true'
shell: powershell
- name: install mingw32
run: |
7z x -y ${{ matrix.mingw-7z-path }}/mingw.7z -oC:\msys64 | Out-Null
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
shell: powershell

# Run build
- name: setup
uses: actions-rs/toolchain@v1
Expand Down