99 - main
1010
1111concurrency :
12- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
13- cancel-in-progress : true
12+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+ cancel-in-progress : true
1414
1515env :
1616 BUILD_TYPE : RelWithDebInfo
17- PRECICE_VERSION : v3.1.2
1817
1918jobs :
2019 build :
@@ -24,39 +23,56 @@ jobs:
2423 matrix :
2524 os : [macos-latest, ubuntu-latest]
2625 steps :
27- - uses : actions/checkout@v3
26+ - uses : actions/checkout@master
2827 with :
2928 repository : gismo/gismo
3029 ref : stable
3130 path : ./gismo
3231
33- - uses : actions/checkout@v3
32+ - uses : actions/checkout@master
3433 with :
3534 path : ./gismo/optional/${{ github.event.repository.name }}
35+ # token: ${{ secrets.GH_PAT }}
3636
37+ # Step to install preCICE
3738 - name : Install preCICE
39+ if : runner.os == 'Linux'
3840 run : |
39- if [[ "$RUNNER_OS" == "Linux" ]]; then
40- sudo apt update
41- sudo apt install -y build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy
42- elif [[ "$RUNNER_OS" == "macOS" ]]; then
43- brew install cmake eigen libxml2 boost petsc openmpi python3 numpy
44- fi
45- wget https://github.com/precice/precice/archive/$PRECICE_VERSION.tar.gz
46- tar -xzvf $PRECICE_VERSION.tar.gz
47- cd precice-${PRECICE_VERSION/v/}
48- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
41+ sudo apt update
42+ sudo apt install -y build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy
43+ wget https://github.com/precice/precice/archive/v3.1.2.tar.gz
44+ tar -xzvf v3.1.2.tar.gz
45+ cd precice-3.1.2
46+ cmake --preset=production # Configure using the production preset
47+ cd build
4948 make -j 10
5049 sudo make install
51- export precice_DIR=$(pwd)/..
50+ precice_DIR=$(pwd)
51+ export precice_DIR=$(pwd)
5252
53- - name : Run Tests
53+ # Step to install preCICE
54+ - name : Install preCICE for mac
55+ if : runner.os == 'macOS'
56+ run : |
57+ brew install cmake eigen libxml2 boost petsc openmpi python3 numpy
58+ wget https://github.com/precice/precice/archive/v3.1.2.tar.gz
59+ tar -xzvf v3.1.2.tar.gz
60+ cd precice-3.1.2
61+ cmake --preset=production # Configure using the production preset
62+ cd build
63+ make -j 10
64+ sudo make install
65+ precice_DIR=$(pwd)
66+ export precice_DIR=$(pwd)
67+
68+ - name : " Run for ${{ matrix.os }}"
5469 shell : bash
55- working-directory : ${{ github .workspace }}
70+ working-directory : ${{ runner .workspace }}
5671 run : |
57- ctest -S ${{ github.repository }}/gismo/cmake/ctest_script.cmake \
58- -D CTEST_BUILD_NAME="${{ github.repository }}_actions_$GITHUB_RUN_NUMBER" \
72+ # Use the precice_DIR set from the environment variable
73+ ctest -S ${{ github.event.repository.name }}/gismo/cmake/ctest_script.cmake \
74+ -D CTEST_BUILD_NAME="${{ github.event.repository.name }}_actions_$GITHUB_RUN_NUMBER" \
5975 -D CTEST_SITE="${{ matrix.os }}_[actions]" \
60- -D LABELS_FOR_SUBPROJECTS="gsPreCICE-examples" \
76+ -D LABELS_FOR_SUBPROJECTS="gsPreCICE-examples" \
6177 -D CMAKE_ARGS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE;-DCMAKE_CXX_STANDARD=11;-DGISMO_WITH_XDEBUG=ON;-DGISMO_BUILD_UNITTESTS=ON;-Dprecice_DIR=$precice_DIR" \
62- -D GISMO_OPTIONAL="gsElasticity\\;${{ github.repository }}"
78+ -D GISMO_OPTIONAL="gsElasticity\\;${{ github.event. repository.name }}" -Q
0 commit comments