-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: seperate steps in build CI
- Loading branch information
1 parent
49959bd
commit dc0713c
Showing
4 changed files
with
160 additions
and
91 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,158 @@ | ||
name: Build | ||
name: build | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
cmake libnetcdff-dev liblapack-dev python3-dev \ | ||
python3-numpy python3-mpi4py python3-pip curl \ | ||
libfyaml-dev libopenmpi-dev openmpi-bin | ||
- name: Build YAXT | ||
run: | | ||
curl -s -L https://swprojects.dkrz.de/redmine/attachments/download/534/yaxt-0.11.1.tar.gz | tar xvz | ||
cd yaxt-0.11.1 | ||
./configure --without-regard-for-quality --without-example-programs --without-perf-programs --with-pic \ | ||
--prefix=$HOME/yaxt | ||
make -j 4 | ||
make install | ||
- name: Build YAC | ||
run: | | ||
curl -s -L https://gitlab.dkrz.de/dkrz-sw/yac/-/archive/v3.2.0/yac-v3.2.0.tar.gz | tar xvz | ||
cd yac-v3.2.0 | ||
./configure CFLAGS="-fPIC" CC=mpicc FC=mpif90 --disable-mpi-checks --with-yaxt-root=${HOME}/yaxt \ | ||
--prefix=$HOME/yac | ||
make -j 4 | ||
make install | ||
- name: Build main | ||
run: | | ||
mkdir build && cd build | ||
cmake \ | ||
-DCMAKE_C_COMPILER=gcc \ | ||
-DCMAKE_CXX_COMPILER=g++ \ | ||
-DCMAKE_CXX_FLAGS="-Werror -Wall -pedantic -O3" \ | ||
-DKokkos_ENABLE_SERIAL=ON \ | ||
-DENABLE_YAC_COUPLING=ON \ | ||
-DYAXT_ROOT=${HOME}/yaxt \ | ||
-DYAC_ROOT=${HOME}/yac \ | ||
-DCMAKE_MODULE_PATH=${PWD}/../libs/coupldyn_yac/cmake .. | ||
make | ||
- name: Build example adia0d | ||
run: cd build && make adia0d | ||
|
||
- name: Build example golcolls | ||
run: cd build && make golcolls | ||
|
||
- name: Build example longcolls | ||
run: cd build && make longcolls | ||
|
||
- name: Build example lowlistcolls | ||
run: cd build && make lowlistcolls | ||
|
||
- name: Build example szakallurbichcolls | ||
run: cd build && make szakallurbichcolls | ||
|
||
- name: Build example testikstraubcolls | ||
run: cd build && make testikstraubcolls | ||
|
||
- name: Build example const2d | ||
run: cd build && make const2d | ||
|
||
- name: Build example divfree2d | ||
run: cd build && make divfree2d | ||
|
||
- name: Build example eurec4a1d | ||
run: cd build && make eurec4a1d | ||
|
||
- name: Build example rshaft1d | ||
run: cd build && make rshaft1d | ||
|
||
- name: Build example spdtest | ||
run: cd build && make spdtest | ||
|
||
- name: Build example bubble3d | ||
run: cd build && make bubble3d | ||
|
||
- name: Build example fromfile | ||
run: cd build && make fromfile | ||
|
||
- name: Build example fromfile_irreg | ||
run: cd build && make fromfile_irreg | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
cmake libnetcdff-dev liblapack-dev python3-dev \ | ||
python3-numpy python3-mpi4py python3-pip curl \ | ||
libfyaml-dev libopenmpi-dev openmpi-bin | ||
- name: Build YAXT | ||
run: | | ||
curl -s -L https://swprojects.dkrz.de/redmine/attachments/download/534/yaxt-0.11.1.tar.gz | tar xvz | ||
cd yaxt-0.11.1 | ||
./configure --without-regard-for-quality --without-example-programs --without-perf-programs --with-pic --prefix=${{ runner.temp }}/yaxt | ||
make -j 4 | ||
make install | ||
- name: Upload YAXT | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: yaxt-artifact | ||
path: ${{ runner.temp }}/yaxt/ | ||
|
||
- name: Build YAC | ||
run: | | ||
curl -s -L https://gitlab.dkrz.de/dkrz-sw/yac/-/archive/v3.2.0/yac-v3.2.0.tar.gz | tar xvz | ||
cd yac-v3.2.0 | ||
./configure CFLAGS="-fPIC" CC=mpicc FC=mpif90 --disable-mpi-checks --with-yaxt-root=${{ runner.temp }}/yaxt --prefix=${{ runner.temp }}/yac | ||
make -j 4 | ||
make install | ||
- name: Upload YAC | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: yac-artifact | ||
path: ${{ runner.temp }}/yac/ | ||
|
||
- name: Build main | ||
run: | | ||
mkdir build | ||
cmake -S ./ -B ./build \ | ||
-DCMAKE_C_COMPILER=gcc \ | ||
-DCMAKE_CXX_COMPILER=g++ \ | ||
-DCMAKE_CXX_FLAGS="-Werror -Wall -pedantic -O3" \ | ||
-DKokkos_ENABLE_SERIAL=ON \ | ||
-DENABLE_YAC_COUPLING=ON \ | ||
-DYAXT_ROOT=${{ runner.temp }}/yaxt \ | ||
-DYAC_ROOT=${{ runner.temp }}/yac \ | ||
-DCMAKE_MODULE_PATH=${PWD}/libs/coupldyn_yac/cmake | ||
- name: Upload CLEO Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cleo-build-artifact | ||
path: ./build/ | ||
|
||
compile: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download CLEO Build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cleo-build-artifact | ||
path: ./build/ | ||
|
||
- name: Download YAXT | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: yaxt-artifact | ||
path: ${{ runner.temp }}/yaxt/ | ||
|
||
- name: Download YAC | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: yac-artifact | ||
path: ${{ runner.temp }}/yac/ | ||
|
||
- name: Build main | ||
run: cd build && make | ||
|
||
compile_adia0d: | ||
runs-on: ubuntu-latest | ||
needs: [build, compile] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download CLEO Build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: cleo-build-artifact | ||
path: ./build/ | ||
|
||
- name: Build adia0d | ||
run: cd build && make adia0d | ||
|
||
compile_examples: | ||
runs-on: ubuntu-latest | ||
needs: [build, compile] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build example adia0d | ||
run: cd build && make adia0d | ||
|
||
- name: Build example golcolls | ||
run: cd build && make golcolls | ||
|
||
- name: Build example longcolls | ||
run: cd build && make longcolls | ||
|
||
- name: Build example lowlistcolls | ||
run: cd build && make lowlistcolls | ||
|
||
- name: Build example szakallurbichcolls | ||
run: cd build && make szakallurbichcolls | ||
|
||
- name: Build example testikstraubcolls | ||
run: cd build && make testikstraubcolls | ||
|
||
- name: Build example const2d | ||
run: cd build && make const2d | ||
|
||
- name: Build example divfree2d | ||
run: cd build && make divfree2d | ||
|
||
- name: Build example eurec4a1d | ||
run: cd build && make eurec4a1d | ||
|
||
- name: Build example rshaft1d | ||
run: cd build && make rshaft1d | ||
|
||
- name: Build example spdtest | ||
run: cd build && make spdtest | ||
|
||
- name: Build example bubble3d | ||
run: cd build && make bubble3d | ||
|
||
- name: Build example fromfile | ||
run: cd build && make fromfile | ||
|
||
- name: Build example fromfile_irreg | ||
run: cd build && make fromfile_irreg |
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
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