feat(gtk): app id #32
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.setup.os }} | |
| strategy: | |
| matrix: | |
| toolchain: ['nightly'] | |
| setup: | |
| - os: 'ubuntu-22.04' | |
| deps: 'qtbase5-dev' | |
| - os: 'ubuntu-24.04' | |
| deps: 'qtbase5-dev' | |
| - os: 'ubuntu-22.04' | |
| deps: 'qt6-base-dev' | |
| - os: 'ubuntu-24.04' | |
| deps: 'qt6-base-dev' | |
| - os: 'ubuntu-24.04' | |
| features: 'gtk' | |
| no_default_features: true | |
| deps: 'libgtk-4-dev' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-msvc' | |
| - os: 'windows-latest' | |
| target: 'i686-pc-windows-msvc' | |
| - os: 'windows-latest' | |
| target: 'x86_64-pc-windows-gnullvm' | |
| no_default_features: true | |
| - os: 'macos-13' | |
| - os: 'macos-14' | |
| - os: 'macos-15' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - 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 }} build --all-targets --workspace "${ARGS[@]}" |