Skip to content

Develop

Develop #46

Workflow file for this run

name: hex2tet CI
on:
push:
pull_request:
workflow_dispatch:
env:
BISON_PATH: /usr/bin/bison
jobs:
building:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest,macos-latest]
int: [32, 64]
scotch: [off, on]
fail-fast: false
steps:
- name: Export gfotran compiler
if: ${{ matrix.scotch == 'on' && matrix.os == 'macos-latest' }}
run: |
echo "FORT_FLG=\"-DCMAKE_Fortran_COMPILER=gfortran-14\"" >> "$GITHUB_ENV"
- name: Install scotch
if: matrix.scotch == 'on'
run : |
git clone https://gitlab.inria.fr/scotch/scotch.git
cmake -Sscotch -Bbuild_scotch -DINTSIZE=${{ matrix.int }} \
${{ env.FORT_FLG }} \
-DCMAKE_INSTALL_PREFIX=install_scotch -DBUILD_PTSCOTCH=OFF \
-DBISON_EXECUTABLE=$BISON_PATH
cmake --build build_scotch --target install
- name: Install mmg
run: |
git clone https://github.com/MmgTools/mmg.git
cmake -Smmg -Bbuild_mmg -DMMG5_INT=int${{ matrix.int }}_t \
-DBUILD_SHARED_LIBS=NO -DUSE_SCOTCH=${{ matrix.scotch }} \
-DSCOTCH_DIR=install_scotch
cmake --build build_mmg
# checkout the provided branch name if workflow is manually run
- uses: actions/checkout@v3
if: inputs.branch_name
with:
ref: ${{github.event.inputs.branch}}
path: hex2tet
- uses: actions/checkout@v3
if: inputs.branch_name == ''
with:
path: hex2tet
- name: Compile hex2tet
run: |
cmake -Shex2tet -Bbuild_h2t -DMMG_DIR=build_mmg -DUSE_SCOTCH=${{ matrix.scotch }} \
-DSCOTCH_DIR=install_scotch
cmake --build build_h2t