From 2c92b6dcbe3f288e814cc55e6fc220b90bc4bb89 Mon Sep 17 00:00:00 2001 From: ImLucasBrown <54835354+imlucasbrown@users.noreply.github.com> Date: Sat, 3 May 2025 11:23:57 -0500 Subject: [PATCH 1/2] updating how Qt runtime is setup --- .github/workflows/unittests.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index b2b88d9..7d60645 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -50,17 +50,12 @@ jobs: sudo apt-get update sudo apt-get install -y \ libxkbcommon-x11-0 \ - libxcb-cursor0 \ - libxcb-icccm4 \ - libxcb-image0 \ - libxcb-keysyms1 \ - libxcb-render-util0 \ - libxcb-shape0 \ - libxcb-xfixes0 \ - libxcb-randr0 \ - libxcb-xinerama0 \ - libxcb-util1 \ + libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \ + libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 \ + libxcb-randr0 libxcb-xinerama0 libxcb-util1 \ libegl1 \ + qtbase5-dev qtbase5-dev-tools \ + libqt5gui5 libqt5widgets5 libqt5core5a \ xvfb - name: Ensure PIP @@ -77,9 +72,7 @@ jobs: - name: Run tests with xvfb (Ubuntu + Qt) if: runner.os == 'Linux' && env.QT_DEPENDENCIES == 'true' run: | - Xvfb :99 -screen 0 1024x768x24 & - export DISPLAY=:99 - python -m nxt.cli test + xvfb-run -s "-screen 0 1024x768x24" python -m nxt.cli test - name: Run Unittests from CLI if: env.QT_DEPENDENCIES != 'true' From 83284cb20362ee0863be3e6a350e9fde716d8463 Mon Sep 17 00:00:00 2001 From: ImLucasBrown <54835354+imlucasbrown@users.noreply.github.com> Date: Sat, 3 May 2025 12:05:12 -0500 Subject: [PATCH 2/2] Only run build and deploy if the source changed --- .github/workflows/release.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e261f1..036f08a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,8 +18,25 @@ jobs: uses: nxt-dev/nxt/.github/workflows/unittests.yml@release with: QT_DEPENDENCIES: ${{ inputs.QT_DEPENDENCIES }} + changed-files: + runs-on: ubuntu-latest + name: Check if source actually changed + outputs: + any_changed: ${{ steps.changed-files.outputs.any_changed }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v46.0.5 + with: + files: | + nxt/** + nxt_editor/** build-and-deploy-pypi: - needs: [run-tests] + needs: [run-tests, changed-files] + if: needs.changed-files.outputs.any_changed == 'true' runs-on: ubuntu-latest env: TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} @@ -67,3 +84,11 @@ jobs: - name: Build package and upload run: | python -m nxt.cli -vv exec build/packaging.nxt -s /make_and_upload + + skip-build: + name: Skipped build because source did not change + needs: [changed-files] + runs-on: ubuntu-latest + if: needs.changed-files.outputs.any_changed != 'true' + steps: + - run: echo "No changes in nxt or nxt_editor, skipping build and upload to PyPI." \ No newline at end of file