-
-
Notifications
You must be signed in to change notification settings - Fork 24
66 lines (66 loc) · 1.91 KB
/
ci.yml
File metadata and controls
66 lines (66 loc) · 1.91 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
fmt:
name: Format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: Check formatting
run: cargo +nightly fmt --check
test:
name: Tests and clippy
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Install CMake and Ninja
run: choco install cmake ninja -y
- name: Install WebView2 SDK
run: |
nuget install Microsoft.Web.WebView2 -OutputDirectory packages
$pkg = Get-ChildItem "packages" -Filter "Microsoft.Web.WebView2.*" -Directory | Select-Object -First 1
$libPath = Join-Path $pkg.FullName "build\native\x64"
echo "LIB=$env:LIB;$libPath" >> $env:GITHUB_ENV
- name: Install Gettext via MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
gettext
mingw-w64-ucrt-x86_64-gettext-tools
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Clone wxWidgets
run: git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
- name: Run tests
run: |
$env:WXWIDGETS_DIR = "${{ github.workspace }}\wxWidgets"
cargo test
- name: Run clippy
run: |
$env:WXWIDGETS_DIR = "${{ github.workspace }}\wxWidgets"
cargo clippy --release