Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/actions/install/install-struphy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions .github/actions/install/macos-latest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "----------------"

8 changes: 3 additions & 5 deletions .github/workflows/macos-latest.yml
Original file line number Diff line number Diff line change
@@ -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
39 changes: 34 additions & 5 deletions .github/workflows/reusable-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
8 changes: 3 additions & 5 deletions .github/workflows/test-PR-models-clones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- devel
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -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

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test-PR-models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- devel
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -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

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test-PR-pure-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- devel
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test-PR-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- devel
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading