fix(stub): features #196
This file contains hidden or 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 | |
| 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' | |
| # all + qt-opengl + qt5 | |
| deps: 'qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qtwebengine5-dev qt5-qmake libgtk-4-dev libwebkitgtk-6.0-dev' | |
| features: 'all,qt-opengl' | |
| - os: 'ubuntu-24.04' | |
| # no features + qt6 | |
| deps: 'qt6-base-dev libgtk-4-dev' | |
| - os: 'ubuntu-24.04' | |
| # all + qt-opengl + qt6 | |
| features: 'all,qt-opengl' | |
| deps: 'qt6-base-dev qt6-base-private-dev qt6-multimedia-dev qt6-webengine-dev qmake6 libgtk-4-dev libwebkitgtk-6.0-dev' | |
| - os: 'ubuntu-24.04' | |
| # gtk4 | |
| deps: 'qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qtwebengine5-dev qt5-qmake libgtk-4-dev libwebkitgtk-6.0-dev' | |
| features: 'all,gtk' | |
| no_default_features: true | |
| - os: 'ubuntu-24.04' | |
| # stub | |
| deps: 'qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qtwebengine5-dev qt5-qmake libgtk-4-dev libwebkitgtk-6.0-dev' | |
| features: 'all' | |
| no_default_features: true | |
| - os: 'windows-latest' | |
| # no features | |
| target: 'x86_64-pc-windows-msvc' | |
| - os: 'windows-latest' | |
| target: 'i686-pc-windows-msvc' | |
| # all + x86 + win32 + additional features | |
| features: 'all,windows-dark-mode,winui-enable-cbs,winui-webview-system' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-msvc' | |
| # all + winui + additional features | |
| features: 'all,winui,windows-dark-mode,winui-enable-cbs,winui-webview-system,winui-content-dialog' | |
| no_default_features: true | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-gnullvm' | |
| # all + gnullvm | |
| features: 'all' | |
| - os: 'windows-latest' | |
| # stub | |
| features: 'all' | |
| no_default_features: true | |
| - os: 'macos-14' | |
| - os: 'macos-14' | |
| features: 'all' | |
| - os: 'macos-14' | |
| target: 'aarch64-apple-ios-macabi' | |
| features: 'all' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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[@]}" |