|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [ staging, trying, master ] |
| 4 | + pull_request: |
| 5 | + |
| 6 | +name: Continuous integration |
| 7 | + |
| 8 | +jobs: |
| 9 | + ci-linux: |
| 10 | + name: CI |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + # All generated code should be running on stable now |
| 16 | + rust: [stable] |
| 17 | + |
| 18 | + # The default target we're compiling on and for |
| 19 | + TARGET: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf] |
| 20 | + |
| 21 | + include: |
| 22 | + # Test MSRV |
| 23 | + - rust: 1.46.0 |
| 24 | + TARGET: x86_64-unknown-linux-gnu |
| 25 | + |
| 26 | + # Test nightly but don't fail |
| 27 | + - rust: nightly |
| 28 | + experimental: true |
| 29 | + TARGET: x86_64-unknown-linux-gnu |
| 30 | + |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v2 |
| 33 | + |
| 34 | + - uses: actions-rs/toolchain@v1 |
| 35 | + with: |
| 36 | + profile: minimal |
| 37 | + toolchain: ${{ matrix.rust }} |
| 38 | + target: ${{ matrix.TARGET }} |
| 39 | + override: true |
| 40 | + |
| 41 | + - name: Install armv7 libraries |
| 42 | + if: ${{ matrix.TARGET == 'armv7-unknown-linux-gnueabihf' }} |
| 43 | + run: sudo apt-get install -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf |
| 44 | + |
| 45 | + - uses: actions-rs/cargo@v1 |
| 46 | + if: ${{ matrix.TARGET != 'armv7-unknown-linux-gnueabihf' }} |
| 47 | + with: |
| 48 | + command: test |
| 49 | + args: --target=${{ matrix.TARGET }} |
| 50 | + |
| 51 | + |
| 52 | + - uses: actions-rs/cargo@v1 |
| 53 | + if: ${{ matrix.TARGET == 'armv7-unknown-linux-gnueabihf' }} |
| 54 | + with: |
| 55 | + command: build |
| 56 | + args: --target=${{ matrix.TARGET }} |
| 57 | + |
| 58 | + ci-macos: |
| 59 | + name: CI-macOS |
| 60 | + runs-on: macos-11 |
| 61 | + |
| 62 | + strategy: |
| 63 | + matrix: |
| 64 | + rust: [stable, 1.46.0] |
| 65 | + TARGET: [x86_64-apple-darwin] |
| 66 | + |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@v2 |
| 69 | + |
| 70 | + - uses: actions-rs/toolchain@v1 |
| 71 | + with: |
| 72 | + profile: minimal |
| 73 | + toolchain: ${{ matrix.rust }} |
| 74 | + target: ${{ matrix.TARGET }} |
| 75 | + override: true |
| 76 | + |
| 77 | + - uses: actions-rs/cargo@v1 |
| 78 | + with: |
| 79 | + command: build |
| 80 | + args: --target=${{ matrix.TARGET }} |
0 commit comments