From 1ca58ece9e417986748763295f078fb5e9716406 Mon Sep 17 00:00:00 2001
From: Michael Buehlmann <mbuehlmann@anl.gov>
Date: Fri, 20 Oct 2023 11:23:35 -0500
Subject: [PATCH] Fix CI

---
 .gitlab-ci.yml | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index adbaf21..7d2e69e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,11 +23,12 @@ build_cmake:
 build_python:
   stage: build
   before_script:
-    - apt update && apt -y install git gcc cmake mpich python3 python3-pip
-    - python3 -m pip install numpy
+    - apt update && apt -y install git gcc cmake mpich python3 python3-pip python3-venv
+    - python3 -m venv ./venv
+    - ./venv/bin/python -m pip install numpy wheel
   script:
-    - python3 setup.py bdist_wheel
-    - python3 -m pip install dist/*
+    - ./venv/bin/python setup.py bdist_wheel
+    - ./venv/bin/python -m pip install dist/*
   artifacts:
     paths:
       - dist/*.whl
@@ -43,12 +44,13 @@ build_docs:
   dependencies:
     - build_python
   before_script:
-    - apt update && apt -y install mpich python3 python3-pip
-    - python3 -m pip install --upgrade pip
-    - python3 -m pip install numpy
-    - python3 -m pip install dist/*
-    - python3 -m pip install Sphinx sphinx-rtd-theme sphinxcontrib-napoleon numpydoc myst-parser
+    - apt update && apt -y install mpich python3 python3-pip python3-venv
+    - python3 -m venv ./venv
+    - ./venv/bin/python -m pip install numpy wheel
+    - ./venv/bin/python -m pip install dist/*
+    - ./venv/bin/python -m pip install Sphinx sphinx-rtd-theme sphinxcontrib-napoleon numpydoc myst-parser
   script:
+    - source ./venv/bin/activate
     - cd docs
     - make dirhtml
   artifacts:
-- 
GitLab