From 2c532482eadb5eeba44a485d1bc12a2c2e016c7f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 2 Apr 2024 11:16:39 +0200 Subject: [PATCH] Prospective CI fix: Run the Qt widget tests with `--test-threads=1` Otherwise Qt segfault as it's not thread safe to have widgets in different threads --- .github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ed612f7e04f..02099e8ea2a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,11 +69,14 @@ jobs: if [ ! -f ./Cargo.lock ]; then cargo update -p clap --precise 4.4.18 fi - - name: Run tests - run: DYLD_FRAMEWORK_PATH=$Qt5_DIR/lib cargo test --verbose --all-features --workspace ${{ matrix.extra_args }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp + - name: Run tests (not qt) + run: DYLD_FRAMEWORK_PATH=$Qt5_DIR/lib cargo test --verbose --all-features --workspace ${{ matrix.extra_args }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp -- --skip=_qt::t env: SLINT_CREATE_SCREENSHOTS: 1 shell: bash + - name: Run tests (qt) + run: DYLD_FRAMEWORK_PATH=$Qt5_DIR/lib cargo test --verbose --all-features --workspace ${{ matrix.extra_args }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp --bin test-driver-rust -- _qt --test-threads=1 + shell: bash - name: Archive screenshots after failed tests if: ${{ failure() }} uses: actions/upload-artifact@v4