8fb8095a9941ee80565d9adc5368dcf5bfc14fdd
[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, 1.63.0 ]
11         include:
12           - toolchain: stable
13             check-fmt: true
14         exclude:
15           - platform: macos-latest
16             toolchain: 1.63.0
17           - platform: windows-latest
18             toolchain: stable
19     runs-on: ${{ matrix.platform }}
20     steps:
21       - name: Checkout source code
22         uses: actions/checkout@v3
23       - name: Install Rust ${{ matrix.toolchain }} toolchain
24         run: |
25           curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
26           rustup override set ${{ matrix.toolchain }}
27       - name: Build on Rust ${{ matrix.toolchain }}
28         run: cargo build --verbose --color always
29       - name: Check formatting
30         if: matrix.check-fmt
31         run: rustup component add rustfmt && cargo fmt --all -- --check