-
Notifications
You must be signed in to change notification settings - Fork 88
90 lines (81 loc) · 2.13 KB
/
rust.yml
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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
env:
QT_QPA_PLATFORM: offscreen
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
qt: [5.15.2, 5.9.9, 5.12.9]
rust: [stable, nightly]
include:
- os: macos-latest
rust: stable
qt: 5.15.2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
with:
key: rust_cache
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt }}
cache: true
modules: 'qtwebengine'
- name: Build
run: cargo build --all-features
- name: Run tests
run: DYLD_FRAMEWORK_PATH=$Qt5_DIR/lib cargo test --all-features
shell: bash
# Qt6 is in a different job right now because it does not have many modules and most example don't compile
qt6:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
ver: [6.2.0, 6.5.0]
env:
QT_QPA_PLATFORM: offscreen
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: rust_cache6
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.ver }}
cache: true
- name: Test
run: |
cargo test --manifest-path qttypes/Cargo.toml
cargo test --manifest-path qmetaobject_impl/Cargo.toml
cargo test --manifest-path qmetaobject/Cargo.toml
no_qt:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: rust_cache
- name: Build qttypes without qt
run: |
cargo build --manifest-path qttypes/Cargo.toml --no-default-features