From ca9c55f0a04944a12bdea3d8adf62423c3f157c0 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Tue, 2 Jan 2024 17:19:39 -0500 Subject: [PATCH] ci: use python virtual environment for python bindings (#64) --- .github/workflows/linux.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6efcfcc6..da6d1e5f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -179,7 +179,11 @@ jobs: path: iguana_src # keep source code isolated - name: install python binding runtime dependencies if: ${{ matrix.binding == 'python' }} - run: python -m pip install -r iguana_src/bind/python/requirements.txt + run: | + python -m venv .venv + source .venv/bin/activate + echo PATH=$PATH >> $GITHUB_ENV + python -m pip install -r iguana_src/bind/python/requirements.txt - name: get dependency build artifacts uses: actions/download-artifact@v3 with: @@ -223,8 +227,6 @@ jobs: tool: [ cmake, make, meson ] steps: - uses: actions/checkout@v4 - - name: setup meson - run: python -m pip install meson ninja - name: get dependency build artifacts uses: actions/download-artifact@v3 with: @@ -241,6 +243,9 @@ jobs: run: | ls *.tar.gz | xargs -I{} tar xzvf {} rm -v *.tar.gz + - name: setup meson + if: ${{ matrix.tool == 'meson' }} + run: python -m pip install meson ninja - name: set cmake prefix path if: ${{ matrix.tool == 'cmake' }} run: echo CMAKE_PREFIX_PATH=$(pwd)/hipo >> $GITHUB_ENV