Allow using QGuiApplication
and not linking to QtWidgets
#401
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |