Repository navigation
82 lines (76 loc) · 2.58 KB
/
Copy pathci.yml
File metadata and controls
82 lines (76 loc) · 2.58 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on:
push:
pull_request:
# A newer push to the same branch or pull request cancels the run still going.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all --check
linux:
name: Linux build and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Wayland headers for the build; software Vulkan (lavapipe) so the GUI tests can render
# without a GPU; gsettings and the GNOME schemas for the tuner tests.
- name: System packages
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libwayland-dev mesa-vulkan-drivers libglib2.0-bin gsettings-desktop-schemas
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all-targets --locked
- name: Tests
run: cargo test --locked
- name: Screenshots from the GUI tests
if: always()
uses: actions/upload-artifact@v4
with:
name: gui-screenshots
path: target/gui-shots/
if-no-files-found: ignore
windows:
name: Windows build and tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all-targets --locked
- name: Tests
run: cargo test --locked
- uses: actions/upload-artifact@v4
if: always()
with:
name: gui-screenshots-windows
path: target/gui-shots/
if-no-files-found: ignore
# The release's setup wizard still builds (from the debug binaries here).
- name: Setup wizard
shell: pwsh
run: |
$v = (Select-String -Path Cargo.toml -Pattern '^version = "(.*)"' | Select-Object -First 1).Matches[0].Groups[1].Value
$iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe"
if (-not (Test-Path $iscc)) { choco install innosetup -y --no-progress }
& $iscc /Qp "/DAppVersion=$v" "/DBinDir=$pwd\target\debug" "/DOutDir=$pwd\out" packaging\windows\cleancore.iss
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Get-ChildItem out
- uses: actions/upload-artifact@v4
with:
name: windows-setup
path: out/*-setup.exe
if-no-files-found: error