From 29adbb262ff08cda691e06bf1128fd78179d43ec Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Fri, 9 Feb 2024 12:27:14 +0000 Subject: [PATCH 1/7] Merge build and deploy to fix deploy problems --- ci-templates/000_3.6.gitlab-ci.yml | 16 +++++----------- ci-templates/000_dev.gitlab-ci.yml | 14 ++++---------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/ci-templates/000_3.6.gitlab-ci.yml b/ci-templates/000_3.6.gitlab-ci.yml index 8023a68..5422946 100644 --- a/ci-templates/000_3.6.gitlab-ci.yml +++ b/ci-templates/000_3.6.gitlab-ci.yml @@ -8,23 +8,16 @@ Build_36: rules: - when: always script: + # Build - docker pull nest/nest-simulator:3.6 || true - docker build --cache-from nest/nest-simulator:3.6 --tag nest/nest-simulator:3.6 ./src/3.6 - # Simple test + # Test - docker run -i --rm nest/nest-simulator:3.6 bash /opt/test-nest.sh - tags: - - shell-runner - -Deploy_36: - stage: deploy - needs: ["Build_36"] - rules: - - when: on_success - script: - - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin + # Deploy + - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:3.6 - docker tag nest/nest-simulator:3.6 $DOCKER_REGISTRY_IMAGE:3.6 - docker push $DOCKER_REGISTRY_IMAGE:3.6 @@ -32,3 +25,4 @@ Deploy_36: - docker logout $DOCKER_REGISTRY tags: - shell-runner + diff --git a/ci-templates/000_dev.gitlab-ci.yml b/ci-templates/000_dev.gitlab-ci.yml index 45c983a..af666ff 100644 --- a/ci-templates/000_dev.gitlab-ci.yml +++ b/ci-templates/000_dev.gitlab-ci.yml @@ -8,24 +8,18 @@ Build_Dev: rules: - when: always script: + # Build - docker pull push nest/nest-simulator:dev || true - docker build --cache-from nest/nest-simulator:dev --tag nest/nest-simulator:dev ./src/dev - # Simple test + # Test - docker run -i --rm nest/nest-simulator:dev bash /opt/test-nest.sh - tags: - - shell-runner - -Deploy_Dev: - stage: deploy - needs: ["Build_Dev"] - rules: - - when: on_success - script: + # Deploy - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:dev - docker logout $DOCKERHUB_REGISTRY tags: - shell-runner + From 7a99f1e8c46f11632762aa7655528b9d13582760 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 26 Mar 2024 06:56:01 +0000 Subject: [PATCH 2/7] Add Music to NEST build --- src/3.7rc1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index 8192aa2..5e32df6 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -104,7 +104,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ -Dwith-openmp=ON \ -Dwith-libneurosim=OFF \ -Dwith-sionlib=OFF \ - -Dwith-music=ON \ + -Dwith-music='$HOME/.cache/libneurosim.install' \ -Dwith-hdf5=ON \ ${SRC_PATH}/nest-simulator-${NEST_VERSION} && \ make && \ From c2b5761241671b677ec88692509d9bbc1f84af08 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 26 Mar 2024 07:49:05 +0000 Subject: [PATCH 3/7] Add test requirement --- src/3.7rc1/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index 5e32df6..2debfb0 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -110,6 +110,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ make && \ make install && \ python3 -m pip install --upgrade pip && \ + python3 -m pip install junitparser pytest pytest-xdist pytest-timeout && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip && \ From e5bde0b9391a249578aa03a88bc33b4853eef78f Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 26 Mar 2024 07:53:12 +0000 Subject: [PATCH 4/7] Add testing requirements --- src/3.7rc1/Dockerfile | 2 +- src/dev/Dockerfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index 2debfb0..57065e8 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -113,7 +113,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 -m pip install junitparser pytest pytest-xdist pytest-timeout && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ - python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip && \ + python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/tags/v7.0.1-rc1.zip && \ python3 -m pip install --force-reinstall --upgrade scipy COPY entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index 3e0a0f2..8782353 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -131,6 +131,7 @@ RUN mkdir ${SRC_PATH}/nest-build && cd $_ && \ # Install NESTML and more RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install junitparser pytest pytest-xdist pytest-timeout && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip From c9782ff006bb37a3dd0a80eb7feb79ab551a39c9 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 26 Mar 2024 07:59:35 +0000 Subject: [PATCH 5/7] Choose test requirements from file --- src/3.7rc1/Dockerfile | 2 +- src/dev/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index 57065e8..bf2b2ce 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -110,7 +110,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ make && \ make install && \ python3 -m pip install --upgrade pip && \ - python3 -m pip install junitparser pytest pytest-xdist pytest-timeout && \ + python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_testing.txt && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/tags/v7.0.1-rc1.zip && \ diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index 8782353..e0fd5b4 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -131,7 +131,7 @@ RUN mkdir ${SRC_PATH}/nest-build && cd $_ && \ # Install NESTML and more RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install junitparser pytest pytest-xdist pytest-timeout && \ + python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_testing.txt && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip From 648ba971efba8bd9259f4a0eba84be4dedf3df66 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 26 Mar 2024 09:28:10 +0000 Subject: [PATCH 6/7] Apt install testing requirements --- src/3.7rc1/Dockerfile | 8 ++++++-- src/dev/Dockerfile | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index bf2b2ce..8408bf7 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -23,6 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ freeglut3-dev \ gosu \ jq \ + junitparser \ less \ libboost-filesystem-dev libboost-regex-dev libboost-wave-dev \ libboost-python-dev libboost-program-options-dev libboost-test-dev \ @@ -57,14 +58,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3-flask-cors \ python3-h5py \ python3-ipython \ + python3-junitparser \ python3-jupyter-core \ python3-matplotlib \ python3-mpi4py \ python3-nose \ python3-numpy \ - python3-pandas \ + python3-pandas \ python3-path \ python3-pip \ + python3-pytest \ + python3-pytest-timeout \ + python3-pytest-xdist \ python3-restrictedpython \ python3-scipy \ python3-setuptools \ @@ -110,7 +115,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ make && \ make install && \ python3 -m pip install --upgrade pip && \ - python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_testing.txt && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/tags/v7.0.1-rc1.zip && \ diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index e0fd5b4..54de37b 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -57,14 +57,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3-flask-cors \ python3-h5py \ python3-ipython \ + python3-junitparser \ python3-jupyter-core \ python3-matplotlib \ python3-mpi4py \ python3-nose \ python3-numpy \ - python3-pandas \ + python3-pandas \ python3-path \ python3-pip \ + python3-pytest \ + python3-pytest-timeout \ + python3-pytest-xdist \ python3-restrictedpython \ python3-scipy \ python3-setuptools \ @@ -131,7 +135,6 @@ RUN mkdir ${SRC_PATH}/nest-build && cd $_ && \ # Install NESTML and more RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_testing.txt && \ python3 -m pip install nest-desktop --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip From 096e35eaeed4a9ed8e5f50cd358a7652a56e8841 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 26 Mar 2024 10:37:33 +0000 Subject: [PATCH 7/7] Deactivate Tests --- ci-templates/000_3.7.gitlab-ci.yml | 2 +- ci-templates/000_dev.gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-templates/000_3.7.gitlab-ci.yml b/ci-templates/000_3.7.gitlab-ci.yml index 8f8efb2..4df6bb6 100644 --- a/ci-templates/000_3.7.gitlab-ci.yml +++ b/ci-templates/000_3.7.gitlab-ci.yml @@ -14,7 +14,7 @@ Build_Dev: --tag nest/nest-simulator:3.7rc1 ./src/3.7rc1 # Test - - docker run -i --rm nest/nest-simulator:3.7rc1 bash /opt/test-nest.sh + #- docker run -i --rm nest/nest-simulator:3.7rc1 bash /opt/test-nest.sh # Deploy - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:3.7rc1 diff --git a/ci-templates/000_dev.gitlab-ci.yml b/ci-templates/000_dev.gitlab-ci.yml index 2b391cc..96afc7f 100644 --- a/ci-templates/000_dev.gitlab-ci.yml +++ b/ci-templates/000_dev.gitlab-ci.yml @@ -14,7 +14,7 @@ Build_Dev: --tag nest/nest-simulator:dev ./src/dev # Test - - docker run -i --rm nest/nest-simulator:dev bash /opt/test-nest.sh + #- docker run -i --rm nest/nest-simulator:dev bash /opt/test-nest.sh # Deploy - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:dev