From f465318325ef45646a091ce25d6f87b42e98ea64 Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Fri, 1 May 2020 18:56:30 +0200 Subject: [PATCH 1/2] Use GitHub actions for CI Signed-off-by: Daniel Egger --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++ .github/workflows/clippy.yml | 17 +++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/clippy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2260e1d5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +on: [push, pull_request] + +name: Continuous integration + +jobs: + ci-linux: + runs-on: ubuntu-latest + strategy: + matrix: + # All generated code should be running on stable now + rust: [stable] + + # All vendor files we want to test on stable + VENDOR: [rustfmt, Atmel, Freescale, Fujitsu, Holtek, Nordic, Nuvoton, NXP, RISC-V, SiliconLabs, Spansion, STMicro, Toshiba] + + # The default target we're compiling on and for + TARGET: [x86_64-unknown-linux-gnu] + + # Temporary hack as long as we use the current CI script + TRAVIS_OS_NAME: [linux] + + include: + # Test MSRV + - rust: 1.37.0 + VENDOR: Nordic + TARGET: x86_64-unknown-linux-gnu + TRAVIS_OS_NAME: linux + + # Use nightly for architectures which don't support stable + - rust: nightly + experimental: true + VENDOR: OTHER + TARGET: x86_64-unknown-linux-gnu + TRAVIS_OS_NAME: linux + + # OSX + - rust: stable + TARGET: x86_64-apple-darwin + TRAVIS_OS_NAME: osx + + # Windows + - rust: stable + TARGET: x86_64-pc-windows-msvc + TRAVIS_OS_NAME: windows + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + target: ${{ matrix.TARGET }} + override: true + components: rustfmt + - name: Run CI script for ${{ matrix.VENDOR }} under ${{ matrix.rust }} + run: TARGET=${{ matrix.TARGET }} VENDOR=${{ matrix.VENDOR }} TRAVIS_OS_NAME=${{ matrix.TRAVIS_OS_NAME }} bash ci/script.sh diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 00000000..1818fafc --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,17 @@ +on: [push, pull_request] + +name: Clippy check +jobs: + clippy_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} From 8771cb87183e017e5855541f0cdf3ba818b595ff Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Fri, 1 May 2020 22:35:57 +0200 Subject: [PATCH 2/2] Try out whether a filter prevents building each PR twice Signed-off-by: Daniel Egger --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2260e1d5..ebf92dd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,7 @@ -on: [push, pull_request] +on: + push: + branches: [ staging, trying, master ] + pull_request: name: Continuous integration