ci: fix build workflow for modern GitHub Actions runners #141
Workflow file for this run
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 ] | |
| jobs: | |
| build: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, windows-latest, macos-latest] | |
| python_version: ['3.11'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Install APT dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| # xcb libraries needed for Qt6 on headless Linux | |
| sudo apt-get update | |
| sudo apt-get install -y libxcb-cursor0 libfontconfig1 libegl1 | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| pip install poetry | |
| python -m venv venv | |
| source venv/bin/activate || source venv/Scripts/activate | |
| poetry install | |
| - name: Build | |
| shell: bash | |
| run: | | |
| source venv/bin/activate || source venv/Scripts/activate | |
| make build | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| source venv/bin/activate || source venv/Scripts/activate | |
| make test | |
| make typecheck | |
| - name: Run integration tests | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get install -y xvfb | |
| source venv/bin/activate || source venv/Scripts/activate | |
| env QT_DEBUG_PLUGINS=true xvfb-run --auto-servernum make test-integration; | |
| - name: Package | |
| shell: bash | |
| run: | | |
| source venv/bin/activate || source venv/Scripts/activate | |
| make package | |
| - name: Upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: builds-${{ runner.os }}-py${{ matrix.python_version }} | |
| path: dist/aw-qt |