|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [ staging, trying, master ] |
| 4 | + pull_request: |
| 5 | + |
| 6 | +name: Continuous integration |
| 7 | + |
| 8 | +jobs: |
| 9 | + ci-linux: |
| 10 | + runs-on: ubuntu-20.04 |
| 11 | + continue-on-error: ${{ matrix.experimental || false }} |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + # All generated code should be running on stable now |
| 15 | + rust: [nightly, stable, 1.39.0] |
| 16 | + |
| 17 | + include: |
| 18 | + # Nightly is only for reference and allowed to fail |
| 19 | + - rust: nightly |
| 20 | + experimental: true |
| 21 | + |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - uses: actions-rs/toolchain@v1 |
| 25 | + with: |
| 26 | + profile: minimal |
| 27 | + toolchain: ${{ matrix.rust }} |
| 28 | + override: true |
| 29 | + - name: Install all Rust targets for ${{ matrix.rust }} |
| 30 | + run: rustup target install --toolchain=${{ matrix.rust }} thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf |
| 31 | + - name: Install qemu and gcc |
| 32 | + run: sudo apt-get update && sudo apt-get install qemu-system-arm gcc-arm-none-eabi |
| 33 | + - name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }} |
| 34 | + run: TARGET=x86_64-unknown-linux-gnu TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 35 | + - name: Run CI script for thumbv6m-none-eabi under ${{ matrix.rust }} |
| 36 | + run: TARGET=thumbv6m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 37 | + - name: Run CI script for thumbv7m-none-eabi under ${{ matrix.rust }} |
| 38 | + run: TARGET=thumbv7m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 39 | + - name: Run CI script for thumbv7em-none-eabi under ${{ matrix.rust }} |
| 40 | + run: TARGET=thumbv7em-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 41 | + - name: Run CI script for thumbv7em-none-eabihf under ${{ matrix.rust }} |
| 42 | + run: TARGET=thumbv7em-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 43 | + - name: Run CI script for thumbv8m.base-none-eabi under ${{ matrix.rust }} |
| 44 | + run: TARGET=thumbv8m.base-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 45 | + - name: Run CI script for thumbv8m.main-none-eabi under ${{ matrix.rust }} |
| 46 | + run: TARGET=thumbv8m.main-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 47 | + - name: Run CI script for thumbv8m.main-none-eabihf under ${{ matrix.rust }} |
| 48 | + run: TARGET=thumbv8m.main-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh |
| 49 | + |
| 50 | + # On macOS and Windows, we at least make sure that all examples build and link. |
| 51 | + build-other: |
| 52 | + strategy: |
| 53 | + matrix: |
| 54 | + os: |
| 55 | + - macOS-latest |
| 56 | + - windows-latest |
| 57 | + runs-on: ${{ matrix.os }} |
| 58 | + |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + - uses: actions-rs/toolchain@v1 |
| 62 | + with: |
| 63 | + profile: minimal |
| 64 | + toolchain: stable |
| 65 | + override: true |
| 66 | + - name: Install all Rust targets |
| 67 | + run: rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf |
| 68 | + - name: Build examples for thumbv6m-none-eabi |
| 69 | + run: cargo build --target=thumbv6m-none-eabi --examples |
| 70 | + - name: Build examples for thumbv7m-none-eabi |
| 71 | + run: cargo build --target=thumbv7m-none-eabi --examples |
| 72 | + - name: Build examples for thumbv7em-none-eabi |
| 73 | + run: cargo build --target=thumbv7em-none-eabi --examples |
| 74 | + - name: Build examples for thumbv7em-none-eabihf |
| 75 | + run: cargo build --target=thumbv7em-none-eabihf --examples |
| 76 | + - name: Build examples for thumbv8m.base-none-eabi |
| 77 | + run: cargo build --target=thumbv8m.base-none-eabi --examples |
| 78 | + - name: Build examples for thumbv8m.main-none-eabi |
| 79 | + run: cargo build --target=thumbv8m.main-none-eabi --examples |
| 80 | + - name: Build examples for thumbv8m.main-none-eabihf |
| 81 | + run: cargo build --target=thumbv8m.main-none-eabihf --examples |
| 82 | + - name: Build crate for host OS |
| 83 | + run: cargo build |
0 commit comments