Skip to content

Commit abfad9b

Browse files
committed
[ci] Make Python environment path configurable
This allows us to reuse the same CI image with different Python environment for different build configurations.
1 parent 965d757 commit abfad9b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/root-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,14 +466,15 @@ jobs:
466466
BUILD_DIR: /github/home/ROOT-CI/build
467467
INSTALL_DIR: /github/home/ROOT-CI/install
468468
POST_INSTALL_DIR: /github/home/ROOT-CI/PostInstall
469+
PYTHON_VENV: ${{ matrix.python_venv || '/py-venv/ROOT-CI' }}
469470

470471
steps:
471472
- name: Set up environment
472473
run: |
473474
ccache -o max_size=${{ matrix.is_special && '5G' || '1.5G' }}
474475
ccache -s || true
475-
if [ -d /py-venv/ROOT-CI/bin/ ]; then
476-
. /py-venv/ROOT-CI/bin/activate && echo PATH=$PATH >> $GITHUB_ENV;
476+
if [ -d "$PYTHON_VENV/bin/" ]; then
477+
. "$PYTHON_VENV/bin/activate" && echo PATH=$PATH >> $GITHUB_ENV;
477478
fi
478479
if ${{ contains(matrix.property, 'auto-registration off') }}; then
479480
echo "Disabling ROOT's object auto registration for this job"

0 commit comments

Comments
 (0)