From ead3ae85b91645d9f459b237672715eaa69327be Mon Sep 17 00:00:00 2001 From: Pier-Yves Lessard Date: Sat, 29 Mar 2025 19:56:53 -0400 Subject: [PATCH 1/2] Updated ci python versions --- Dockerfile | 36 ++++++++++++++++++++++++++++++++---- Jenkinsfile | 31 ++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index b6e8248..7e1e13a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,35 @@ RUN apt-get update && apt-get install -y \ WORKDIR /tmp/ # ============================================ -ARG PYTHON_VERSION="3.11.1" +ARG PYTHON_VERSION="3.13.2" +ARG PYTHON_SRC="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" + +RUN wget $PYTHON_SRC \ + && tar -xvzf "Python-${PYTHON_VERSION}.tgz" \ + && cd "Python-${PYTHON_VERSION}" \ + && ./configure \ + && make -j 4 \ + && make install \ + && cd .. \ + && rm "Python-${PYTHON_VERSION}.tgz" \ + && rm -rf "Python-${PYTHON_VERSION}" + +# ============================================ +ARG PYTHON_VERSION="3.12.9" +ARG PYTHON_SRC="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" + +RUN wget $PYTHON_SRC \ + && tar -xvzf "Python-${PYTHON_VERSION}.tgz" \ + && cd "Python-${PYTHON_VERSION}" \ + && ./configure \ + && make -j 4 \ + && make install \ + && cd .. \ + && rm "Python-${PYTHON_VERSION}.tgz" \ + && rm -rf "Python-${PYTHON_VERSION}" + +# ============================================ +ARG PYTHON_VERSION="3.11.11" ARG PYTHON_SRC="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" RUN wget $PYTHON_SRC \ @@ -32,7 +60,7 @@ RUN wget $PYTHON_SRC \ # ============================================ -ARG PYTHON_VERSION="3.10.9" +ARG PYTHON_VERSION="3.10.16" ARG PYTHON_SRC="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" RUN wget $PYTHON_SRC \ @@ -46,7 +74,7 @@ RUN wget $PYTHON_SRC \ && rm -rf "Python-${PYTHON_VERSION}" # ============================================ -ARG PYTHON_VERSION="3.9.16" +ARG PYTHON_VERSION="3.9.21" ARG PYTHON_SRC="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" RUN wget $PYTHON_SRC \ @@ -60,7 +88,7 @@ RUN wget $PYTHON_SRC \ && rm -rf "Python-${PYTHON_VERSION}" # ============================================ -ARG PYTHON_VERSION="3.8.16" +ARG PYTHON_VERSION="3.8.20" ARG PYTHON_SRC="https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" RUN wget $PYTHON_SRC \ diff --git a/Jenkinsfile b/Jenkinsfile index 430535d..410f6c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,16 @@ pipeline { stages { stage ('Create venvs') { parallel{ + stage ('Python 3.13') { + steps { + sh 'python3.13 -m venv venv-3.13 && VENV_DIR=venv3.13 scripts/activate-venv.sh' + } + } + stage ('Python 3.12') { + steps { + sh 'python3.12 -m venv venv-3.12 && VENV_DIR=venv3.12 scripts/activate-venv.sh' + } + } stage ('Python 3.11') { steps { sh 'python3.11 -m venv venv-3.11 && VENV_DIR=venv3.11 scripts/activate-venv.sh' @@ -43,7 +53,22 @@ pipeline { } stage('Testing'){ parallel{ - + stage ('Python 3.13') { + steps { + sh ''' + VENV_DIR=venv-3.13 scripts/with-venv.sh scripts/check-python-version.sh 3.13 + VENV_DIR=venv-3.13 COVERAGE_SUFFIX=3.13 scripts/with-venv.sh scripts/runtests.sh + ''' + } + } + stage ('Python 3.12') { + steps { + sh ''' + VENV_DIR=venv-3.12 scripts/with-venv.sh scripts/check-python-version.sh 3.12 + VENV_DIR=venv-3.12 COVERAGE_SUFFIX=3.12 scripts/with-venv.sh scripts/runtests.sh + ''' + } + } stage ('Python 3.11') { steps { sh ''' @@ -89,8 +114,8 @@ pipeline { stage("Doc"){ steps { sh ''' - VENV_DIR=venv-3.11 scripts/with-venv.sh pip3 install -r doc/requirements.txt - VENV_DIR=venv-3.11 scripts/with-venv.sh make -C doc html + VENV_DIR=venv-3.13 scripts/with-venv.sh pip3 install -r doc/requirements.txt + VENV_DIR=venv-3.13 scripts/with-venv.sh make -C doc html ''' } } From b93cdbea166e30db79d3cb0ec8e120b711577aa6 Mon Sep 17 00:00:00 2001 From: Pier-Yves Lessard Date: Sat, 29 Mar 2025 20:14:35 -0400 Subject: [PATCH 2/2] Use 3.11 for doc --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 410f6c1..0cec2be 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -114,8 +114,8 @@ pipeline { stage("Doc"){ steps { sh ''' - VENV_DIR=venv-3.13 scripts/with-venv.sh pip3 install -r doc/requirements.txt - VENV_DIR=venv-3.13 scripts/with-venv.sh make -C doc html + VENV_DIR=venv-3.11 scripts/with-venv.sh pip3 install -r doc/requirements.txt + VENV_DIR=venv-3.11 scripts/with-venv.sh make -C doc html ''' } }