-
Notifications
You must be signed in to change notification settings - Fork 137
52 lines (39 loc) · 1.36 KB
/
pr-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: PR Build & Test
on:
pull_request:
push:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
branches:
- main
env:
RUSTFLAGS: -Dwarnings
jobs:
check:
runs-on: windows-2022
strategy:
matrix:
# Apparently ARM targets aren't usable in GH actionsd
# target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc, aarch64-pc-windows-msvc]
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc]
branding: [Inbox, Stable, Dev]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update toolchain
run: rustup update --no-self-update stable && rustup default stable-${{ matrix.target }}
- name: Add toolchain target
run: rustup target add ${{ matrix.target }}
- name: Install fmt
run: rustup component add rustfmt
- name: Fix environment
uses: ./.github/actions/fix-environment
- name: Clean
run: cargo clean
- name: Run fmt
run: cargo fmt --all -- --check
# Test will build the code, then also test it.
- name: Test
run: cargo test --no-default-features --features ${{matrix.branding}} --target ${{ matrix.target }}
- name: Run clippy
run: cargo clippy --no-default-features --features ${{matrix.branding}} --target ${{matrix.target}} --frozen --release 2>&1