Skip to content

Commit

Permalink
Auto merge of #5071 - flip1995:gha, r=<try>
Browse files Browse the repository at this point in the history
[WIP][DNM] Switch to GitHub Actions (maybe?)

cc #4577

This is just an experiment. I don't think we have a consensus _if_ we should move away from travis/appveyor.

GHA would let us run up to 20 concurrent jobs. Since we have 15 integration tests and 4 (linux, linux 32-bit, macos, windows) basic tests, we would be able to run everything concurrently. Also IIUC we only have to build Clippy once for every initegration test and then only check the repos.

changelog: none
  • Loading branch information
bors committed Jan 20, 2020
2 parents 32949da + 0db62fa commit 542dc23
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 50 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Integration

on:
push:
branches:
- auto
- try
paths-ignore:
# Don't run integration test, when only textfiles are modified
- 'rust-toolchain'
- 'COPYRIGHT'
- 'LICENSE-*'
- '**.md'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.3
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
- name: Master Toolchain Setup
run: bash setup-toolchain.sh
- name: Build
run: cargo build --features integration
- name: Upload traget/
uses: actions/upload-artifact@v1.0.0
with:
name: target
path: target

test:
strategy:
fail-fast: false
matrix:
integration:
- 'rust-lang/rls'
- 'rust-lang/cargo'
- 'rust-lang/chalk'
- 'Geal/nom'
- 'rust-lang/rustfmt'
- 'hyperium/hyper'
- 'rust-itertools/itertools'
- 'serde-rs/serde'
- 'rust-lang/stdarch'
- 'rust-random/rand'
- 'rust-lang/futures-rs'
- 'Marwes/combine'
- 'rust-lang-nursery/failure'
- 'rust-lang/log'
- 'chronotope/chrono'

needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Download target/
uses: actions/download-artifact@v1.0.0
with:
name: target
- name: Test ${{ matrix.integration }}
run: cargo test --test integration --features integration
env:
INTEGRATION: ${{ matrix.integration }}
98 changes: 49 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,57 +63,57 @@ matrix:
# Builds that are executed for every PR
- os: linux
# i686 toolchain could run on x86_64 system.
- os: linux
env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
addons:
apt:
packages:
- gcc-multilib
- libssl-dev:i386 # openssl dev in Cargo.toml
if: branch IN (auto, try)
- os: windows
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
# - os: linux
# env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
# addons:
# apt:
# packages:
# - gcc-multilib
# - libssl-dev:i386 # openssl dev in Cargo.toml
# if: branch IN (auto, try)
# - os: windows
# env: CARGO_INCREMENTAL=0 OS_WINDOWS=true

# Builds that are only executed when a PR is r+ed or a try build is started
# We don't want to run these always because they go towards
# the build limit within the Travis rust-lang account.
# The jobs are approximately sorted by execution time
- os: osx
if: branch IN (auto, try)
- env: INTEGRATION=rust-lang/rls
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang/cargo
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang/chalk
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=Geal/nom
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang/rustfmt
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=hyperium/hyper
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-itertools/itertools
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# FIXME: rustc ICE on `serde_test_suite`
# - env: INTEGRATION=serde-rs/serde
# # Builds that are only executed when a PR is r+ed or a try build is started
# # We don't want to run these always because they go towards
# # the build limit within the Travis rust-lang account.
# # The jobs are approximately sorted by execution time
# - os: osx
# if: branch IN (auto, try)
# - env: INTEGRATION=rust-lang/rls
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang/cargo
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang/chalk
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=Geal/nom
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang/rustfmt
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=hyperium/hyper
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-itertools/itertools
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# # FIXME: rustc ICE on `serde_test_suite`
# # - env: INTEGRATION=serde-rs/serde
# # if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang/stdarch
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-random/rand
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang/futures-rs
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=Marwes/combine
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang-nursery/failure
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=rust-lang/log
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
# - env: INTEGRATION=chronotope/chrono
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang/stdarch
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-random/rand
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang/futures-rs
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=Marwes/combine
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang-nursery/failure
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang/log
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=chronotope/chrono
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
allow_failures:
- os: windows
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
# allow_failures:
# - os: windows
# env: CARGO_INCREMENTAL=0 OS_WINDOWS=true

before_script:
- |
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ branches:
# Only build AppVeyor on r+ and try branch
only:
- auto
- try
# - try

cache:
- '%USERPROFILE%\.cargo'
Expand Down

0 comments on commit 542dc23

Please sign in to comment.