-
Notifications
You must be signed in to change notification settings - Fork 1
137 lines (106 loc) · 3.63 KB
/
Copy pathci.yml
File metadata and controls
137 lines (106 loc) · 3.63 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
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
linux-msrv:
name: Linux MSRV check
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgtk-4-dev \
pkg-config
- name: Install Rust 1.87
run: |
rustup toolchain install 1.87.0 --profile minimal
rustup default 1.87.0
- name: Check workspace on MSRV
run: cargo check --workspace --all-targets
linux-rust:
name: Linux Rust checks
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-mingw-w64-x86-64 \
libgtk-4-dev \
pkg-config
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal --component rustfmt --component clippy
rustup default stable
rustup target add x86_64-pc-windows-gnu
- name: Check formatting
run: cargo fmt --all -- --check
- name: Check workspace
run: cargo check --workspace --all-targets
- name: Test workspace
run: cargo test --workspace --all-targets
- name: Run clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Check Windows GNU target
run: cargo check --target x86_64-pc-windows-gnu -p driveck-core -p driveck-win32
- name: Run clippy on Windows GNU target
run: cargo clippy --target x86_64-pc-windows-gnu -p driveck-core -p driveck-win32 -- -D warnings
windows-msvc:
name: Windows MSVC build
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal --component clippy
rustup default stable
- name: Check native Windows crates
run: cargo check -p driveck-core -p driveck-cli -p driveck-ffi -p driveck-win32 --all-targets
- name: Test native Windows crates
run: cargo test -p driveck-core -p driveck-cli -p driveck-ffi -p driveck-win32 --all-targets
- name: Run clippy on native Windows crates
run: cargo clippy -p driveck-core -p driveck-cli -p driveck-ffi -p driveck-win32 --all-targets -- -D warnings
- name: Build Win32 release binary
run: cargo build --release -p driveck-win32
macos-native:
name: macOS native build
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: Test Rust crates on macOS
run: cargo test --workspace --all-targets
- name: Build macOS CLI
run: |
xcodebuild \
-project macos/DriveCkMac.xcodeproj \
-scheme DriveCkMacCLI \
-configuration Debug \
CODE_SIGNING_ALLOWED=NO \
build
- name: Build macOS app
run: |
xcodebuild \
-project macos/DriveCkMac.xcodeproj \
-scheme DriveCkMacApp \
-configuration Debug \
CODE_SIGNING_ALLOWED=NO \
build