Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,23 @@ jobs:
echo "LD_LIBRARY_PATH=$LP:${LD_LIBRARY_PATH:-}" >> $GITHUB_ENV

####################### Setup Python #######################
# detect python version from SOFA 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.10'
python-version: ${{ steps.pyver.outputs.version }}

- name: Install dependencies
shell: bash
Expand Down Expand Up @@ -231,6 +244,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"
Expand Down
Loading