|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - master |
| 10 | + |
| 11 | +env: |
| 12 | + RUSTFLAGS: -Dwarnings |
| 13 | + RUST_BACKTRACE: 1 |
| 14 | + |
| 15 | +jobs: |
| 16 | + test: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v2 |
| 20 | + - name: Install Rust |
| 21 | + run: rustup update stable |
| 22 | + - run: cargo test --all-features --workspace |
| 23 | + |
| 24 | + no-std: |
| 25 | + strategy: |
| 26 | + matrix: |
| 27 | + target: |
| 28 | + # TODO: Currently, valuable cannot build with targets that do not have atomic CAS. |
| 29 | + # We should port https://github.com/rust-lang/futures-rs/pull/2400. |
| 30 | + # - thumbv6m-none-eabi |
| 31 | + - thumbv7m-none-eabi |
| 32 | + runs-on: ubuntu-latest |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v2 |
| 35 | + - name: Install Rust |
| 36 | + run: rustup update stable |
| 37 | + - run: rustup target add ${{ matrix.target }} |
| 38 | + # TODO: Currently, valuable cannot build without `alloc` feature |
| 39 | + # because `Debug` impl of `dyn Enumerable` uses `format!` macro. |
| 40 | + # - run: cargo build --target ${{ matrix.target }} --no-default-features |
| 41 | + # working-directory: valuable |
| 42 | + # - run: cargo build --target ${{ matrix.target }} --no-default-features --features derive |
| 43 | + # working-directory: valuable |
| 44 | + - run: cargo build --target ${{ matrix.target }} --no-default-features --features alloc |
| 45 | + working-directory: valuable |
| 46 | + - run: cargo build --target ${{ matrix.target }} --no-default-features --features alloc,derive |
| 47 | + working-directory: valuable |
| 48 | + |
| 49 | + # TODO: Currently, valuable cannot build without `alloc` feature |
| 50 | + # because `Debug` impl of `dyn Enumerable` uses `format!` macro. |
| 51 | + # features: |
| 52 | + # runs-on: ubuntu-latest |
| 53 | + # steps: |
| 54 | + # - uses: actions/checkout@v2 |
| 55 | + # - name: Install Rust |
| 56 | + # run: rustup update stable |
| 57 | + # - name: Install cargo-hack |
| 58 | + # run: cargo install cargo-hack |
| 59 | + # - run: cargo hack build --workspace --feature-powerset --no-dev-deps |
| 60 | + |
| 61 | + fmt: |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v2 |
| 65 | + - name: Install Rust |
| 66 | + run: rustup update stable |
| 67 | + - run: cargo fmt --all -- --check |
0 commit comments