Initial commit.
[rapid-gossip-sync-server] / .github / workflows / build.yml
1 name: Cross-platform build verification
2 on:
3   push:
4     branches:
5       - main
6   pull_request:
7     branches:
8       - "*"
9
10 jobs:
11   build:
12     strategy:
13       fail-fast: false
14       matrix:
15         toolchain:
16           - stable
17           - 1.48.0
18           - beta
19         pinning: [true, false]
20     runs-on: ubuntu-latest
21     steps:
22       - name: Checkout source code
23         uses: actions/checkout@v3
24       - name: Install Rust ${{ matrix.toolchain }} toolchain
25         uses: actions-rs/toolchain@v1
26         with:
27           toolchain: ${{ matrix.toolchain }}
28           override: true
29           profile: minimal
30       - name: Pin dependencies
31         if: ${{ matrix.pinning }}
32         run: |
33           cargo update -p tokio-postgres --precise "0.7.5" --verbose
34           cargo update -p postgres-types --precise "0.2.3" --verbose
35           cargo update -p tokio --precise "1.14.1" --verbose
36           cargo update -p cpufeatures --precise "0.2.2" --verbose # https://github.com/RustCrypto/utils/issues/795
37       - name: Build on Rust ${{ matrix.toolchain }}
38         run: |
39           cargo build --verbose --color always