| 1 | name: ci |
| 2 | on: |
| 3 | push: |
| 4 | branches: [master] |
| 5 | pull_request: |
| 6 | |
| 7 | jobs: |
| 8 | test: |
| 9 | strategy: |
| 10 | matrix: |
| 11 | include: |
| 12 | - runner: ubuntu-latest |
| 13 | target: x86_64-unknown-linux-gnu |
| 14 | - runner: macos-11 |
| 15 | target: x86_64-apple-darwin |
| 16 | - runner: windows-latest |
| 17 | target: x86_64-pc-windows-msvc |
| 18 | runs-on: ${{ matrix.runner }} |
| 19 | timeout-minutes: 10 |
| 20 | env: |
| 21 | RUST_BACKTRACE: 1 |
| 22 | steps: |
| 23 | - uses: actions/checkout@v2 |
| 24 | |
| 25 | - uses: actions-rs/toolchain@v1 |
| 26 | with: |
| 27 | profile: minimal |
| 28 | toolchain: "1.46.0" |
| 29 | target: ${{ matrix.target }} |
| 30 | default: true |
| 31 | |
| 32 | - run: cargo test --target ${{ matrix.target }} |
| 33 | |
| 34 | cross-compile: |
| 35 | strategy: |
| 36 | matrix: |
| 37 | include: |
| 38 | - runner: ubuntu-latest |
| 39 | target: armv5te-unknown-linux-gnueabi |
| 40 | - runner: ubuntu-latest |
| 41 | target: mipsel-unknown-linux-gnu |
| 42 | runs-on: ${{ matrix.runner }} |
| 43 | timeout-minutes: 10 |
| 44 | env: |
| 45 | RUST_BACKTRACE: 1 |
| 46 | steps: |
| 47 | - uses: actions/checkout@v2 |
| 48 | |
| 49 | - uses: actions-rs/toolchain@v1 |
| 50 | with: |
| 51 | profile: minimal |
| 52 | toolchain: "1.46.0" |
| 53 | target: ${{ matrix.target }} |
| 54 | default: true |
| 55 | |
| 56 | - run: cargo build --target ${{ matrix.target }} |