Add website CI build with artifacts for pull requests #14
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: Open FUSION Toolkit CI build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
build: | |
name: ${{ format('{0} ({1})', matrix.config.name, matrix.parallel) }} | |
runs-on: ${{ matrix.config.os }} | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
FC: ${{ matrix.config.fc }} | |
OMP_NUM_THREADS: 2 | |
strategy: | |
fail-fast: false | |
matrix: | |
parallel: ["openmp", "mpi_openmp"] | |
config: | |
- { | |
name: "Ubuntu 20.04 GCC 10", | |
os: ubuntu-20.04, | |
cc: "gcc-10", cxx: "g++-10", fc: "gfortran-10", python: "python", pip: "pip" | |
} | |
- { | |
name: "Ubuntu 22.04 GCC 13", | |
os: ubuntu-22.04, | |
cc: "gcc-13", cxx: "g++-13", fc: "gfortran-13", python: "python3", pip: "pip3" | |
} | |
- { | |
name: "macOS Monterey GCC 12", | |
os: macos-12, | |
cc: "gcc-12", cxx: "g++-12", fc: "gfortran-12", python: "python3", pip: "pip3" | |
} | |
- { | |
name: "macOS Ventura GCC 13", | |
os: macos-13, | |
cc: "gcc-13", cxx: "g++-13", fc: "gfortran-13", python: "python3", pip: "pip3" | |
} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install prerequisites | |
run: ${{ matrix.config.pip }} install pytest numpy scipy h5py triangle | |
- name: Cache external libraries | |
id: cache-ext-libs | |
uses: actions/cache@v4 | |
with: | |
path: libs | |
key: ${{ matrix.config.os }}-build-${{ matrix.parallel }}-${{ hashFiles('src/utilities/build_libs.py') }} | |
- name: Create build dir | |
if: ${{ steps.cache-ext-libs.outputs.cache-hit != 'true' }} | |
run: mkdir libs | |
- name: Check compilers | |
run: | | |
$CC --version | |
$CXX --version | |
$FC --version | |
- name: Build external (OpenMP) | |
if: ${{ matrix.parallel == 'openmp' }} | |
shell: bash | |
working-directory: libs | |
run: > | |
${{ matrix.config.python }} ../src/utilities/build_libs.py --no_dl_progress --nthread=2 --ref_blas | |
--build_umfpack=1 --build_arpack=1 --oft_build_tests=1 | |
- name: Build external (MPI+OpenMP) | |
if: ${{ matrix.parallel == 'mpi_openmp' }} | |
shell: bash | |
working-directory: libs | |
run: > | |
${{ matrix.config.python }} ../src/utilities/build_libs.py --no_dl_progress --nthread=2 --ref_blas | |
--build_mpi=1 --build_umfpack=1 --build_superlu=1 --build_superlu_dist=1 | |
--build_arpack=1 --oft_build_tests=1 | |
- name: Upload library failure log | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: Library failure log | |
path: libs/build/build_error.log | |
- name: Remove external build directory | |
shell: bash | |
working-directory: libs | |
run: rm -rf build | |
- name: Configure OFT | |
shell: bash | |
working-directory: libs | |
run: bash config_cmake.sh | |
- name: Build OFT | |
shell: bash | |
working-directory: libs/build_release | |
run: make | |
- name: Install OFT | |
shell: bash | |
working-directory: libs/build_release | |
run: make install | |
- name: Test OFT | |
shell: bash | |
working-directory: libs/build_release | |
run: make test |