Repository navigation
154 lines (125 loc) · 4.43 KB
/
Copy pathci.yml
File metadata and controls
154 lines (125 loc) · 4.43 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: CI
on:
push:
branches: [main]
pull_request:
# Pull requests run here, so the token can read and nothing more.
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Lint and test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
# What GPUI links against: windowing (Wayland, X11), input, fonts,
# and the Vulkan loader.
- name: System libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
libx11-xcb-dev libxcb1-dev libfontconfig-dev libfreetype-dev \
libvulkan-dev libasound2-dev libssl-dev libzstd-dev
# Pinned: the lint gate denies clippy::all and ::pedantic, and a newer
# clippy's new lints are a change to make on purpose, not by surprise.
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.97"
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Lint
run: cargo xtask lint
- name: Test
run: cargo xtask test
check-macos:
name: Lint and test (macOS)
# Apple silicon. No system libraries to install, and no Metal toolchain
# either: gpui-kit builds GPUI with runtime shader compilation, so the
# shaders compile when the app starts, not here.
runs-on: macos-15
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.97"
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Lint
run: cargo xtask lint
- name: Test
run: cargo xtask test
# The app bundle, signed ad hoc: catches a broken Info.plist, icon or
# signature before a release does.
- name: Bundle
run: cargo xtask bundle
windows:
name: Lint and test (Windows)
runs-on: windows-2025
steps:
# Check out with the repository's own line endings, as on Linux.
- run: git config --global core.autocrlf false
- uses: actions/checkout@v5
# Pinned with the Linux job, for the same reason. GPUI needs nothing
# beyond the Windows SDK the runner already has.
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.97"
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Lint
run: cargo xtask lint
- name: Test
run: cargo xtask test
- name: Check embedded executable icon
shell: pwsh
run: |
cargo build --release --locked -p disktree-app
Add-Type @'
using System;
using System.Runtime.InteropServices;
public static class ExecutableIcons {
[DllImport("shell32.dll", CharSet = CharSet.Unicode)]
public static extern uint ExtractIconEx(
string file, int index, IntPtr[] large, IntPtr[] small, uint count);
}
'@
$exe = (Resolve-Path target/release/disktree.exe).Path
if ([ExecutableIcons]::ExtractIconEx($exe, -1, $null, $null, 0) -lt 1) {
throw "disktree.exe has no embedded icon"
}
# The other half of each release: the same tests on the architectures
# the release builds for but the jobs above do not run on.
other-architectures:
name: Test (${{ matrix.name }})
strategy:
fail-fast: false
matrix:
include:
- { name: Linux aarch64, runner: ubuntu-24.04-arm }
- { name: macOS x86_64, runner: macos-15-intel }
- { name: Windows aarch64, runner: windows-11-arm }
runs-on: ${{ matrix.runner }}
steps:
- if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- uses: actions/checkout@v5
- name: System libraries
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
libx11-xcb-dev libxcb1-dev libfontconfig-dev libfreetype-dev \
libvulkan-dev libasound2-dev libssl-dev libzstd-dev
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.97"
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo xtask test