Drop lazy_static, MSRV is high enough for LazyLock #216
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: Test build the application | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.5.* | |
cache: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgmock-dev libhunspell-dev libarchive-dev | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: 'build' | |
workspaces: | | |
typstdriver/rust -> ../../build/cargo/build | |
- name: Configure | |
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug | |
- name: Build | |
run: cmake --build build -j | |
- name: Run tests | |
run: ctest --output-on-failure --test-dir build | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.5.* | |
cache: true | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: 'build' | |
workspaces: | | |
typstdriver/rust -> ../../build/x64/RelWithDebInfo/cargo/build | |
- name: Configure | |
run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" | |
- name: Build | |
run: cmake --build build -j --config RelWithDebInfo | |
- name: Run tests | |
run: ctest --output-on-failure --test-dir build | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.5.* | |
cache: true | |
- name: Install dependencies | |
run: | | |
brew install googletest libarchive | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: 'build' | |
workspaces: | | |
typstdriver/rust -> ../../build/cargo/build | |
- name: Configure | |
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 | |
- name: Build | |
run: cmake --build build -j | |
- name: Run tests | |
run: ctest --output-on-failure --test-dir build | |
analyse: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.5.* | |
cache: true | |
- name: Install additional dependencies | |
run: | | |
sudo add-apt-repository ppa:daschuer/clazy | |
sudo apt-get update | |
sudo apt-get install -y libgmock-dev libhunspell-dev libarchive-dev clazy | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: | | |
typstdriver/rust -> ../../build/cargo/build | |
- name: Run Clazy | |
run: | | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clazy | |
cmake --build build -j | |
- name: Run clippy | |
run: | | |
cargo clippy --no-deps --manifest-path typstdriver/rust/Cargo.toml --target-dir build/cargo/build |