From 7df51664503feff8f7258a38a7e1b7b2021968d7 Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 11:42:28 -0400 Subject: [PATCH 1/7] Bump to version 0.3.0. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dabce84ae..35152e9ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_VISIBILITY_PRESET hidden) # Define project version and use via generated config header -project(ngen VERSION 0.2.0) +project(ngen VERSION 0.3.0) add_executable(ngen "${NGEN_SRC_DIR}/NGen.cpp") From f8d72e61a6a46ea60b55deda4e24bd7f3c27ef01 Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 11:46:54 -0400 Subject: [PATCH 2/7] Run test/validate on release branches. --- .github/workflows/test_and_validate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_validate.yml b/.github/workflows/test_and_validate.yml index 31c9b8cb14..00279ae8d8 100644 --- a/.github/workflows/test_and_validate.yml +++ b/.github/workflows/test_and_validate.yml @@ -5,9 +5,9 @@ name: Testing and Validation # Controls when the action will run. on: push: - branches: [ master, dev, notreal ] + branches: [ master, dev, notreal, release-* ] pull_request: - branches: [ master, dev, notreal ] + branches: [ master, dev, notreal, release-* ] workflow_dispatch: env: From 5570381c99fa65f757d6016f50460c3c460f4aea Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 11:52:49 -0400 Subject: [PATCH 3/7] Apply other Actions to release branches. Applying other Github Actions that run against the master branch to release branches also. --- .github/workflows/Example_model_run.yml | 4 +++- .github/workflows/documentation.yml | 2 +- .github/workflows/module_integration.yml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Example_model_run.yml b/.github/workflows/Example_model_run.yml index b67e5cf1a1..d45dd59bcf 100644 --- a/.github/workflows/Example_model_run.yml +++ b/.github/workflows/Example_model_run.yml @@ -1,8 +1,10 @@ name: Build and Run NGEN on example data on: + push: + branches: [ release-* ] pull_request: - branches: [ master ] + branches: [ master, release-* ] jobs: Build_and_Run_Model: runs-on: ubuntu-latest diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 181544ae38..782dd19a1c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -6,7 +6,7 @@ name: Documentation # events but only for the master branch on: push: - branches: [ master ] + branches: [ master, release-* ] #pull_request: #branches: [ master ] diff --git a/.github/workflows/module_integration.yml b/.github/workflows/module_integration.yml index 10a47c8869..b89c629079 100644 --- a/.github/workflows/module_integration.yml +++ b/.github/workflows/module_integration.yml @@ -3,9 +3,9 @@ name: Module Integration Tests # Controls when the action will run. on: push: - branches: [ master, dev, notreal ] + branches: [ master, dev, notreal, release-* ] pull_request: - branches: [ master, dev, notreal ] + branches: [ master, dev, notreal, release-* ] workflow_dispatch: env: From f3599c18fa878baa55cab523d9f6099888c72e04 Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 12:27:47 -0400 Subject: [PATCH 4/7] Update Actions to install 1.x numpy. Updating Actions depending on numpy install to use pre-2.0 numpy version as is currently required for ngen builds. --- .github/actions/ngen-build/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index cfd01eacaa..3c1fa8ccc3 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -144,7 +144,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy + pip install numpy<=2.0.0 deactivate shell: bash From 74809686c998b495875216b513dc13e1680f4e3d Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 12:36:24 -0400 Subject: [PATCH 5/7] Fix Action to strictly require numpy < 2.0. --- .github/actions/ngen-build/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 3c1fa8ccc3..1b0bdc3b97 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -144,7 +144,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy<=2.0.0 + pip install numpy<2.0.0 deactivate shell: bash From 7fdb5249d8adfa2ce278fbf78f459682ee39846f Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 13:32:34 -0400 Subject: [PATCH 6/7] Change Action numpy fix to use constraints. Using pip constraints to ensure any downstream `input.additional_python_requirements` that may be installed also are prevented from installing a problematic version. --- .github/actions/ngen-build/action.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 1b0bdc3b97..04a693d7f5 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -120,6 +120,13 @@ runs: tar xjf boost_1_79_0.tar.bz2 shell: bash + - name: Set Pip Constraints + run: | + echo "numpy<2.0" > constraints.txt + sudo mv constraints.txt /constraints.txt + echo "PIP_CONSTRAINT=/constraints.txt" >> $GITHUB_ENV + shell: bash + - name: Cache Python Dependencies id: cache-py3-dependencies uses: actions/cache@v3 @@ -144,7 +151,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy<2.0.0 + pip install numpy deactivate shell: bash From e51cc629a1b414f9b9166631c58009a8d0443c9e Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 14:57:29 -0400 Subject: [PATCH 7/7] Fix placement of constraints.txt in Action. Cannot move to / due to read-only file system; instead, use $GITHUB_WORKSPACE in order to be able to specify absolute path to file in PIP_CONSTRAINT. --- .github/actions/ngen-build/action.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 04a693d7f5..8c0f79730b 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -122,9 +122,8 @@ runs: - name: Set Pip Constraints run: | - echo "numpy<2.0" > constraints.txt - sudo mv constraints.txt /constraints.txt - echo "PIP_CONSTRAINT=/constraints.txt" >> $GITHUB_ENV + echo "numpy<2.0" > $GITHUB_WORKSPACE/constraints.txt + echo "PIP_CONSTRAINT=$GITHUB_WORKSPACE/constraints.txt" >> $GITHUB_ENV shell: bash - name: Cache Python Dependencies