|
| 1 | +on: [pull_request] |
| 2 | + |
| 3 | +name: Continuous Integration |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + name: Test Suite |
| 8 | + runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + rust: |
| 12 | + - 1.29.0 |
| 13 | + - stable |
| 14 | + - nightly |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - uses: actions-rs/toolchain@v1 |
| 18 | + with: |
| 19 | + profile: minimal |
| 20 | + toolchain: ${{ matrix.rust }} |
| 21 | + override: true |
| 22 | + - uses: actions-rs/cargo@v1 |
| 23 | + with: |
| 24 | + command: test |
| 25 | + args: --verbose --features strict |
| 26 | + |
| 27 | + fmt: |
| 28 | + name: Rustfmt |
| 29 | + runs-on: ubuntu-latest |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + rust: |
| 33 | + - stable |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - uses: actions-rs/toolchain@v1 |
| 37 | + with: |
| 38 | + profile: minimal |
| 39 | + toolchain: ${{ matrix.rust }} |
| 40 | + override: true |
| 41 | + - run: rustup component add rustfmt |
| 42 | + - uses: actions-rs/cargo@v1 |
| 43 | + with: |
| 44 | + command: fmt |
| 45 | + args: --all -- --check |
| 46 | + |
| 47 | + clippy: |
| 48 | + name: Clippy |
| 49 | + runs-on: ubuntu-latest |
| 50 | + strategy: |
| 51 | + matrix: |
| 52 | + rust: |
| 53 | + - stable |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v2 |
| 56 | + - uses: actions-rs/toolchain@v1 |
| 57 | + with: |
| 58 | + profile: minimal |
| 59 | + toolchain: ${{ matrix.rust }} |
| 60 | + override: true |
| 61 | + - run: rustup component add clippy |
| 62 | + - uses: actions-rs/cargo@v1 |
| 63 | + with: |
| 64 | + command: clippy |
| 65 | + args: -- -D warnings |
| 66 | + |
| 67 | + Embedded-No-Alloc: |
| 68 | + runs-on: ubuntu-latest |
| 69 | + steps: |
| 70 | + - name: Checkout |
| 71 | + uses: actions/checkout@v2 |
| 72 | + - name: Set up QEMU |
| 73 | + run: sudo apt install qemu-system-arm |
| 74 | + - name: Checkout Toolchain |
| 75 | + uses: actions-rs/toolchain@v1 |
| 76 | + with: |
| 77 | + profile: minimal |
| 78 | + toolchain: nightly |
| 79 | + override: true |
| 80 | + components: rust-src |
| 81 | + target: thumbv7m-none-eabi |
| 82 | + - name: Run |
| 83 | + env: |
| 84 | + RUSTFLAGS: "-C link-arg=-Tlink.x" |
| 85 | + CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel" |
| 86 | + run: cd embedded-no-alloc && cargo run --target thumbv7m-none-eabi |
| 87 | + |
| 88 | + Embedded-Alloc: |
| 89 | + runs-on: ubuntu-latest |
| 90 | + steps: |
| 91 | + - name: Checkout |
| 92 | + uses: actions/checkout@v2 |
| 93 | + - name: Set up QEMU |
| 94 | + run: sudo apt install qemu-system-arm |
| 95 | + - name: Checkout Toolchain |
| 96 | + uses: actions-rs/toolchain@v1 |
| 97 | + with: |
| 98 | + profile: minimal |
| 99 | + toolchain: nightly |
| 100 | + override: true |
| 101 | + components: rust-src |
| 102 | + target: thumbv7m-none-eabi |
| 103 | + - name: Run |
| 104 | + env: |
| 105 | + RUSTFLAGS: "-C link-arg=-Tlink.x" |
| 106 | + CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel" |
| 107 | + run: cd embedded-alloc && cargo run --target thumbv7m-none-eabi |
0 commit comments