2021-11-01 12:34:34 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-11-01 16:05:16 +00:00
|
|
|
env:
|
|
|
|
QT_QPA_PLATFORM: offscreen
|
2021-12-01 15:57:41 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
qt: [5.15.2]
|
|
|
|
rust: [stable, nightly]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2021-11-01 12:34:34 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-12-01 15:57:41 +00:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
components: rustfmt, clippy
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
with:
|
|
|
|
key: rust_cache
|
|
|
|
|
|
|
|
- name: Cache Qt
|
|
|
|
id: cache-qt
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ../Qt
|
|
|
|
key: QtCache-${{ runner.os }}-${{ matrix.qt }}
|
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v2
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.qt }}
|
|
|
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
|
|
|
|
|
|
|
- name: Install KF5i18n
|
2021-12-23 09:40:06 +00:00
|
|
|
run: sudo apt install libkf5i18n-dev
|
2021-11-01 12:34:34 +00:00
|
|
|
- name: Build
|
2021-12-01 15:57:41 +00:00
|
|
|
run: cargo build --verbose --all-features
|
2021-11-01 12:34:34 +00:00
|
|
|
- name: Run tests
|
2021-12-01 15:57:41 +00:00
|
|
|
run: cargo test --verbose --all-features
|