Skip to content

Commit

Permalink
Remove local action and use jorgensd/actions instead (#107)
Browse files Browse the repository at this point in the history
* Remove local action and use jorgensd/actions instead

* Fixes + version bumps

* Fix sonarcloud image
  • Loading branch information
jorgensd authored Feb 20, 2024
1 parent ffcc725 commit 01723af
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 122 deletions.
75 changes: 0 additions & 75 deletions .github/actions/install-dolfinx/action.yaml

This file was deleted.

59 changes: 29 additions & 30 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,32 @@ jobs:
PETSC_ARCH: "linux-gnu-real64-32"

steps:
- uses: actions/checkout@v4

- name: Install DOLFINx
uses: ./.github/actions/install-dolfinx
with:
dolfinx: main
ufl: main
ffcx: main
basix: main
petsc_arch: ${PETSC_ARCH}


- name: Install DOLFINx-MPC (C++)
run: |
cmake -G Ninja -B build-dir -DCMAKE_BUILD_TYPE=Release -S cpp/
cmake --build build-dir --parallel 3
cmake --install build-dir
- name: Install DOLFINx-MPC (Python)
run: python3 -m pip -v install --config-settings=cmake.build-type="Release" --no-build-isolation ./python/[docs]

- name: Build docs
run: jupyter book build .

- name: Upload documentation as artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: ${{ env.PUBLISH_DIR }}
if-no-files-found: error
- uses: actions/checkout@v4

- name: Install DOLFINx
uses: jorgensd/actions/[email protected]
with:
dolfinx: main
ufl: main
ffcx: main
basix: main
petsc_arch: ${PETSC_ARCH}

- name: Install DOLFINx-MPC (C++)
run: |
cmake -G Ninja -B build-dir -DCMAKE_BUILD_TYPE=Release -S cpp/
cmake --build build-dir --parallel 3
cmake --install build-dir
- name: Install DOLFINx-MPC (Python)
run: python3 -m pip -v install --config-settings=cmake.build-type="Release" --no-build-isolation ./python/[docs]

- name: Build docs
run: jupyter book build .

- name: Upload documentation as artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: ${{ env.PUBLISH_DIR }}
if-no-files-found: error
14 changes: 7 additions & 7 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
group: "pages"
cancel-in-progress: true

jobs:
jobs:
run-coverage:
uses: ./.github/workflows/test_mpc.yml

Expand All @@ -33,29 +33,29 @@ jobs:
steps:
- name: Download docs artifact
# docs artifact is uploaded by build-docs job
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: documentation
path: "./public"

- name: Download docs artifact
# docs artifact is uploaded by build-docs job
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: code-coverage-report
path: "./public/code-coverage-report"

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: "./public"

- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
13 changes: 6 additions & 7 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
# avoid running on pull requests from forks
# which don't have access to secrets
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
container: ghcr.io/fenics/dolfinx/dev-env:v0.7.0

container: ghcr.io/fenics/dolfinx/dev-env:current-mpich
env:
SONAR_SCANNER_VERSION: 5.0.1.3006 # Find the latest version in at: https://github.com/SonarSource/sonar-scanner-cli/tags
SONAR_SERVER_URL: "https://sonarcloud.io"
Expand All @@ -35,13 +34,13 @@ jobs:
apt-get install unzip
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17

- name: Cache SonarCloud packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
Expand All @@ -65,11 +64,11 @@ jobs:
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: Install DOLFINx
uses: ./.github/actions/install-dolfinx
uses: jorgensd/actions/install-dolfinx@v0.2.0
with:
petsc_arch: ${PETSC_ARCH}
dolfinx: main

- name: Run build-wrapper
run: |
cmake -S ./cpp -B build-mpc
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test_mpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
python3 -m pip install --no-cache-dir --no-binary=h5py h5py
- name: Install DOLFINx
uses: ./.github/actions/install-dolfinx
uses: jorgensd/actions/install-dolfinx@v0.2.0
with:
dolfinx: ${{ env.DOLFINX_BRANCH }}
ufl: ${{ env.UFL_BRANCH }}
Expand All @@ -100,7 +100,6 @@ jobs:
- name: Install DOLFINx-MPC (Python)
run: python3 -m pip -v install --config-settings=cmake.build-type=${MPC_BUILD_MODE} --no-build-isolation -e python/[test]


- name: Run tests (serial)
run: coverage run --rcfile=.coveragerc -m mpi4py -m pytest python/tests/ -vs
Expand Down Expand Up @@ -188,7 +187,7 @@ jobs:
- name: Upload coverage report as artifact
if: matrix.build_mode == 'Release' && matrix.petsc_arch == 'linux-gnu-real64-32' && matrix.CC == 'cc' && matrix.CXX == 'c++'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: htmlcov
Expand Down

0 comments on commit 01723af

Please sign in to comment.