New Example CI + Fixes to some broken example! #1212
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Test Suite' | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
file-changes: | |
name: Detect File Changes | |
runs-on: 'ubuntu-latest' | |
outputs: | |
checkall: ${{ steps.changes.outputs.checkall }} | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Detect Changes | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: ".github/file-filter.yml" | |
github: | |
name: Github | |
if: needs.file-changes.outputs.checkall == 'true' | |
needs: file-changes | |
strategy: | |
matrix: | |
os: ['ubuntu', 'macos'] | |
mpi: ['mpi'] | |
debug: ['debug', 'no-debug'] | |
intel: [true, false] | |
exclude: | |
- os: macos | |
intel: true | |
include: | |
- os: ubuntu | |
mpi: no-mpi | |
debug: no-debug | |
intel: false | |
fail-fast: false | |
continue-on-error: true | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Setup MacOS | |
if: matrix.os == 'macos' | |
run: | | |
brew install coreutils python cmake fftw hdf5 gcc@14 boost open-mpi | |
echo "FC=gfortran-14" >> $GITHUB_ENV | |
echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV | |
- name: Setup Ubuntu | |
if: matrix.os == 'ubuntu' && matrix.intel == false | |
run: | | |
sudo apt update -y | |
sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \ | |
libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev | |
- name: Setup Ubuntu (Intel) | |
if: matrix.os == 'ubuntu' && matrix.intel == true | |
run: | | |
sudo apt update -y | |
sudo apt install -y tar wget make cmake python3 python3-dev | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
sudo apt-get update | |
sudo apt-get install -y intel-oneapi-common-vars intel-oneapi-compiler-fortran-2022.1.0 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0 intel-oneapi-mkl-2021.4.0 intel-oneapi-mpi-2021.7.1 intel-oneapi-mpi-devel-2021.7.1 | |
source /opt/intel/oneapi/setvars.sh | |
echo "CXX=$(which icpc)" >> $GITHUB_ENV | |
echo "CC=$(which icc)" >> $GITHUB_ENV | |
echo "FC=$(which ifort)" >> $GITHUB_ENV | |
echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV | |
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV | |
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV | |
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV | |
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV | |
- name: Build | |
run: | | |
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi | |
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} | |
- name: Test | |
run: | | |
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi | |
/bin/bash mfc.sh test --max-attempts 3 -j $(nproc) $OPT1 $OPT2 | |
env: | |
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }} | |
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }} | |
self: | |
name: Self Hosted | |
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' | |
needs: file-changes | |
continue-on-error: false | |
timeout-minutes: 1400 | |
strategy: | |
matrix: | |
device: ['cpu', 'gpu'] | |
lbl: ['gt', 'frontier'] | |
exclude: | |
- device: cpu | |
lbl: frontier | |
runs-on: | |
group: phoenix | |
labels: ${{ matrix.lbl }} | |
env: | |
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Build & Test | |
if: matrix.lbl == 'gt' | |
run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }} | |
- name: Build | |
if: matrix.lbl == 'frontier' | |
run: bash .github/workflows/frontier/build.sh | |
- name: Test | |
if: matrix.lbl == 'frontier' | |
run: bash .github/workflows/frontier/submit.sh .github/workflows/frontier/test.sh ${{matrix.device}} | |
- name: Print Logs | |
if: always() | |
run: cat test-${{ matrix.device }}.out | |
- name: Archive Logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: logs | |
path: test-${{ matrix.device }}.out |