forked from dobrzynski/hex2tet
-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (55 loc) · 1.83 KB
/
main-job.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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: Setup Fortran
if: ${{ matrix.os }} == 'macos-latest'
uses: awvwgk/[email protected]
- name: Install bison
if: ${{ matrix.scotch == 'on' && matrix.os == 'macos-latest' }}
run: |
brew install bison
echo "BISON_PATH=/usr/local/opt/bison/bin/bison" >> $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 }} \
-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