From a02fb0d92f464ec4cd40427051301352d5b5f7a3 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 21:57:22 +1300 Subject: [PATCH 01/17] Create python-app.yml --- .github/workflows/python-app.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 00000000..19dcce0a --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies and run tests +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: SimuPOP + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install dependencies + run: | + - name: Run tests + run: | + ./test/run_tests.py From 09be121e5a06d2aae0de9e028d94225ae4c55e94 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:02:55 +1300 Subject: [PATCH 02/17] Update python-app.yml --- .github/workflows/python-app.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 19dcce0a..9f93665b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -25,10 +25,8 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Display Python version - run: python -c "import sys; print(sys.version)" + cache: 'pip' - name: Install dependencies - run: | + run: pip install numpy matplotlib - name: Run tests - run: | - ./test/run_tests.py + run: python ./test/run_tests.py From 556eeec307cd638d666804851c297af260a30ebe Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:11:09 +1300 Subject: [PATCH 03/17] Update python-app.yml remove cache as this needs a 'requirements.txt' file to work --- .github/workflows/python-app.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 9f93665b..35185fcd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -25,7 +25,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - name: Install dependencies run: pip install numpy matplotlib - name: Run tests From 485dcc573853ee3bcbae584f6d565dbb800a5377 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:13:34 +1300 Subject: [PATCH 04/17] Create requirements.txt --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..aa094d9f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +numpy +matplotlib From 31d6c0f0fcd8c8928de2191aabe3d1f7648bf18a Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:15:18 +1300 Subject: [PATCH 05/17] Update python-app.yml --- .github/workflows/python-app.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 35185fcd..0b40c98a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -25,7 +25,10 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install dependencies - run: pip install numpy matplotlib + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt - name: Run tests run: python ./test/run_tests.py From 7551ab30dabc549b2e5d8fe72c7397d92d9fb765 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:16:48 +1300 Subject: [PATCH 06/17] oops thought 3.13 was available already --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0b40c98a..3ab36c88 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 From 66706a540a1bd329fcae1e7c34576104270ef1b8 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:18:14 +1300 Subject: [PATCH 07/17] and install simuPOP --- .github/workflows/python-app.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3ab36c88..6268f811 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -30,5 +30,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + - name: Install simuPOP + run: python setup.py install - name: Run tests run: python ./test/run_tests.py From a5e821830a67a2effa481cf3538cce2a8fe69fa2 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:18:55 +1300 Subject: [PATCH 08/17] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 6268f811..605cbbe0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 From 6708c8fb7e71e402ff58ae8e08f1c819c4e14a9d Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:22:57 +1300 Subject: [PATCH 09/17] Update python-app.yml --- .github/workflows/python-app.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 605cbbe0..091605bc 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -15,7 +15,9 @@ permissions: jobs: build: runs-on: ubuntu-latest + timeout-minutes: 20 strategy: + fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] From 192ac0e47814e57a9fc37383f39ed98dad5f1001 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Fri, 29 Mar 2024 22:52:16 +1300 Subject: [PATCH 10/17] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 091605bc..c4968a60 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -15,7 +15,7 @@ permissions: jobs: build: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 60 strategy: fail-fast: false matrix: From e0c2317f73a16fe2b1e8377557b548655cdf4504 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 01:48:24 +1300 Subject: [PATCH 11/17] add boost --- .github/workflows/python-app.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index c4968a60..477f9ae2 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -28,6 +28,14 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' + - name: Install boost + uses: MarkusJx/install-boost@v2.4.5 + id: install-boost + with: + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json + boost_version: 1.70.0 - name: Install dependencies run: | python -m pip install --upgrade pip From ce39161bb5c31faeb16dc1647ff68f733b22acf7 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 01:51:31 +1300 Subject: [PATCH 12/17] Update python-app.yml --- .github/workflows/python-app.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 477f9ae2..9a7d2a5f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -35,7 +35,11 @@ jobs: # REQUIRED: Specify the required boost version # A list of supported versions can be found here: # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.70.0 + boost_version: 1.73.0 + # OPTIONAL: Specify a platform version + platform_version: 22.04 + # OPTIONAL: Specify a custom install location + boost_install_dir: /home/runner/boost_1_73_0 - name: Install dependencies run: | python -m pip install --upgrade pip From 4233228461f06380a4258e6984c72ea36d516bf2 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 01:52:54 +1300 Subject: [PATCH 13/17] Update python-app.yml --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 9a7d2a5f..93338323 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -35,11 +35,11 @@ jobs: # REQUIRED: Specify the required boost version # A list of supported versions can be found here: # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.73.0 + boost_version: 1.74.0 # OPTIONAL: Specify a platform version platform_version: 22.04 # OPTIONAL: Specify a custom install location - boost_install_dir: /home/runner/boost_1_73_0 + boost_install_dir: /home/runner/boost_1_74_0 - name: Install dependencies run: | python -m pip install --upgrade pip From b1ff334e5d2422cfc6d975dcde274825b4147bb8 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 01:55:16 +1300 Subject: [PATCH 14/17] Update python-app.yml --- .github/workflows/python-app.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 93338323..164bebdd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -29,17 +29,7 @@ jobs: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install boost - uses: MarkusJx/install-boost@v2.4.5 - id: install-boost - with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.74.0 - # OPTIONAL: Specify a platform version - platform_version: 22.04 - # OPTIONAL: Specify a custom install location - boost_install_dir: /home/runner/boost_1_74_0 + run: sudo apt-get install libboost-all-dev - name: Install dependencies run: | python -m pip install --upgrade pip From e598af2c2d16a01cde10ed5544c31a626989ff75 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 02:03:57 +1300 Subject: [PATCH 15/17] Update python-app.yml --- .github/workflows/python-app.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 164bebdd..279fd21e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -29,7 +29,10 @@ jobs: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install boost - run: sudo apt-get install libboost-all-dev + run: | + sudo apt-get install libboost-all-dev + ln -s /usr/include/boost/ ./boost_1_70_0 + ls -la - name: Install dependencies run: | python -m pip install --upgrade pip From ab7bc1aea1bea468d5182e03ff4e3eb040cd6555 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 02:15:37 +1300 Subject: [PATCH 16/17] Update python-app.yml --- .github/workflows/python-app.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 279fd21e..c2475382 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -22,9 +22,9 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' @@ -32,7 +32,6 @@ jobs: run: | sudo apt-get install libboost-all-dev ln -s /usr/include/boost/ ./boost_1_70_0 - ls -la - name: Install dependencies run: | python -m pip install --upgrade pip From e67ebe83c28a6cdef6c7bc1886eec29b31a63de8 Mon Sep 17 00:00:00 2001 From: Simon J Greenhill Date: Sat, 30 Mar 2024 02:18:46 +1300 Subject: [PATCH 17/17] Update python-app.yml --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index c2475382..36db24de 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -22,9 +22,9 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip'