From 13d86f723150eb0c28bf57643aa86ed54e7b942d Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 16 Dec 2025 17:37:10 +0000 Subject: [PATCH 01/17] build: remove hardcoded python version in test cache-app-data job --- .github/workflows/test-impl.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 2f1e123..d2f1c21 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -191,7 +191,7 @@ jobs: - name: Set up python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: ${{ fromJSON(inputs.python-versions)[-1] }} - name: Set up poetry uses: hpcflow/github-support/setup-poetry@main @@ -203,7 +203,7 @@ jobs: uses: hpcflow/github-support/init-cache@main with: name: test - version: ${{ matrix.python-version }} + version: ${{ fromJSON(inputs.python-versions)[-1] }} - name: Install dependencies timeout-minutes: ${{ inputs.install-timeout-minutes }} From c832628778586f9f777706a9b0289f0a1e3764c3 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 16 Dec 2025 17:39:15 +0000 Subject: [PATCH 02/17] build: cache app data once when building exes in release --- .github/workflows/release-impl.yml | 134 +++++++++++++++++++++++------ 1 file changed, 107 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index ecf73eb..648d7e1 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -288,8 +288,51 @@ jobs: name: CHANGELOG_increment path: CHANGELOG_increment.md + cache-app-data: + permissions: + # No write permission + contents: read + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + ref: ${{ inputs.ref }} + + - name: Set up python + uses: actions/setup-python@v6 + with: + python-version: ${{ inputs.python-version }} + + - name: Set up poetry + uses: hpcflow/github-support/setup-poetry@main + with: + version: ${{ inputs.poetry-version }} + + - name: Cache dependencies + uses: hpcflow/github-support/init-cache@main + with: + name: test + version: ${{ inputs.python-version }} + + - name: Install dependencies + run: | + poetry install --without dev,pyinstaller + + - name: Cache all app data and programs + run: | + poetry run ${{ inputs.executable_name }} data cache --all + poetry run ${{ inputs.executable_name }} program cache --all + + - name: Upload all cached app data/programs + id: upload-cached-app-data + uses: actions/upload-artifact@v6 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ~/.cache/${{ inputs.executable_name }} + build-executables: - needs: bump-version + needs: [bump-version, cache-app-data] strategy: fail-fast: false matrix: @@ -303,6 +346,11 @@ jobs: executable_os: macOS runs-on: ${{ matrix.os }} + env: + BUILT_EXE_BASE_NAME: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }} + BUILT_EXE_PATH_DIR: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir${{ matrix.executable_ext }} + BUILT_EXE_PATH_DIR_ZIPPED: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir.zip + BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} steps: - name: Checkout uses: actions/checkout@v6 @@ -317,6 +365,13 @@ jobs: with: name: build version: ${{ inputs.python-version }} + + - name: Download prepared cached app data + uses: actions/download-artifact@v7 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ${{ inputs.executable_name }}-app-data-cache + - name: Set up poetry uses: hpcflow/github-support/setup-poetry@main with: @@ -330,74 +385,88 @@ jobs: working-directory: ${{ inputs.pyinstaller_dir }} run: ./make.sh $TARGET INFO 'onefile' env: - TARGET: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }} + TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }} - name: Build with pyinstaller (non-Windows, folder) if: runner.os != 'Windows' working-directory: ${{ inputs.pyinstaller_dir }} run: ./make.sh $TARGET INFO 'onedir' env: - TARGET: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag}}-${{ matrix.executable_os }}-dir + TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Build with pyinstaller (Windows, file) if: runner.os == 'Windows' working-directory: ${{ inputs.pyinstaller_dir }} run: ./make.ps1 -ExeName $Env:TARGET -LogLevel INFO -BuildType 'onefile' env: - TARGET: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }} + TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }} - name: Build with pyinstaller (Windows, folder) if: runner.os == 'Windows' working-directory: ${{ inputs.pyinstaller_dir }} run: ./make.ps1 -ExeName $Env:TARGET -LogLevel INFO -BuildType 'onedir' env: - TARGET: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir + TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Version check (file) uses: hpcflow/github-support/compare@0.3 with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" - command: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} --version + command: ${{ env.BUILT_EXE_PATH_FILE }} --version - name: Version check (folder) uses: hpcflow/github-support/compare@0.3 with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" - command: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir${{ matrix.executable_ext }} --version + command: ${{ env.BUILT_EXE_PATH_DIR }} --version + + - name: Install cached app data + env: + PYTHONUTF8: 1 + run: | + ${{ env.BUILT_EXE_PATH_DIR }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data + ${{ env.BUILT_EXE_PATH_DIR }} data --list + ${{ env.BUILT_EXE_PATH_DIR }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + ${{ env.BUILT_EXE_PATH_DIR }} program --list - name: Run test suite on the frozen app (folder) env: GH_TOKEN: ${{ secrets.general-token }} run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir${{ matrix.executable_ext }} test + ${{ env.BUILT_EXE_PATH_DIR }} test - name: Compress folder (windows, folder) if: runner.os == 'Windows' working-directory: ${{ inputs.pyinstaller_dir }} - run: ./compress.ps1 -ExeName '${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir' -BuildType 'onedir' + run: ./compress.ps1 -ExeName '${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir' -BuildType 'onedir' - name: Compress folder (non-windows, folder) if: runner.os != 'Windows' working-directory: ${{ inputs.pyinstaller_dir }} run: ./compress.sh $TARGET 'onedir' env: - TARGET: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir + TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Upload executable artifact (file) uses: actions/upload-artifact@v6 with: - name: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} - path: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} + name: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} + path: ${{ env.BUILT_EXE_PATH_FILE }} - name: Upload executable artifact (compressed folder) uses: actions/upload-artifact@v6 with: - name: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir.zip - path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir.zip + name: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir.zip + path: ${{ env.BUILT_EXE_PATH_DIR_ZIPPED }} build-executables-linux: runs-on: ubuntu-latest - needs: bump-version + needs: [bump-version, cache-app-data] + env: + BUILT_EXE_BASE_NAME: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }} + BUILT_EXE_PATH_DIR: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir + BUILT_EXE_PATH_DIR_ZIPPED: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir.zip + BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ env.BUILT_EXE_BASE_NAME }}-linux steps: - name: Checkout uses: actions/checkout@v6 @@ -409,6 +478,12 @@ jobs: name: build version: ${{ inputs.python-version }} + - name: Download prepared cached app data + uses: actions/download-artifact@v7 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ${{ inputs.executable_name }}-app-data-cache + - name: Build executables within Docker uses: addnab/docker-run-action@v3 with: @@ -419,53 +494,58 @@ jobs: cd /home poetry config virtualenvs.in-project true poetry install --without dev - base="${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}" vers_expected="${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" # build with pyinstaller for Rocky Linux (file) cd ${{ inputs.pyinstaller_dir }} - ./make.sh ${base}-linux INFO onefile + ./make.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux INFO onefile cd .. # version check (file) - vers=$(${{ inputs.pyinstaller_dir }}/dist/onefile/${base}-linux --version) + vers=$(${{ env.BUILT_EXE_PATH_FILE }} --version) echo $vers echo $vers_expected [ "$vers" = "$vers_expected" ] + # install cache data + ${{ env.BUILT_EXE_PATH_FILE }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data + ${{ env.BUILT_EXE_PATH_FILE }} data --list + ${{ env.BUILT_EXE_PATH_FILE }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + ${{ env.BUILT_EXE_PATH_FILE }} program --list + # run test suite on the frozen app (file) - ${{ inputs.pyinstaller_dir }}/dist/onefile/${base}-linux test + ${{ env.BUILT_EXE_PATH_FILE }} test # build with pyinstaller for Rocky Linux (folder) cd ${{ inputs.pyinstaller_dir }} - ./make.sh ${base}-linux-dir INFO onedir + ./make.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir INFO onedir cd .. # version check (folder) - vers=$(${{ inputs.pyinstaller_dir }}/dist/onedir/${base}-linux-dir/${base}-linux-dir --version) + vers=$(${{ env.BUILT_EXE_PATH_DIR }} --version) echo $vers echo $vers_expected [ "$vers" = "$vers_expected" ] # run test suite on the frozen app (folder) - ${{ inputs.pyinstaller_dir }}/dist/onedir/${base}-linux-dir/${base}-linux-dir test + ${{ env.BUILT_EXE_PATH_DIR }} test # Compress folder (folder) cd ${{ inputs.pyinstaller_dir }} - ./compress.sh ${base}-linux-dir 'onedir' + ./compress.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir 'onedir' cd .. - name: Upload executable artifact (file) uses: actions/upload-artifact@v6 with: - name: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux - path: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux + name: ${{ env.BUILT_EXE_BASE_NAME }}-linux + path: ${{ env.BUILT_EXE_PATH_FILE }} - name: Upload executable artifact (compressed folder) uses: actions/upload-artifact@v6 with: - name: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux-dir.zip - path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux-dir.zip + name: ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir.zip + path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir.zip make-workflow-benchmark: needs: bump-version From 2929c0cae9735c41fa90a66c690cc6ea02c58f34 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 16 Dec 2025 21:26:57 +0000 Subject: [PATCH 03/17] fix: unlikely to work --- .github/workflows/release-impl.yml | 13 ++++++------- .github/workflows/test-impl.yml | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index 648d7e1..257db97 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -348,9 +348,9 @@ jobs: runs-on: ${{ matrix.os }} env: BUILT_EXE_BASE_NAME: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }} - BUILT_EXE_PATH_DIR: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir${{ matrix.executable_ext }} - BUILT_EXE_PATH_DIR_ZIPPED: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir.zip - BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} + BUILT_EXE_PATH_DIR: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir${{ matrix.executable_ext }} + BUILT_EXE_PATH_DIR_ZIPPED: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}-dir.zip + BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} steps: - name: Checkout uses: actions/checkout@v6 @@ -463,10 +463,9 @@ jobs: runs-on: ubuntu-latest needs: [bump-version, cache-app-data] env: - BUILT_EXE_BASE_NAME: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }} - BUILT_EXE_PATH_DIR: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir - BUILT_EXE_PATH_DIR_ZIPPED: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir.zip - BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ env.BUILT_EXE_BASE_NAME }}-linux + BUILT_EXE_PATH_DIR: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux-dir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux-dir + BUILT_EXE_PATH_DIR_ZIPPED: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux-dir.zip + BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux steps: - name: Checkout uses: actions/checkout@v6 diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index d2f1c21..ed03a85 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -191,7 +191,7 @@ jobs: - name: Set up python uses: actions/setup-python@v6 with: - python-version: ${{ fromJSON(inputs.python-versions)[-1] }} + python-version: "3.13" - name: Set up poetry uses: hpcflow/github-support/setup-poetry@main @@ -203,7 +203,7 @@ jobs: uses: hpcflow/github-support/init-cache@main with: name: test - version: ${{ fromJSON(inputs.python-versions)[-1] }} + version: "3.13" - name: Install dependencies timeout-minutes: ${{ inputs.install-timeout-minutes }} From ae37d461db472e3ea969e4088998dd0b76d21b17 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 16 Dec 2025 23:12:03 +0000 Subject: [PATCH 04/17] fix: use cached app data in build-exes --- .github/workflows/build-exes-impl.yml | 167 +++++++++++++++----------- 1 file changed, 98 insertions(+), 69 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index ad504de..52e2146 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -140,6 +140,59 @@ jobs: echo "sha is: $sha" echo "sha=$sha" >> $GITHUB_OUTPUT + cache-app-data: + permissions: + # No write permission + contents: read + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + ref: ${{ inputs.ref }} + + - name: Set up python + uses: actions/setup-python@v6 + with: + python-version: ${{ inputs.python-version }} + + - name: Set up poetry + uses: hpcflow/github-support/setup-poetry@main + with: + version: ${{ inputs.poetry-version }} + + - name: Cache dependencies + uses: hpcflow/github-support/init-cache@main + with: + name: test + version: ${{ inputs.python-version }} + + - name: Install dependencies + run: | + poetry install --without dev,pyinstaller + + - name: Set data dir # in case we have a custom tag to use + if: inputs.config_data_dir != '' + run: | + poetry run ${{ inputs.executable_name }} config set data_dir ${{ inputs.config_data_dir }} + + - name: Set program dir # in case we have a custom tag to use + if: inputs.config_program_dir != '' + run: | + poetry run ${{ inputs.executable_name }} config set program_dir ${{ inputs.config_program_dir }} + + - name: Cache all app data and programs + run: | + poetry run ${{ inputs.executable_name }} data cache --all + poetry run ${{ inputs.executable_name }} program cache --all + + - name: Upload all cached app data/programs + id: upload-cached-app-data + uses: actions/upload-artifact@v6 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ~/.cache/${{ inputs.executable_name }} + windows: name: Build Windows Executables if: inputs.build_windows == 'true' @@ -147,7 +200,7 @@ jobs: success: ${{ steps.upload-file.outcome == 'success' || steps.upload-folder.outcome == 'success' }} file: ${{ steps.upload-file.outputs.artifact-url }} folder: ${{ steps.upload-folder.outputs.artifact-url }} - needs: status + needs: [status, cache-app-data] runs-on: windows-latest steps: - name: Checkout @@ -161,6 +214,13 @@ jobs: with: name: build-exe version: ${{ inputs.python-version }} + + - name: Download prepared cached app data + uses: actions/download-artifact@v7 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ${{ inputs.executable_name }}-app-data-cache + - name: Set up poetry uses: hpcflow/github-support/setup-poetry@main with: @@ -211,25 +271,14 @@ jobs: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-build path: ${{ inputs.pyinstaller_dir }}/build/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win - - name: Set data dir (file) # in case we have a custom tag to use - if: steps.win_onefile.outcome == 'success' && inputs.config_data_dir != '' - run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe config set data_dir ${{ inputs.config_data_dir }} - - - name: Set program dir (file) # in case we have a custom tag to use - if: steps.win_onefile.outcome == 'success' && inputs.config_program_dir != '' - run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe config set program_dir ${{ inputs.config_program_dir }} - - - name: Set data dir (folder) # in case we have a custom tag to use - if: steps.win_onedir.outcome == 'success' && inputs.config_data_dir != '' - run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe config set data_dir ${{ inputs.config_data_dir }} - - - name: Set program dir (folder) # in case we have a custom tag to use - if: steps.win_onedir.outcome == 'success' && inputs.config_program_dir != '' + - name: Install cached app data + env: + PYTHONUTF8: 1 run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe config set program_dir ${{ inputs.config_program_dir }} + poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data + poetry run ${{ inputs.executable_name }} data --list + poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + poetry run ${{ inputs.executable_name }} program --list - name: Run test suite on the frozen app (file) if: steps.win_onefile.outcome == 'success' @@ -254,7 +303,7 @@ jobs: success: ${{ steps.upload-file.outcome == 'success' || steps.upload-folder.outcome == 'success' }} file: ${{ steps.upload-file.outputs.artifact-url }} folder: ${{ steps.upload-folder.outputs.artifact-url }} - needs: status + needs: [status, cache-app-data] runs-on: macos-latest steps: - name: Checkout @@ -268,6 +317,13 @@ jobs: with: name: build-exe version: ${{ inputs.python-version }} + + - name: Download prepared cached app data + uses: actions/download-artifact@v7 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ${{ inputs.executable_name }}-app-data-cache + - name: Set up poetry uses: hpcflow/github-support/setup-poetry@main with: @@ -318,25 +374,12 @@ jobs: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-build path: ${{ inputs.pyinstaller_dir }}/build/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS - - name: Set data dir (file) # in case we have a custom tag to use - if: steps.mac_onefile.outcome == 'success' && inputs.config_data_dir != '' - run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS config set data_dir ${{ inputs.config_data_dir }} - - - name: Set program dir (file) # in case we have a custom tag to use - if: steps.mac_onefile.outcome == 'success' && inputs.config_program_dir != '' + - name: Install cached app data run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS config set program_dir ${{ inputs.config_program_dir }} - - - name: Set data dir (folder) # in case we have a custom tag to use - if: steps.mac_onedir.outcome == 'success' && inputs.config_data_dir != '' - run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir config set data_dir ${{ inputs.config_data_dir }} - - - name: Set program dir (folder) # in case we have a custom tag to use - if: steps.mac_onedir.outcome == 'success' && inputs.config_program_dir != '' - run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir config set program_dir ${{ inputs.config_program_dir }} + poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data + poetry run ${{ inputs.executable_name }} data --list + poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + poetry run ${{ inputs.executable_name }} program --list - name: Run test suite on the frozen app (file) if: steps.mac_onefile.outcome == 'success' @@ -361,7 +404,7 @@ jobs: success: ${{ steps.upload-file.outcome == 'success' || steps.upload-folder.outcome == 'success' }} file: ${{ steps.upload-file.outputs.artifact-url }} folder: ${{ steps.upload-folder.outputs.artifact-url }} - needs: status + needs: [status, cache-app-data] runs-on: ubuntu-latest steps: - name: Checkout @@ -372,6 +415,12 @@ jobs: name: build-exe version: ${{ inputs.python-version }} + - name: Download prepared cached app data + uses: actions/download-artifact@v7 + with: + name: ${{ inputs.executable_name }}-app-data-cache + path: ${{ inputs.executable_name }}-app-data-cache + - name: Build executable (file) within Docker id: linux_onefile if: inputs.build_onefile == 'true' @@ -390,21 +439,11 @@ jobs: ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux ${{ inputs.logLevel }} onefile cd .. - # Set data dir in case we have a custom tag to use - if [[ -n "${{ inputs.config_data_dir }}" ]]; then - echo "config_data_dir is not empty: ${{ inputs.config_data_dir }}" - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux config set data_dir ${{ inputs.config_data_dir }} - else - echo "config_data_dir is empty, skipping command" - fi - - # Set program dir in case we have a custom tag to use - if [[ -n "${{ inputs.config_program_dir }}" ]]; then - echo "config_program_dir is not empty: ${{ inputs.config_program_dir }}" - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux config set program_dir ${{ inputs.config_program_dir }} - else - echo "config_program_dir is empty, skipping command" - fi + # install cache data + poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data + poetry run ${{ inputs.executable_name }} data --list + poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + poetry run ${{ inputs.executable_name }} program --list export PYTHONUNBUFFERED=ok # run test suite on the frozen app (file) @@ -428,21 +467,11 @@ jobs: ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir ${{ inputs.logLevel }} onedir cd .. - # Set data dir in case we have a custom tag to use - if [[ -n "${{ inputs.config_data_dir }}" ]]; then - echo "config_data_dir is not empty: ${{ inputs.config_data_dir }}" - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir config set data_dir ${{ inputs.config_data_dir }} - else - echo "config_data_dir is empty, skipping command" - fi - - # Set program dir in case we have a custom tag to use - if [[ -n "${{ inputs.config_program_dir }}" ]]; then - echo "config_program_dir is not empty: ${{ inputs.config_program_dir }}" - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir config set program_dir ${{ inputs.config_program_dir }} - else - echo "config_program_dir is empty, skipping command" - fi + # install cache data + poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data + poetry run ${{ inputs.executable_name }} data --list + poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + poetry run ${{ inputs.executable_name }} program --list export PYTHONUNBUFFERED=ok # run test suite on the frozen app (folder) From 1a3eb4faa5040db0dc9f739048a1fb7d317a39a4 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 17 Dec 2025 13:39:37 +0000 Subject: [PATCH 05/17] test: add integration testing to build-exes --- .github/workflows/build-exes-impl.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 52e2146..0cc531a 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -33,6 +33,12 @@ on: required: false type: string default: "" + integration_test_args: + description: > + CLI args to pass verbatim to pytest (integration tests). + required: false + type: string + default: "" executable_name: description: > Template parameter. @@ -296,6 +302,14 @@ jobs: run: | ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} + - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build + if: steps.win_onefile.outcome == 'success' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PYTHONUNBUFFERED: ok + run: | + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.integration_test_args }} --integration + macos: name: Build macOS Executables if: inputs.build_macos == 'true' @@ -397,6 +411,14 @@ jobs: run: | ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir test ${{ inputs.unit_test_args }} + - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build + if: steps.mac_onefile.outcome == 'success' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PYTHONUNBUFFERED: ok + run: | + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test ${{ inputs.integration_test_args }} --integration + linux: name: Build Linux (Rocky Linux 8) Executables if: inputs.build_linux == 'true' @@ -449,6 +471,10 @@ jobs: # run test suite on the frozen app (file) ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.unit_test_args }} + # run integration test suite on the frozen app (file) + # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.integration_test_args }} --integration + - name: Build executable (folder) within Docker id: linux_onedir if: inputs.build_onedir == 'true' From 3a994c4e1f1f84e5b5e46358e9e2f56689cf7583 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 17 Dec 2025 15:52:00 +0000 Subject: [PATCH 06/17] test: setup python environment to support integration tests that use script_data_in/out --- .github/workflows/build-exes-impl.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 0cc531a..214f331 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -235,6 +235,10 @@ jobs: - name: Install dependencies run: poetry install --without dev + - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` + run: | + poetry run ${{ inputs.executable_name }} env setup python --use-current + - name: Build with pyinstaller for Windows (file) id: win_onefile if: inputs.build_onefile == 'true' @@ -346,6 +350,10 @@ jobs: - name: Install dependencies run: poetry install --without dev + - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` + run: | + poetry run ${{ inputs.executable_name }} env setup python --use-current + - name: Build with pyinstaller for macOS (file) id: mac_onefile if: inputs.build_onefile == 'true' @@ -456,6 +464,10 @@ jobs: poetry config virtualenvs.in-project true poetry install --without dev + # Configure the app's Python environment + # this allows us to run integration tests that use `script_data_in/out: "direct"` + poetry run ${{ inputs.executable_name }} env setup python --use-current + # build with pyinstaller for Rocky Linux (file) cd ${{ inputs.pyinstaller_dir }} ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux ${{ inputs.logLevel }} onefile @@ -488,6 +500,10 @@ jobs: poetry config virtualenvs.in-project true poetry install --without dev + # Configure the app's Python environment + # this allows us to run integration tests that use `script_data_in/out: "direct"` + poetry run ${{ inputs.executable_name }} env setup python --use-current + # build with pyinstaller for Rocky Linux (folder) cd ${{ inputs.pyinstaller_dir }} ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir ${{ inputs.logLevel }} onedir From 12bfcee453cce91366fe165c41aa4540ac7541d0 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 17 Dec 2025 16:09:00 +0000 Subject: [PATCH 07/17] fix: some debug changes --- .github/workflows/build-exes-impl.yml | 36 ++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 214f331..dc629ef 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -238,6 +238,8 @@ jobs: - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` run: | poetry run ${{ inputs.executable_name }} env setup python --use-current + poetry run ${{ inputs.executable_name }} config get --all + cat ~/.${{ inputs.executable_name }}/configured_envs.yaml - name: Build with pyinstaller for Windows (file) id: win_onefile @@ -290,21 +292,27 @@ jobs: poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs poetry run ${{ inputs.executable_name }} program --list - - name: Run test suite on the frozen app (file) - if: steps.win_onefile.outcome == 'success' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PYTHONUNBUFFERED: ok - run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.unit_test_args }} - - - name: Run test suite on the frozen app (folder) - if: steps.win_onedir.outcome == 'success' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PYTHONUNBUFFERED: ok + # - name: Run test suite on the frozen app (file) + # if: steps.win_onefile.outcome == 'success' + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PYTHONUNBUFFERED: ok + # run: | + # ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.unit_test_args }} + + # - name: Run test suite on the frozen app (folder) + # if: steps.win_onedir.outcome == 'success' + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PYTHONUNBUFFERED: ok + # run: | + # ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} + + - name: check envs run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} + poetry run ${{ inputs.executable_name }} config get --all + poetry run ${{ inputs.executable_name }} env list + cat ~/.${{ inputs.executable_name }}/configured_envs.yaml - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.win_onefile.outcome == 'success' From 90b54cda0d31b8e7bdc46967508393f9dcf0dda9 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 18 Dec 2025 22:49:00 +0000 Subject: [PATCH 08/17] build: check envs --- .github/workflows/build-exes-impl.yml | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index dc629ef..3926743 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -236,10 +236,12 @@ jobs: run: poetry install --without dev - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` + env: + PYTHONUTF8: 1 run: | poetry run ${{ inputs.executable_name }} env setup python --use-current - poetry run ${{ inputs.executable_name }} config get --all - cat ~/.${{ inputs.executable_name }}/configured_envs.yaml + poetry run ${{ inputs.executable_name }} env list + poetry run ${{ inputs.executable_name }} env show --label python - name: Build with pyinstaller for Windows (file) id: win_onefile @@ -292,27 +294,21 @@ jobs: poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs poetry run ${{ inputs.executable_name }} program --list - # - name: Run test suite on the frozen app (file) - # if: steps.win_onefile.outcome == 'success' - # env: - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # PYTHONUNBUFFERED: ok - # run: | - # ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.unit_test_args }} - - # - name: Run test suite on the frozen app (folder) - # if: steps.win_onedir.outcome == 'success' - # env: - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # PYTHONUNBUFFERED: ok - # run: | - # ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} - - - name: check envs + - name: Run test suite on the frozen app (file) + if: steps.win_onefile.outcome == 'success' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PYTHONUNBUFFERED: ok run: | - poetry run ${{ inputs.executable_name }} config get --all - poetry run ${{ inputs.executable_name }} env list - cat ~/.${{ inputs.executable_name }}/configured_envs.yaml + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.unit_test_args }} + + - name: Run test suite on the frozen app (folder) + if: steps.win_onedir.outcome == 'success' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PYTHONUNBUFFERED: ok + run: | + ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.win_onefile.outcome == 'success' @@ -361,6 +357,8 @@ jobs: - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` run: | poetry run ${{ inputs.executable_name }} env setup python --use-current + poetry run ${{ inputs.executable_name }} env list + poetry run ${{ inputs.executable_name }} env show --label python - name: Build with pyinstaller for macOS (file) id: mac_onefile @@ -475,6 +473,8 @@ jobs: # Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` poetry run ${{ inputs.executable_name }} env setup python --use-current + poetry run ${{ inputs.executable_name }} env list + poetry run ${{ inputs.executable_name }} env show --label python # build with pyinstaller for Rocky Linux (file) cd ${{ inputs.pyinstaller_dir }} From c0b9eed53a4f770307a53658c8d48a0e83584b07 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 20 Dec 2025 13:28:22 +0000 Subject: [PATCH 09/17] build: add tmate debugging to build-exes build: add options to run unit/integration tests --- .github/workflows/build-exes-impl.yml | 68 ++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 3926743..2f044db 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -28,11 +28,23 @@ on: required: true default: "INFO" type: string + tmate_debugging: + description: "Enable tmate debugging (https://github.com/marketplace/actions/debugging-with-tmate)" + required: true + type: string + unit_tests: + description: "Run unit tests on the built executables." + required: true + type: string unit_test_args: description: "CLI args to pass verbatim to pytest (unit tests)." required: false type: string default: "" + integration_tests: + description: "Run integration tests on the built executables." + required: true + type: string integration_test_args: description: > CLI args to pass verbatim to pytest (integration tests). @@ -211,6 +223,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + + - name: Setup tmate session + if: inputs.tmate_debugging == 'true' + uses: mxschmitt/action-tmate@v3 + with: + detached: true + - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@v6 with: @@ -295,7 +314,7 @@ jobs: poetry run ${{ inputs.executable_name }} program --list - name: Run test suite on the frozen app (file) - if: steps.win_onefile.outcome == 'success' + if: steps.win_onefile.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok @@ -303,7 +322,7 @@ jobs: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.unit_test_args }} - name: Run test suite on the frozen app (folder) - if: steps.win_onedir.outcome == 'success' + if: steps.win_onedir.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok @@ -311,7 +330,7 @@ jobs: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build - if: steps.win_onefile.outcome == 'success' + if: steps.win_onefile.outcome == 'success' && inputs.integration_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok @@ -330,6 +349,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + + - name: Setup tmate session + if: inputs.tmate_debugging == 'true' + uses: mxschmitt/action-tmate@v3 + with: + detached: true + - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@v6 with: @@ -410,7 +436,7 @@ jobs: poetry run ${{ inputs.executable_name }} program --list - name: Run test suite on the frozen app (file) - if: steps.mac_onefile.outcome == 'success' + if: steps.mac_onefile.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok @@ -418,7 +444,7 @@ jobs: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test ${{ inputs.unit_test_args }} - name: Run test suite on the frozen app (folder) - if: steps.mac_onedir.outcome == 'success' + if: steps.mac_onedir.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok @@ -426,7 +452,7 @@ jobs: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir test ${{ inputs.unit_test_args }} - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build - if: steps.mac_onefile.outcome == 'success' + if: steps.mac_onefile.outcome == 'success' && inputs.integration_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok @@ -442,9 +468,19 @@ jobs: folder: ${{ steps.upload-folder.outputs.artifact-url }} needs: [status, cache-app-data] runs-on: ubuntu-latest + env: + UNIT_TESTS: ${{ inputs.unit_tests }} + INTEGRATION_TESTS: ${{ inputs.unit_tests }} steps: - name: Checkout uses: actions/checkout@v6 + + - name: Setup tmate session + if: inputs.tmate_debugging == 'true' + uses: mxschmitt/action-tmate@v3 + with: + detached: true + - name: Cache dependencies uses: hpcflow/github-support/init-cache@0.3 with: @@ -488,12 +524,16 @@ jobs: poetry run ${{ inputs.executable_name }} program --list export PYTHONUNBUFFERED=ok - # run test suite on the frozen app (file) - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.unit_test_args }} + if [[ "$INTEGRATION_TESTS" == "true" ]]; then + # run test suite on the frozen app (file) + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.unit_test_args }} + fi - # run integration test suite on the frozen app (file) - # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.integration_test_args }} --integration + if [[ "$INTEGRATION_TESTS" == "true" ]]; then + # run integration test suite on the frozen app (file) + # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.integration_test_args }} --integration + fi - name: Build executable (folder) within Docker id: linux_onedir @@ -524,8 +564,10 @@ jobs: poetry run ${{ inputs.executable_name }} program --list export PYTHONUNBUFFERED=ok - # run test suite on the frozen app (folder) - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir test ${{ inputs.unit_test_args }} + if [[ "$UNIT_TESTS" == "true" ]]; then + # run test suite on the frozen app (folder) + ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir test ${{ inputs.unit_test_args }} + fi - name: Upload executable artifact (file) id: upload-file From 9932ff7c6cabf9591d1dcab83d89f0ee4e4133d6 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 00:14:58 +0000 Subject: [PATCH 10/17] fix: env var --- .github/workflows/build-exes-impl.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 2f044db..3ae285c 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -470,8 +470,11 @@ jobs: runs-on: ubuntu-latest env: UNIT_TESTS: ${{ inputs.unit_tests }} - INTEGRATION_TESTS: ${{ inputs.unit_tests }} + INTEGRATION_TESTS: ${{ inputs.integration_tests }} steps: + - run: | + echo "UNIT_TESTS='$UNIT_TESTS'" + echo "INTEGRATION_TESTS='$INTEGRATION_TESTS'" - name: Checkout uses: actions/checkout@v6 @@ -524,12 +527,12 @@ jobs: poetry run ${{ inputs.executable_name }} program --list export PYTHONUNBUFFERED=ok - if [[ "$INTEGRATION_TESTS" == "true" ]]; then + if [ "$UNIT_TESTS" = "true" ]; then # run test suite on the frozen app (file) ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.unit_test_args }} fi - if [[ "$INTEGRATION_TESTS" == "true" ]]; then + if [ "$INTEGRATION_TESTS" == "true" ]; then # run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.integration_test_args }} --integration @@ -564,7 +567,7 @@ jobs: poetry run ${{ inputs.executable_name }} program --list export PYTHONUNBUFFERED=ok - if [[ "$UNIT_TESTS" == "true" ]]; then + if [ "$UNIT_TESTS" == "true" ]; then # run test suite on the frozen app (folder) ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir test ${{ inputs.unit_test_args }} fi From cddc7961748d2d647b11196059666f5b761a186e Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 00:33:24 +0000 Subject: [PATCH 11/17] fix: env var --- .github/workflows/build-exes-impl.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 3ae285c..6c313a5 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -468,13 +468,7 @@ jobs: folder: ${{ steps.upload-folder.outputs.artifact-url }} needs: [status, cache-app-data] runs-on: ubuntu-latest - env: - UNIT_TESTS: ${{ inputs.unit_tests }} - INTEGRATION_TESTS: ${{ inputs.integration_tests }} steps: - - run: | - echo "UNIT_TESTS='$UNIT_TESTS'" - echo "INTEGRATION_TESTS='$INTEGRATION_TESTS'" - name: Checkout uses: actions/checkout@v6 @@ -502,7 +496,11 @@ jobs: uses: addnab/docker-run-action@v3 with: image: ghcr.io/hpcflow/rockylinux8-python:latest - options: -v ${{ github.workspace }}:/home --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} + options: | + -v ${{ github.workspace }}:/home + --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} + --env UNIT_TESTS=${{ inputs.unit_tests }} + --env INTEGRATION_TESTS=${{ inputs.integration_tests }} run: | # set up poetry cd /home From 6fef64fbeaf5ef375ff48e5e8828b37197176797 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 01:10:08 +0000 Subject: [PATCH 12/17] fix: docker user --- .github/workflows/build-exes-impl.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 6c313a5..b1daebc 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -498,6 +498,7 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home + -u $(id -u):$(id -g) --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} --env UNIT_TESTS=${{ inputs.unit_tests }} --env INTEGRATION_TESTS=${{ inputs.integration_tests }} From 1be2496a0d7e14c2590a9b41a2fc3894c6d57992 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 11:19:24 +0000 Subject: [PATCH 13/17] fix: try to fix docker user/group IDs --- .github/workflows/build-exes-impl.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index b1daebc..2b3f2d7 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -490,6 +490,11 @@ jobs: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache + - name: Store user and group IDs + run: | + echo "UID=$(id -u)" >> $GITHUB_ENV + echo "GID=$(id -g)" >> $GITHUB_ENV + - name: Build executable (file) within Docker id: linux_onefile if: inputs.build_onefile == 'true' @@ -498,7 +503,7 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - -u $(id -u):$(id -g) + -u ${{ env.UID }}:${{ env.GID }} --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} --env UNIT_TESTS=${{ inputs.unit_tests }} --env INTEGRATION_TESTS=${{ inputs.integration_tests }} From c1f7466806cf84d94574b78a5da8560566246d02 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 14:55:26 +0000 Subject: [PATCH 14/17] fix: try to give docker correct permissions --- .github/workflows/build-exes-impl.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 2b3f2d7..0220939 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -504,6 +504,9 @@ jobs: options: | -v ${{ github.workspace }}:/home -u ${{ env.UID }}:${{ env.GID }} + --env HOME=/home + --env XDG_DATA_HOME=/home/.local/share + --env XDG_CACHE_HOME=/home/.cache --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} --env UNIT_TESTS=${{ inputs.unit_tests }} --env INTEGRATION_TESTS=${{ inputs.integration_tests }} From 4adecdf849cf70761a6732e6ed85fd7b688b713c Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 16:30:23 +0000 Subject: [PATCH 15/17] build: fix python env configuration --- .github/workflows/build-exes-impl.yml | 41 +++++++++++++++------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 0220939..581af06 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -255,12 +255,11 @@ jobs: run: poetry install --without dev - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` - env: - PYTHONUTF8: 1 + id: configure_python_env run: | poetry run ${{ inputs.executable_name }} env setup python --use-current - poetry run ${{ inputs.executable_name }} env list - poetry run ${{ inputs.executable_name }} env show --label python + result=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + echo "env_source_file=$result" >> "$GITHUB_OUTPUT" - name: Build with pyinstaller for Windows (file) id: win_onefile @@ -318,24 +317,27 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + PYTHONUTF8: 1 run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.unit_test_args }} + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} - name: Run test suite on the frozen app (folder) if: steps.win_onedir.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + PYTHONUTF8: 1 run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test ${{ inputs.unit_test_args }} + ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.win_onefile.outcome == 'success' && inputs.integration_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + PYTHONUTF8: 1 run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test ${{ inputs.integration_test_args }} --integration + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.integration_test_args }} --integration macos: name: Build macOS Executables @@ -381,10 +383,11 @@ jobs: run: poetry install --without dev - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` + id: configure_python_env run: | poetry run ${{ inputs.executable_name }} env setup python --use-current - poetry run ${{ inputs.executable_name }} env list - poetry run ${{ inputs.executable_name }} env show --label python + result=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + echo "env_source_file=$result" >> "$GITHUB_OUTPUT" - name: Build with pyinstaller for macOS (file) id: mac_onefile @@ -441,7 +444,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test ${{ inputs.unit_test_args }} + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} - name: Run test suite on the frozen app (folder) if: steps.mac_onedir.outcome == 'success' && inputs.unit_tests == 'true' @@ -449,7 +452,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir test ${{ inputs.unit_test_args }} + ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.mac_onefile.outcome == 'success' && inputs.integration_tests == 'true' @@ -457,7 +460,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test ${{ inputs.integration_test_args }} --integration + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.integration_test_args }} --integration linux: name: Build Linux (Rocky Linux 8) Executables @@ -500,7 +503,7 @@ jobs: if: inputs.build_onefile == 'true' uses: addnab/docker-run-action@v3 with: - image: ghcr.io/hpcflow/rockylinux8-python:latest + image: ghcr.io/hpcflow/rockylinux8-python:latest # most of the options are just so we can debug (via tmate) when we have a custom pytest --basetemp directory options: | -v ${{ github.workspace }}:/home -u ${{ env.UID }}:${{ env.GID }} @@ -519,8 +522,8 @@ jobs: # Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` poetry run ${{ inputs.executable_name }} env setup python --use-current - poetry run ${{ inputs.executable_name }} env list - poetry run ${{ inputs.executable_name }} env show --label python + ENV_SOURCE_FILE=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + echo "ENV_SOURCE_FILE=${ENV_SOURCE_FILE}" # build with pyinstaller for Rocky Linux (file) cd ${{ inputs.pyinstaller_dir }} @@ -536,13 +539,13 @@ jobs: export PYTHONUNBUFFERED=ok if [ "$UNIT_TESTS" = "true" ]; then # run test suite on the frozen app (file) - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.unit_test_args }} + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test --with-env-source ${ENV_SOURCE_FILE} ${{ inputs.unit_test_args }} fi if [ "$INTEGRATION_TESTS" == "true" ]; then # run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test ${{ inputs.integration_test_args }} --integration + ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test --with-env-source ${ENV_SOURCE_FILE} ${{ inputs.integration_test_args }} --integration fi - name: Build executable (folder) within Docker @@ -561,6 +564,8 @@ jobs: # Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` poetry run ${{ inputs.executable_name }} env setup python --use-current + ENV_SOURCE_FILE=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + echo "ENV_SOURCE_FILE=${ENV_SOURCE_FILE}" # build with pyinstaller for Rocky Linux (folder) cd ${{ inputs.pyinstaller_dir }} @@ -576,7 +581,7 @@ jobs: export PYTHONUNBUFFERED=ok if [ "$UNIT_TESTS" == "true" ]; then # run test suite on the frozen app (folder) - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir test ${{ inputs.unit_test_args }} + ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir test --with-env-source ${ENV_SOURCE_FILE} ${{ inputs.unit_test_args }} fi - name: Upload executable artifact (file) From ea48b6ed8084e9187c483ca904beb47dd2384794 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 23 Dec 2025 17:28:35 +0000 Subject: [PATCH 16/17] fix: fix env configure on win --- .github/workflows/build-exes-impl.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 581af06..8b476d1 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -258,8 +258,8 @@ jobs: id: configure_python_env run: | poetry run ${{ inputs.executable_name }} env setup python --use-current - result=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) - echo "env_source_file=$result" >> "$GITHUB_OUTPUT" + $result = (poetry run ${{ inputs.executable_name }} env info source_file -l python) + "env_source_file=$result" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 - name: Build with pyinstaller for Windows (file) id: win_onefile From ba4c66f0ece03f86ba4606e9d09381300b91aa81 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 24 Dec 2025 20:54:35 +0000 Subject: [PATCH 17/17] fix: exit on failed linux tests in build-exes --- .github/workflows/build-exes-impl.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 8b476d1..c0bc6f3 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -514,6 +514,8 @@ jobs: --env UNIT_TESTS=${{ inputs.unit_tests }} --env INTEGRATION_TESTS=${{ inputs.integration_tests }} run: | + set -e # exit on first failure + # set up poetry cd /home poetry config virtualenvs.in-project true @@ -556,6 +558,8 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: -v ${{ github.workspace }}:/home --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} run: | + set -e # exit on first failure + # set up poetry cd /home poetry config virtualenvs.in-project true