test_manager: Fix empty-jobs deadlock on state exhaustion #1735
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 openSUSE | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: {} | |
| # Cancel the workflow if a new one is requested for the same PR/branch, but still test all commits on the master branch. | |
| env: | |
| RETRY: 'retry() { "$@" || for i in 1 2 3 4; do echo "retrying..."; sleep 30; "$@" && break; done; }; retry' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master'}} | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| # Note: when changing the versions below, update INSTALL.md as well. | |
| llvm: [18, 19, 20, 21] | |
| build-type: [DEBUG] | |
| include: | |
| - llvm: 21 | |
| build-type: ASAN | |
| - llvm: 21 | |
| build-type: UBSAN | |
| - llvm: 21 | |
| build-type: RelWithDebInfo | |
| extra-flags: -flto=auto | |
| - llvm: 21 | |
| build-type: RelWithDebInfo | |
| env: CC=clang CXX=clang++ | |
| fail-fast: false | |
| container: | |
| image: opensuse/tumbleweed | |
| steps: | |
| - run: | | |
| ${{ env.RETRY }} zypper -n install \ | |
| binutils clang${{ matrix.llvm }}-devel cmake flex gcc-c++ llvm${{ matrix.llvm }}-devel \ | |
| python3-Pebble python3-pytest python3-pytest-mock python3-pytest-subprocess \ | |
| unifdef python3-psutil curl git python3-chardet findutils sudo wget python3-pip python3-jsonschema \ | |
| python3-msgspec python3-zstandard awk | |
| - run: ${{ env.RETRY }} zypper -n install sqlite-devel python3 | |
| - run: ${{ env.RETRY }} pip install --break-system-packages pytest-cov | |
| - uses: rui314/setup-mold@v1 | |
| with: | |
| make-default: false | |
| - run: ld --version | |
| - run: nproc | |
| - uses: actions/checkout@v6 | |
| - name: build | |
| run: | | |
| mkdir objdir | |
| cd objdir | |
| ${{ matrix.env }} cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_CXX_FLAGS="${{ matrix.extra-flags }}" -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" | |
| make -j`nproc` VERBOSE=1 | |
| - name: test | |
| run: pytest | |
| working-directory: objdir | |
| CI-macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| - run: ${{ env.RETRY }} brew install llvm | |
| - run: ${{ env.RETRY }} pip install chardet jsonschema msgspec pebble psutil pytest pytest-mock pytest-subprocess zstandard | |
| - run: mkdir objdir | |
| - run: cmake .. -DCMAKE_PREFIX_PATH="/opt/homebrew/opt/llvm" -DCMAKE_C_COMPILER="/opt/homebrew/opt/llvm/bin/clang" | |
| -DCMAKE_CXX_COMPILER="/opt/homebrew/opt/llvm/bin/clang++" | |
| -DCMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/opt/llvm/lib/c++ -L/opt/homebrew/opt/llvm/lib/unwind -lunwind -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++" | |
| working-directory: objdir | |
| - run: make -j`sysctl -n hw.physicalcpu` VERBOSE=1 | |
| working-directory: objdir | |
| - run: pytest -x -s | |
| working-directory: objdir | |
| CI-python: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| container: | |
| image: ubuntu:latest | |
| strategy: | |
| matrix: | |
| python: | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| - "3.14t" | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: ${{ env.RETRY }} apt-get update | |
| - run: ${{ env.RETRY }} apt-get -qq install -y gcc g++ wget lsb-release software-properties-common gnupg git cmake flex vim unifdef sudo | |
| - run: chown -R $(whoami) /github/home # workaround for "directory ... pip ... is not owned or is not writable by the current user" | |
| - run: rm -rf /__t/Python # workaround for "error when attempting to execute the process ... pip" | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "${{ matrix.python }}" | |
| cache: 'pip' | |
| - run: ${{ env.RETRY }} pip install chardet jsonschema msgspec pebble psutil pytest pytest-mock pytest-subprocess zstandard ${{ join(matrix.extra-deps, ' ') }} | |
| - run: ${{ env.RETRY }} wget https://apt.llvm.org/llvm.sh | |
| - run: chmod +x llvm.sh | |
| - run: ${{ env.RETRY }} ./llvm.sh all | |
| - run: mkdir objdir | |
| - run: cmake .. | |
| working-directory: objdir | |
| - run: make -j`nproc` VERBOSE=1 | |
| working-directory: objdir | |
| - run: python -m pytest | |
| working-directory: objdir | |
| ruff: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| container: | |
| image: opensuse/tumbleweed | |
| steps: | |
| - run: ${{ env.RETRY }} zypper -n install python3-pip | |
| - uses: actions/checkout@v6 | |
| - run: ${{ env.RETRY }} pip install --break-system-packages ruff | |
| - run: ruff check | |
| - run: ruff format --diff | |
| pytype: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| container: | |
| image: opensuse/tumbleweed | |
| steps: | |
| - run: ${{ env.RETRY }} zypper -n install binutils clang-devel cmake flex gcc-c++ llvm-devel python312 | |
| - uses: actions/checkout@v6 | |
| - name: prepare venv | |
| # Pytype currently only supports Python <=3.12 | |
| run: | | |
| python3.12 -m venv ~/venv | |
| source ~/venv/bin/activate | |
| ${{ env.RETRY }} pip install chardet jsonschema msgspec pebble psutil pytest pytest-mock pytest-subprocess pytype zstandard | |
| - name: build | |
| run: | | |
| source ~/venv/bin/activate | |
| mkdir objdir | |
| cd objdir | |
| ${{ matrix.env }} cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_CXX_FLAGS=${{ matrix.extra-flags }} | |
| make -j`nproc` VERBOSE=1 | |
| - name: pytype | |
| run: | | |
| source ~/venv/bin/activate | |
| pytype --keep-going --jobs=auto objdir | |
| pyright: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| container: | |
| image: opensuse/tumbleweed | |
| steps: | |
| - run: | | |
| ${{ env.RETRY }} zypper -n install \ | |
| binutils clang-devel cmake flex gcc-c++ llvm-devel python3 python3-pyright \ | |
| python3-Pebble python3-pytest python3-pytest-mock python3-pytest-subprocess \ | |
| unifdef python3-psutil curl git python3-chardet findutils sudo wget python3-jsonschema \ | |
| python3-msgspec python3-zstandard | |
| - uses: actions/checkout@v6 | |
| - run: mkdir objdir | |
| - run: cmake .. | |
| working-directory: objdir | |
| - run: make -j`nproc` VERBOSE=1 | |
| working-directory: objdir | |
| - run: pyright | |
| working-directory: objdir |