Skip to content

Commit 69241ed

Browse files
authored
Try activating the env by hand
1 parent 875531b commit 69241ed

1 file changed

Lines changed: 35 additions & 9 deletions

File tree

.github/workflows/ci-macos-linux-windows-pixi.yml

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,23 @@ jobs:
219219
shell: bash
220220
run: |
221221
cd ${SRC_DIR}
222-
223-
pixi run -e ${{ inputs.preset }} echo "VM_PYTHON3_EXECUTABLE=$SOFA_PYTHON_EXECUTABLE" >> $GITHUB_ENV
224-
222+
PIXI_PREFIX="$(pwd)/.pixi/envs/${{ inputs.preset }}/"
223+
echo "VM_PYTHON3_EXECUTABLE=$PIXI_PREFIX/python.exe" >> $GITHUB_ENV
224+
225+
if [[ "$RUNNER_OS" == "Windows" ]]; then
226+
#Activating pixi env in a git-bash terminal is broken, here we just want to consume it.
227+
228+
echo "PIXI_PREFIX=$PIXI_PREFIX" >> $GITHUB_ENV
229+
230+
echo "$PIXI_PREFIX" >> $GITHUB_PATH
231+
echo "$PIXI_PREFIX/bin" >> $GITHUB_PATH
232+
echo "$PIXI_PREFIX/Library/bin" >> $GITHUB_PATH
233+
echo "$PIXI_PREFIX/Scripts" >> $GITHUB_PATH
234+
echo "$PIXI_PREFIX/Library/mingw-w64/bin" >> $GITHUB_PATH
235+
echo "$PIXI_PREFIX/Library/usr/bin" >> $GITHUB_PATH
236+
echo "$PIXI_PREFIX/sofa-build/bin/" >> $GITHUB_PATH
237+
fi
238+
225239
exit 0
226240
227241
- name: Unit tests
@@ -232,8 +246,12 @@ jobs:
232246
cd ${SRC_DIR}
233247
234248
echo "Launching unit test suite."
235-
pixi run -e ${{ inputs.preset }} bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "UNIT"
236-
249+
if [[ "$RUNNER_OS" == "Windows" ]]; then
250+
bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "UNIT"
251+
else
252+
pixi run -e ${{ inputs.preset }} bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "UNIT"
253+
fi
254+
237255
if [[ "$(cd "${{ env.SOFA_BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"unit-tests_"* ]]; then
238256
exit 1
239257
fi
@@ -247,8 +265,12 @@ jobs:
247265
cd ${SRC_DIR}
248266
249267
echo "Launching scene test suite."
250-
pixi run -e ${{ inputs.preset }} bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "SCENE"
251-
268+
if [[ "$RUNNER_OS" == "Windows" ]]; then
269+
bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "SCENE"
270+
else
271+
pixi run -e ${{ inputs.preset }} bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "SCENE"
272+
fi
273+
252274
if [[ "$(cd "${{ env.SOFA_BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"scene-tests_"* ]]; then
253275
exit 1
254276
fi
@@ -263,8 +285,12 @@ jobs:
263285
cd ${SRC_DIR}
264286
265287
echo "Launching regression test suite"
266-
pixi run -e ${{ inputs.preset }} bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "REGRESSION"
267-
288+
if [[ "$RUNNER_OS" == "Windows" ]]; then
289+
bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "REGRESSION"
290+
else
291+
pixi run -e ${{ inputs.preset }} bash ${CI_DIR}/scripts/test.sh "${SOFA_BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "" "${{ inputs.python-version }}" "REGRESSION"
292+
fi
293+
268294
if [[ "$(cd "${{ env.SOFA_BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"regression-tests_"* ]]; then
269295
exit 1
270296
fi

0 commit comments

Comments
 (0)