From 1c94116e9f9d5cca3ce940c9808b632d4d3db99a Mon Sep 17 00:00:00 2001 From: epernod Date: Mon, 5 Oct 2026 16:09:10 +0200 Subject: [PATCH 1/4] up python version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52e4bd8..04bf16b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,7 +191,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.13' - name: Install dependencies shell: bash From 4b83bbc205c402868e19ea80c7f95b619d1e94ff Mon Sep 17 00:00:00 2001 From: epernod Date: Wed, 14 Oct 2026 11:43:23 +0200 Subject: [PATCH 2/4] up python version to match the SOFA one --- .github/workflows/ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04bf16b..ab3c57b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,10 +188,25 @@ jobs: echo "LD_LIBRARY_PATH=$LP:${LD_LIBRARY_PATH:-}" >> $GITHUB_ENV ####################### Setup Python ####################### + # SofaPython3's compiled modules only load in the exact python version SOFA + # was built against (ABI tag in their filename: cpython-312 / cp312), so read + # it from the binaries instead of hardcoding it. + - name: Detect SOFA python version + id: pyver + shell: bash + run: | + set -euo pipefail + SP="$SOFA_ROOT/plugins/SofaPython3/lib/python3/site-packages/Sofa" + TAG=$(ls "$SP" | grep -oE '^Helper\.(cpython-|cp)3[0-9]+' | grep -oE '3[0-9]+$' | head -n1) + [[ -n "$TAG" ]] || { echo "::error::Could not detect python ABI tag from $SP"; ls -la "$SP"; exit 1; } + VERSION="3.${TAG:1}" + echo "SOFA was built against python $VERSION" + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: ${{ steps.pyver.outputs.version }} - name: Install dependencies shell: bash From e0b2a53ebe3d7207eab41d9fe5c6a8045c393554 Mon Sep 17 00:00:00 2001 From: epernod Date: Wed, 14 Oct 2026 12:06:29 +0200 Subject: [PATCH 3/4] log issue --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab3c57b..b12ed05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -246,6 +246,11 @@ jobs: - name: Run regression shell: bash + env: + # The regression program captures each scene's output with + # subprocess.run(text=True), which decodes with the locale encoding: + # cp1252 on Windows, which chokes on SOFA's UTF-8 logs. + PYTHONUTF8: '1' run: | set -euo pipefail cd "$WORKSPACE_SRC_PATH" From 5745e162324bca7835235a6b55de946203411e82 Mon Sep 17 00:00:00 2001 From: erik pernod Date: Wed, 14 Oct 2026 14:45:35 +0200 Subject: [PATCH 4/4] Clarify Python version detection in CI workflow Updated comment to clarify detection of Python version. --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b12ed05..fc00783 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,9 +188,7 @@ jobs: echo "LD_LIBRARY_PATH=$LP:${LD_LIBRARY_PATH:-}" >> $GITHUB_ENV ####################### Setup Python ####################### - # SofaPython3's compiled modules only load in the exact python version SOFA - # was built against (ABI tag in their filename: cpython-312 / cp312), so read - # it from the binaries instead of hardcoding it. + # detect python version from SOFA binaries instead of hardcoding it. - name: Detect SOFA python version id: pyver shell: bash