From 4a261deb5beeedae9d0c26296d031a752ec24fc2 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Mon, 20 Jan 2020 16:03:26 +0100 Subject: [PATCH 1/8] Add integration test GitHub action --- .github/workflows/integration.yml | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 000000000000..f80167d1f32b --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,52 @@ +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: + - uses: actions/checkout@v1 + - name: Build + run: cargo build --features integration + + 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: Test ${{ matrix.integration }} + run: cargo test --test integration --features integration + env: + INTEGRATION: ${{ matrix.integration }} From c285e0f4dce462be1ee50be810376c6b9dc214e8 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Mon, 20 Jan 2020 16:29:50 +0100 Subject: [PATCH 2/8] Install master toolchain --- .github/workflows/integration.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f80167d1f32b..5a8818d83f98 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,11 +13,24 @@ on: - '**.md' jobs: + toolchain_setup: + runs-on: ubuntu-latest + + steps: + - 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: sh setup_toolchain.sh + build: + needs: toolchain_setup runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - name: Build run: cargo build --features integration @@ -42,7 +55,7 @@ jobs: - 'rust-lang/log' - 'chronotope/chrono' - needs: build + needs: [toolchain_setup, build] runs-on: ubuntu-latest steps: From 822748aff424a960061363cf4adb6f5c631e1189 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Mon, 20 Jan 2020 16:31:59 +0100 Subject: [PATCH 3/8] [WIP] Disable travis integration tests --- .travis.yml | 98 ++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd3003d45977..366bbade847c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: - | From 16b3e3c09f74cacdd5cd5b4fa26bda5270ba297f Mon Sep 17 00:00:00 2001 From: flip1995 Date: Mon, 20 Jan 2020 16:33:31 +0100 Subject: [PATCH 4/8] [WIP] Disable appveyor on try builds --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index bf6133e98a06..413ba3437718 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ branches: # Only build AppVeyor on r+ and try branch only: - auto - - try + # - try cache: - '%USERPROFILE%\.cargo' From e6ecefba1d2dd05811c2cd863b58e9ac1216fab7 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Mon, 20 Jan 2020 16:36:27 +0100 Subject: [PATCH 5/8] Fix script name --- .github/workflows/integration.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5a8818d83f98..91b758b6ed7c 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -15,7 +15,7 @@ on: jobs: toolchain_setup: runs-on: ubuntu-latest - + steps: - name: rust-toolchain uses: actions-rs/toolchain@v1.0.3 @@ -24,8 +24,8 @@ jobs: target: x86_64-unknown-linux-gnu profile: minimal - name: Master Toolchain Setup - run: sh setup_toolchain.sh - + run: sh setup-toolchain.sh + build: needs: toolchain_setup runs-on: ubuntu-latest From 7d74f71b8a590f16e9f4d2472a278a3c5de08114 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Mon, 20 Jan 2020 16:40:58 +0100 Subject: [PATCH 6/8] Let's also checkout the repository --- .github/workflows/integration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 91b758b6ed7c..047f62474663 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -17,6 +17,8 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2.0.0 - name: rust-toolchain uses: actions-rs/toolchain@v1.0.3 with: From b767c40ded37cd3ef77d1e39ada129f532ef3dfa Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Mon, 20 Jan 2020 16:41:53 +0100 Subject: [PATCH 7/8] Use bash instead of sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Mateusz MikuĊ‚a --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 047f62474663..2fa2714a7acb 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -26,7 +26,7 @@ jobs: target: x86_64-unknown-linux-gnu profile: minimal - name: Master Toolchain Setup - run: sh setup-toolchain.sh + run: bash setup-toolchain.sh build: needs: toolchain_setup From 0db62fa3d0d7845785ffbb4ccd9b8d9b73b14ce6 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Mon, 20 Jan 2020 17:03:22 +0100 Subject: [PATCH 8/8] Keep target dir --- .github/workflows/integration.yml | 39 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 2fa2714a7acb..0ba5c955813d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,28 +13,27 @@ on: - '**.md' jobs: - toolchain_setup: - 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 - build: - needs: toolchain_setup 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: @@ -57,10 +56,16 @@ jobs: - 'rust-lang/log' - 'chronotope/chrono' - needs: [toolchain_setup, build] + 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: