Add CI jobs for `windows-latest` and `macos-latest`
[ldk-sample] / .github / workflows / build.yml
1 name: Continuous Integration Checks
2
3 on: [push, pull_request]
4
5 jobs:
6   build:
7     strategy:
8       matrix:
9         platform: [ ubuntu-latest, macos-latest, windows-latest ]
10         toolchain: [ stable, beta ]
11         include:
12           - toolchain: stable
13             check-fmt: true
14     runs-on: ${{ matrix.platform }}
15     steps:
16       - name: Checkout source code
17         uses: actions/checkout@v2
18       - name: Install Rust ${{ matrix.toolchain }} toolchain
19         uses: actions-rs/toolchain@v1
20         with:
21           toolchain: ${{ matrix.toolchain }}
22           override: true
23           profile: minimal
24       - name: Build on Rust ${{ matrix.toolchain }}
25         run: cargo build --verbose --color always
26       - name: Check formatting
27         if: matrix.check-fmt
28         run: rustup component add rustfmt && cargo fmt --all -- --check