Update build actions to latest (#32) #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 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@v4 | |
- 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: | | |
$p = start-process msiexec.exe -args '/i', "$PWD\target\debug\example.msi", '/qn' -wait -passthru | |
exit $p.ExitCode |