-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (47 loc) · 1.55 KB
/
ci.yml
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
# Copyright 2022 Heath Stewart.
# Licensed under the MIT License. See LICENSE.txt in the project root for license information.
name: ci
on:
pull_request:
push:
branches:
- main
workflow_call:
inputs:
full:
description: Whether to run a full suite of checks.
required: false
type: boolean
default: true
defaults:
run:
shell: pwsh
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Dwarnings
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up toolchain
run: rustup show
- name: Check formatting
if: ${{ success() && (inputs.full || github.event_name != 'workflow_call') }}
run: cargo fmt --all -- --check
- name: Test
run: cargo test --all-features --workspace
- name: Lint
run: cargo clippy --all-features --all-targets --no-deps --workspace
- name: Build documentation
run: cargo doc --all-features --no-deps --workspace
- name: Set up MSBuild
if: ${{ success() && (inputs.full || github.event_name != 'workflow_call') }}
uses: microsoft/[email protected]
- name: Build example MSI
if: ${{ success() && (inputs.full || github.event_name != 'workflow_call') }}
run: msbuild -t:build examples/example.wixproj
- name: Install example MSI
if: ${{ success() && (inputs.full || github.event_name != 'workflow_call') }}
run: start-process msiexec.exe -args '/i', "$PWD\\target\\debug\\example.msi", '/qn' -wait