From 8ed874a679793cdb575fde54ed0f562397a2e1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 19:54:43 +0100 Subject: [PATCH 1/7] using tests --- .github/workflows/build_docs.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 4fd23e7..5e5a845 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -7,6 +7,9 @@ on: types: - published +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Debug permissions: contents: read @@ -43,10 +46,14 @@ jobs: run: | mkdir build cd build - cmake .. -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON - make -j 2 + cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON -DAARE_TESTS=ON + make -j 4 make docs + - name: C++ unit tests + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}} -j4 + - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 From 6fe822d5dd6e4362ab2f18aba54d53d86d7445ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 19:56:53 +0100 Subject: [PATCH 2/7] WIP --- .github/workflows/build_docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 5e5a845..c31f880 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -2,6 +2,7 @@ name: Build the package using cmake then documentation on: workflow_dispatch: + push: pull_request: release: types: From 44fd015cfe932f977d1a8fc58af0c73537cbde35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 20:00:03 +0100 Subject: [PATCH 3/7] added catch2 to dev env --- etc/dev-env.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/dev-env.yml b/etc/dev-env.yml index 5b83b40..e4a43cd 100644 --- a/etc/dev-env.yml +++ b/etc/dev-env.yml @@ -3,6 +3,7 @@ channels: - conda-forge dependencies: - anaconda-client + - catch2 - conda-build - doxygen - sphinx From a66ce15a6c4347bce6b9279a4452ee94c8772a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 20:07:32 +0100 Subject: [PATCH 4/7] renamed workflow and added macos-latest --- .github/workflows/build_and_deploy_conda.yml | 2 +- .github/workflows/build_docs.yml | 77 -------------------- 2 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 .github/workflows/build_docs.yml diff --git a/.github/workflows/build_and_deploy_conda.yml b/.github/workflows/build_and_deploy_conda.yml index 8917419..213895a 100644 --- a/.github/workflows/build_and_deploy_conda.yml +++ b/.github/workflows/build_and_deploy_conda.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, ] # macos-12, windows-2019] + platform: [ubuntu-latest, macos-latest] # macos-12, windows-2019] python-version: ["3.12",] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml deleted file mode 100644 index c31f880..0000000 --- a/.github/workflows/build_docs.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Build the package using cmake then documentation - -on: - workflow_dispatch: - push: - pull_request: - release: - types: - - published - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug - -permissions: - contents: read - pages: write - id-token: write - -jobs: - build: - strategy: - fail-fast: false - matrix: - platform: [ubuntu-latest, ] - python-version: ["3.12",] - - runs-on: ${{ matrix.platform }} - - defaults: - run: - shell: "bash -l {0}" - - steps: - - uses: actions/checkout@v4 - - - name: Get conda - uses: conda-incubator/setup-miniconda@v3 - with: - python-version: ${{ matrix.python-version }} - environment-file: etc/dev-env.yml - miniforge-version: latest - channels: conda-forge - conda-remove-defaults: "true" - - - name: Build library - run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON -DAARE_TESTS=ON - make -j 4 - make docs - - - name: C++ unit tests - working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} -j4 - - - name: Upload static files as artifact - id: deployment - uses: actions/upload-pages-artifact@v3 - with: - path: build/docs/html/ - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' ) - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - - - - From bea373a112e7bf67365dff330f0077870d894016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 20:09:05 +0100 Subject: [PATCH 5/7] with file --- .github/workflows/build_with_docs.yml | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/build_with_docs.yml diff --git a/.github/workflows/build_with_docs.yml b/.github/workflows/build_with_docs.yml new file mode 100644 index 0000000..c1e3d09 --- /dev/null +++ b/.github/workflows/build_with_docs.yml @@ -0,0 +1,77 @@ +name: Build the package using cmake then documentation + +on: + workflow_dispatch: + push: + pull_request: + release: + types: + - published + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Debug + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, ] + python-version: ["3.12",] + + runs-on: ${{ matrix.platform }} + + defaults: + run: + shell: "bash -l {0}" + + steps: + - uses: actions/checkout@v4 + + - name: Get conda + uses: conda-incubator/setup-miniconda@v3 + with: + python-version: ${{ matrix.python-version }} + environment-file: etc/dev-env.yml + miniforge-version: latest + channels: conda-forge + conda-remove-defaults: "true" + + - name: Build library and docs + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DAARE_SYSTEM_LIBRARIES=ON -DAARE_PYTHON_BINDINGS=ON -DAARE_DOCS=ON -DAARE_TESTS=ON + make -j 4 + make docs + + - name: C++ unit tests + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}} -j4 + + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: build/docs/html/ + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' ) + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + + + + From 13cffb1ea8a3989fe78bcd6a0a5bfb35e58ab857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 20:11:38 +0100 Subject: [PATCH 6/7] WIP --- .github/workflows/build_and_deploy_conda.yml | 2 +- .github/workflows/build_with_docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_deploy_conda.yml b/.github/workflows/build_and_deploy_conda.yml index 213895a..9bd1861 100644 --- a/.github/workflows/build_and_deploy_conda.yml +++ b/.github/workflows/build_and_deploy_conda.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, macos-latest] # macos-12, windows-2019] + platform: [ubuntu-latest] # macos-12, windows-2019] python-version: ["3.12",] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/build_with_docs.yml b/.github/workflows/build_with_docs.yml index c1e3d09..92dce49 100644 --- a/.github/workflows/build_with_docs.yml +++ b/.github/workflows/build_with_docs.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-latest, ] + platform: [ubuntu-latest, macos-latest] python-version: ["3.12",] runs-on: ${{ matrix.platform }} From cf53922bd3ca31980ea2bb17d746f67ccb09dc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 26 Nov 2025 20:21:57 +0100 Subject: [PATCH 7/7] restrict upload artifact --- .github/workflows/build_with_docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_with_docs.yml b/.github/workflows/build_with_docs.yml index 92dce49..f826960 100644 --- a/.github/workflows/build_with_docs.yml +++ b/.github/workflows/build_with_docs.yml @@ -56,6 +56,7 @@ jobs: run: ctest -C ${{env.BUILD_TYPE}} -j4 - name: Upload static files as artifact + if: matrix.platform == 'ubuntu-latest' id: deployment uses: actions/upload-pages-artifact@v3 with: