| 1 |
name: Rust |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
pull_request: |
| 7 |
branches: [ master ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ${{ matrix.os }} |
| 12 |
env: |
| 13 |
RUST_BACKTRACE: 1 |
| 14 |
strategy: |
| 15 |
matrix: |
| 16 |
build: [linux64, macos, win32, win64, wasm32] |
| 17 |
include: |
| 18 |
- build: linux64 |
| 19 |
os: ubuntu-latest |
| 20 |
channel: stable |
| 21 |
toolchain: x86_64-unknown-linux-gnu |
| 22 |
target: x86_64-unknown-linux-gnu |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
- build: macos |
| 29 |
os: macos-latest |
| 30 |
channel: stable |
| 31 |
toolchain: x86_64-apple-darwin |
| 32 |
target: x86_64-apple-darwin |
| 33 |
- build: win32 |
| 34 |
os: windows-latest |
| 35 |
channel: stable |
| 36 |
toolchain: i686-pc-windows-msvc |
| 37 |
target: i686-pc-windows-msvc |
| 38 |
- build: win64 |
| 39 |
os: windows-latest |
| 40 |
channel: stable |
| 41 |
toolchain: x86_64-pc-windows-msvc |
| 42 |
target: x86_64-pc-windows-msvc |
| 43 |
- build: wasm32 |
| 44 |
os: ubuntu-latest |
| 45 |
channel: stable |
| 46 |
toolchain: x86_64-unknown-linux-gnu |
| 47 |
target: wasm32-unknown-unknown |
| 48 |
steps: |
| 49 |
- uses: actions/checkout@v4 |
| 50 |
- run: | |
| 51 |
TOOLCHAIN=${{ matrix.channel }}-${{ matrix.toolchain }} |
| 52 |
rustup toolchain install --no-self-update $TOOLCHAIN |
| 53 |
rustup default $TOOLCHAIN |
| 54 |
rustup target add ${{ matrix.target }} |
| 55 |
shell: bash |
| 56 |
- name: Rust version |
| 57 |
run: | |
| 58 |
set -ex |
| 59 |
rustc -Vv |
| 60 |
cargo -V |
| 61 |
rustup show |
| 62 |
shell: bash |
| 63 |
|
| 64 |
- run: cargo check --target ${{ matrix.target }} |
| 65 |
- run: cargo build --target ${{ matrix.target }} |
| 66 |
- run: cargo test --target ${{ matrix.target }} |
| 67 |
if: ${{ matrix.target != 'wasm32-unknown-unknown' }} |
| 68 |
|
| 69 |
|
| 70 |
- run: cargo build --all-targets --target ${{ matrix.target }} |
| 71 |
- run: cargo build --all-targets --no-default-features --target ${{ matrix.target }} |