diff --git a/.github/actions/install/install-struphy/action.yml b/.github/actions/install/install-struphy/action.yml index ab2148a94..fc16f2818 100644 --- a/.github/actions/install/install-struphy/action.yml +++ b/.github/actions/install/install-struphy/action.yml @@ -12,8 +12,6 @@ runs: - name: Install struphy shell: bash run: | - python3 -m venv env - source env/bin/activate pip install --upgrade pip pip install ".[${{ inputs.optional-deps }}]" pip list diff --git a/.github/actions/install/macos-latest/action.yml b/.github/actions/install/macos-latest/action.yml index 6e0593685..7e795b4e7 100644 --- a/.github/actions/install/macos-latest/action.yml +++ b/.github/actions/install/macos-latest/action.yml @@ -7,11 +7,9 @@ runs: shell: bash run: | set -euo pipefail - # ensure Homebrew bin is first export PATH="/opt/homebrew/bin:$PATH" brew update - # brew install python3 - # brew install gcc + brew reinstall gcc brew install openblas brew install lapack brew install open-mpi @@ -29,9 +27,7 @@ runs: which gfortran || echo "could not find gfortran" which gcc || echo "could not find gcc" which g++ || echo "could not find g++" - # Update environment variables echo "FC=$(which gfortran)" >> $GITHUB_ENV # for gvec echo "CC=$(which gcc)" >> $GITHUB_ENV # for gvec echo "CXX=$(which g++)" >> $GITHUB_ENV # for gvec - echo "----------------" diff --git a/.github/workflows/macos-latest.yml b/.github/workflows/macos-latest.yml index 5d714e70a..6ab18e26d 100644 --- a/.github/workflows/macos-latest.yml +++ b/.github/workflows/macos-latest.yml @@ -1,19 +1,17 @@ name: MacOS on: - push: - branches: - - devel schedule: # run at 1 a.m. on Sunday - cron: "0 1 * * 0" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - macos-latest-build: - uses: ./.github/workflows/hello_world_reusable_wf.yml + macos-install-test: + uses: ./.github/workflows/reusable-testing.yml with: os: macos-latest \ No newline at end of file diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 098431f3c..8d6cc509a 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -18,7 +18,7 @@ jobs: matrix: python-version: ["3.12"] compile-language: ["fortran", "c"] - test-type: ["unit", "model"] #"quickstart", "tutorials"] + test-type: ["unit", "model", "verification"] #"quickstart", "tutorials"] steps: # Checkout the repository @@ -48,6 +48,7 @@ jobs: # Check that mpirun oversubscribing works, doesn't work unless OMPI_MCA_rmaps_base_oversubscribe==1 - name: Test mpirun + shell: bash run: | echo $OMPI_MCA_rmaps_base_oversubscribe echo $PRRTE_MCA_rmaps_base_oversubscribe @@ -69,10 +70,38 @@ jobs: uses: ./.github/actions/compile # Run tests - - name: Run unit tests + # - name: Run unit tests + # if: matrix.test-type == 'unit' + # shell: bash + # run: | + # struphy test unit + + - name: Run unit tests with MPI if: matrix.test-type == 'unit' - uses: ./.github/actions/tests/unit + shell: bash + run: | + struphy test unit --mpi 2 - - name: Run model tests + # - name: Run model tests + # if: matrix.test-type == 'model' + # shell: bash + # run: | + # struphy test models + + - name: Run model tests with MPI if: matrix.test-type == 'model' - uses: ./.github/actions/tests/models + shell: bash + run: | + struphy test models --mpi 2 + + # - name: Run verification tests + # if: matrix.test-type == 'verification' + # shell: bash + # run: | + # struphy test verification + + - name: Run verification tests with MPI + if: matrix.test-type == 'verification' + shell: bash + run: | + struphy test verification --mpi 2 diff --git a/.github/workflows/test-PR-models-clones.yml b/.github/workflows/test-PR-models-clones.yml index 3cc671412..8e320660f 100644 --- a/.github/workflows/test-PR-models-clones.yml +++ b/.github/workflows/test-PR-models-clones.yml @@ -7,6 +7,9 @@ on: push: branches: - devel + schedule: + # run at 1 a.m. on Sunday + - cron: "0 1 * * 0" workflow_dispatch: concurrency: @@ -57,11 +60,6 @@ jobs: run: | ls .testmon* || echo "No .testmondata" - # This step can be removed when the updated ghcr images are pushed - - name: Install sqlite - shell: bash - run: apt install -y sqlite3 - - name: Install Struphy in Container uses: ./.github/actions/install/struphy_in_container diff --git a/.github/workflows/test-PR-models.yml b/.github/workflows/test-PR-models.yml index 787650dee..a8c6bc563 100644 --- a/.github/workflows/test-PR-models.yml +++ b/.github/workflows/test-PR-models.yml @@ -7,6 +7,9 @@ on: push: branches: - devel + schedule: + # run at 1 a.m. on Sunday + - cron: "0 1 * * 0" workflow_dispatch: concurrency: @@ -58,11 +61,6 @@ jobs: run: | ls .testmon* || echo "No .testmondata" - # This step can be removed when the updated ghcr images are pushed - - name: Install sqlite - shell: bash - run: apt install -y sqlite3 - - name: Install Struphy in Container uses: ./.github/actions/install/struphy_in_container diff --git a/.github/workflows/test-PR-pure-python.yml b/.github/workflows/test-PR-pure-python.yml index 87895c08c..81175021c 100644 --- a/.github/workflows/test-PR-pure-python.yml +++ b/.github/workflows/test-PR-pure-python.yml @@ -7,6 +7,9 @@ on: push: branches: - devel + schedule: + # run at 1 a.m. on Sunday + - cron: "0 1 * * 0" workflow_dispatch: concurrency: @@ -58,13 +61,12 @@ jobs: run: | ls .testmon* || echo "No .testmondata" - # This step can be removed when the updated ghcr images are pushed - - name: Install sqlite - shell: bash - run: apt install -y sqlite3 - - name: Install Struphy - uses: ./.github/actions/install/install-struphy + shell: bash + run: | + python3 -m venv env + source env/bin/activate + pip install .[dev] - name: LinearMHD test shell: bash diff --git a/.github/workflows/test-PR-unit.yml b/.github/workflows/test-PR-unit.yml index b78cf01b1..fa16e504d 100644 --- a/.github/workflows/test-PR-unit.yml +++ b/.github/workflows/test-PR-unit.yml @@ -7,6 +7,9 @@ on: push: branches: - devel + schedule: + # run at 1 a.m. on Sunday + - cron: "0 1 * * 0" workflow_dispatch: concurrency: @@ -58,11 +61,6 @@ jobs: run: | ls .testmon* || echo "No .testmondata" - # This step can be removed when the updated ghcr images are pushed - - name: Install sqlite - shell: bash - run: apt install -y sqlite3 - - name: Install Struphy in Container uses: ./.github/actions/install/struphy_in_container diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml index 91b46a929..de7eb88b9 100644 --- a/.github/workflows/ubuntu-latest.yml +++ b/.github/workflows/ubuntu-latest.yml @@ -4,9 +4,10 @@ on: schedule: # run at 1 a.m. on Sunday - cron: "0 1 * * 0" + workflow_dispatch: jobs: - ubuntu-latest-build: + ubuntu-install-test: uses: ./.github/workflows/reusable-testing.yml with: os: ubuntu-latest \ No newline at end of file