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
107 changes: 107 additions & 0 deletions .github/workflows/cpuarch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: CPU Compilation/Unit Tests

on:
push:

jobs:
check-commit:
runs-on: ubuntu-24.04
outputs:
run_tests: ${{ steps.check_message.outputs.run_tests }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check commit message
id: check_message
run: |
if git log -1 --pretty=%B | grep -q "CPUTEST"; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_tests=false" >> "$GITHUB_OUTPUT"
fi
tests:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
name: UNIT_TESTS (precision=${{ matrix.precision }}, mpi=${{ matrix.mpi }}, output=${{ matrix.output }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
precision: [single, double]
mpi: [ON, OFF]
output: [ON, OFF]
exclude:
- precision: single
mpi: ON
output: ON
- precision: double
mpi: ON
output: ON
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install GCC 14 and build tools
run: |
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14 gfortran-14 build-essential wget libevent-dev libhwloc-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 50
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-14 50
gcc --version
g++ --version
- name: Install CMake (3.x)
run: |
sudo apt-get install -y cmake
cmake --version
- name: Install OpenMPI 5
run: |
sudo apt-get install -y libopenmpi-dev openmpi-bin
mpirun --version
- name: Configure
run: |
if [ "${{ matrix.mpi }}" = "ON" ]; then
export CC=mpicc
export CXX=mpicxx
else
export CC=gcc-14
export CXX=g++-14
fi
cmake -B build -D TESTS=ON -D precision=${{ matrix.precision }} -D mpi=${{ matrix.mpi }} -D output=${{ matrix.output }}
- name: Compile
run: cmake --build build -j "$(nproc)"
- name: Run tests
run: ctest --test-dir build --output-on-failure
pgens:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
name: PGENS (pgen=${{ matrix.pgen }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
pgen: [streaming, turbulence, reconnection, shock, magnetosphere, accretion, wald]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install GCC 14 and build tools
run: |
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14 gfortran-14 build-essential wget libevent-dev libhwloc-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 50
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-14 50
gcc --version
g++ --version
- name: Install CMake (3.x)
run: |
sudo apt-get install -y cmake
cmake --version
- name: Configure
run: |
cmake -B build -D pgen=${{ matrix.pgen }} -D output=OFF
- name: Compile
run: cmake --build build -j "$(nproc)"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Unit tests
name: Multi-Arch Local Tests

on:
push:

jobs:
check-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
run_tests: ${{ steps.check_message.outputs.run_tests }}
steps:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Check commit message
id: check_message
run: |
if git log -1 --pretty=%B | grep -q "RUNTEST"; then
if git log -1 --pretty=%B | grep -q "MARCHTEST"; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_tests=false" >> "$GITHUB_OUTPUT"
Expand Down
41 changes: 0 additions & 41 deletions compile_pgens.sh

This file was deleted.