|
1 |
| -name: Rust |
| 1 | +on: [push, pull_request] |
2 | 2 |
|
3 |
| -on: |
4 |
| - push: |
5 |
| - branches: [ "v0" ] |
6 |
| - pull_request: |
7 |
| - branches: [ "v0" ] |
8 |
| - |
9 |
| -env: |
10 |
| - CARGO_TERM_COLOR: always |
| 3 | +name: tests |
11 | 4 |
|
12 | 5 | jobs:
|
13 |
| - build: |
14 |
| - |
15 |
| - runs-on: ubuntu-latest |
16 |
| - |
| 6 | + test-lockfile: |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 11 | + tc: [1.70.0, stable, nightly] |
| 12 | + steps: |
| 13 | + - uses: taiki-e/checkout-action@v1 |
| 14 | + - uses: taiki-e/install-action@v2 |
| 15 | + with: |
| 16 | + tool: cargo-hack,cargo-minimal-versions |
| 17 | + - run: rustup set profile minimal |
| 18 | + - run: rustup toolchain install ${{ matrix.tc }} |
| 19 | + - run: cargo +${{ matrix.tc }} test --all --all-features |
| 20 | + test: |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + strategy: |
| 23 | + matrix: |
| 24 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 25 | + tc: [1.70.0, stable, beta] |
| 26 | + steps: |
| 27 | + - uses: taiki-e/checkout-action@v1 |
| 28 | + - uses: taiki-e/install-action@v2 |
| 29 | + with: |
| 30 | + tool: cargo-hack,cargo-minimal-versions |
| 31 | + - run: rustup set profile minimal |
| 32 | + - run: rustup toolchain install ${{ matrix.tc }} |
| 33 | + - run: cargo +${{ matrix.tc }} minimal-versions test --all --all-features |
| 34 | + cross-compile: |
| 35 | + runs-on: ${{ matrix.os }} |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + os: [ubuntu-latest] |
| 39 | + tc: [1.70.0, stable, beta] |
| 40 | + cc: |
| 41 | + - aarch64-linux-android |
| 42 | + - i686-pc-windows-gnu |
| 43 | + - i686-unknown-freebsd |
| 44 | + - i686-unknown-linux-gnu |
| 45 | + - wasm32-unknown-unknown |
| 46 | + - x86_64-apple-darwin |
| 47 | + - x86_64-unknown-redox |
| 48 | + steps: |
| 49 | + - uses: taiki-e/checkout-action@v1 |
| 50 | + - uses: taiki-e/install-action@v2 |
| 51 | + with: |
| 52 | + tool: cargo-hack,cargo-minimal-versions |
| 53 | + - run: rustup set profile minimal |
| 54 | + - run: rustup toolchain install ${{ matrix.tc }} |
| 55 | + - run: rustup target add ${{ matrix.cc }} --toolchain ${{ matrix.tc }} |
| 56 | + - run: cargo +${{ matrix.tc }} minimal-versions build --all --all-features --target=${{ matrix.cc }} |
| 57 | + cross-compile-ios: |
| 58 | + runs-on: ${{ matrix.os }} |
| 59 | + strategy: |
| 60 | + matrix: |
| 61 | + os: [macos-latest] |
| 62 | + tc: [1.70.0, stable, beta] |
| 63 | + cc: [aarch64-apple-ios] |
17 | 64 | steps:
|
18 |
| - - uses: actions/checkout@v3 |
19 |
| - - name: Build |
20 |
| - run: cargo build --verbose |
21 |
| - - name: Run tests |
22 |
| - run: cargo test --verbose |
| 65 | + - uses: taiki-e/checkout-action@v1 |
| 66 | + - uses: taiki-e/install-action@v2 |
| 67 | + with: |
| 68 | + tool: cargo-hack,cargo-minimal-versions |
| 69 | + - run: rustup set profile minimal |
| 70 | + - run: rustup toolchain install ${{ matrix.tc }} |
| 71 | + - run: rustup target add ${{ matrix.cc }} --toolchain ${{ matrix.tc }} |
| 72 | + - run: cargo +${{ matrix.tc }} minimal-versions build --all --all-features --target=${{ matrix.cc }} |
0 commit comments