-
Notifications
You must be signed in to change notification settings - Fork 9
111 lines (105 loc) · 3.83 KB
/
ci_test.yml
File metadata and controls
111 lines (105 loc) · 3.83 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
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.setup.os }}
strategy:
matrix:
toolchain: ['nightly']
setup:
- os: 'ubuntu-24.04'
deps: 'qtbase5-dev qtmultimedia5-dev qtwebengine5-dev libgtk-4-dev libwebkitgtk-6.0-dev'
features: 'all,qt-opengl'
- os: 'ubuntu-24.04'
deps: 'qt6-base-dev libgtk-4-dev'
- os: 'ubuntu-24.04'
deps: 'qt6-base-dev libgtk-4-dev'
features: 'qt-opengl'
- os: 'ubuntu-24.04'
deps: 'qt6-base-dev qt6-multimedia-dev libgtk-4-dev'
features: 'media'
- os: 'ubuntu-24.04'
features: 'gtk,webview'
no_default_features: true
deps: 'qt6-base-dev qt6-webengine-dev libgtk-4-dev libwebkitgtk-6.0-dev'
- os: 'ubuntu-24.04'
deps: 'qtbase5-dev qtmultimedia5-dev qtwebengine5-dev libgtk-4-dev libwebkitgtk-6.0-dev'
features: 'all'
no_default_features: true
- os: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
- os: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
features: 'webview'
- os: 'windows-latest'
target: 'i686-pc-windows-msvc'
features: 'all,win32-dark-mode,winui-enable-cbs,winui-webview-system'
- os: 'windows-latest'
target: 'x86_64-pc-windows-gnullvm'
features: 'win32,all'
no_default_features: true
- os: 'windows-latest'
target: 'x86_64-pc-windows-msvc'
features: 'winui,win32-dark-mode,media'
no_default_features: true
- os: 'windows-latest'
features: 'all'
no_default_features: true
- os: 'macos-14'
- os: 'macos-14'
features: 'media'
- os: 'macos-14'
features: 'webview'
- os: 'macos-14'
features: 'all'
steps:
- uses: actions/checkout@v4
- name: Setup Rust Toolchain
run: rustup toolchain install ${{ matrix.toolchain }}
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y ${{ matrix.setup.deps }}
- uses: msys2/setup-msys2@v2
if: ${{ endsWith(matrix.setup.target, 'gnullvm') }}
with:
msystem: CLANG64
pacboy: clang:c
release: false
- name: Setup target
if: ${{ matrix.setup.target }}
run: rustup +${{ matrix.toolchain }} target install ${{ matrix.setup.target }}
- name: Build on ${{ matrix.setup.os }} ${{ matrix.toolchain }} ${{ matrix.setup.target }}
shell: bash
run: |
set -ex
# Add feature "nightly" if toolchain is nightly
if [[ "${{ matrix.toolchain }}" == "nightly" ]]; then
ARGS+=("--features" "nightly")
fi
# Add features if features is not empty
if [[ -n "${{ matrix.setup.features }}" ]]; then
ARGS+=("--features" "${{ matrix.setup.features }}")
fi
# Add no-default-features if no_default_features is true
if [[ -n "${{ matrix.setup.no_default_features }}" ]]; then
ARGS+=("--no-default-features")
fi
# Specify target if target is not empty
if [[ -n "${{ matrix.setup.target }}" ]]; then
ARGS+=("--target" "${{ matrix.setup.target }}")
fi
if [[ "${{ matrix.setup.target }}" == *"llvm"* ]]; then
PATH=/c/msys64/clang64/bin:$PATH
fi
cargo +${{ matrix.toolchain }} test --workspace "${ARGS[@]}"