99 branches :
1010 - ' develop'
1111 - ' master'
12+ workflow_call :
13+ inputs :
14+ runner :
15+ description : ' The github runner to use'
16+ default : ' ubuntu-latest'
17+ required : false
18+ type : string
1219
1320jobs :
1421 build :
@@ -36,25 +43,37 @@ jobs:
3643 flags : ' -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3 --werror'
3744 - config_set : ForwardOMP
3845 flags : ' -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3 --werror'
39- runs-on : ubuntu-latest
46+ runs-on : ${{ inputs.runner || ' ubuntu-latest' }}
4047 steps :
4148 - name : Cache Object Files
42- uses : actions/cache@v1
49+ uses : actions/cache@v3
4350 with :
4451 path : ccache
4552 key : ${{ matrix.config_set }}-${{ github.sha }}
4653 restore-keys : ${{ matrix.config_set }}
54+ - name : Pre Cleanup
55+ uses : docker://ghcr.io/su2code/su2/build-su2:220614-1237
56+ with :
57+ entrypoint : /bin/rm
58+ args : -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
4759 - name : Build
48- uses : docker://su2code/build-su2:20191105
60+ uses : docker://ghcr.io/ su2code/su2/ build-su2:220614-1237
4961 with :
5062 args : -b ${{github.ref}} -f "${{matrix.flags}}"
63+ - name : Compress binaries
64+ run : tar -zcvf install_bin.tgz install/bin
5165 - name : Upload Binaries
52- uses : actions/upload-artifact@v1
66+ uses : actions/upload-artifact@v3
5367 with :
5468 name : ${{ matrix.config_set }}
55- path : install/bin
69+ path : install_bin.tgz
70+ - name : Post Cleanup
71+ uses : docker://ghcr.io/su2code/su2/build-su2:220614-1237
72+ with :
73+ entrypoint : /bin/rm
74+ args : -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
5675 regression_tests :
57- runs-on : ubuntu-latest
76+ runs-on : ${{ inputs.runner || ' ubuntu-latest' }}
5877 name : Regression Tests
5978 needs : build
6079 strategy :
@@ -79,22 +98,44 @@ jobs:
7998 - testscript : ' hybrid_regression_AD.py'
8099 tag : OMP
81100 steps :
82- - name : Download All artifact
83- uses : actions/download-artifact@v2
84- - name : Move Binaries
101+ - name : Pre Cleanup
102+ uses : docker://ghcr.io/su2code/su2/test-su2:220614-1237
103+ with :
104+ entrypoint : /bin/rm
105+ args : -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
106+ - name : Download All artifacts
107+ uses : actions/download-artifact@v3
108+ - name : Uncompress and Move Binaries
85109 run : |
86- mkdir -p install/bin
87- if [ -d "${{format('Base{0}', matrix.tag)}}" ]; then cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/; fi
88- if [ -d "${{format('Reverse{0}', matrix.tag)}}" ]; then cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/; fi
89- if [ -d "${{format('Forward{0}', matrix.tag)}}" ]; then cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/; fi
90- chmod a+x install/bin/*
110+ BIN_FOLDER="$PWD/install/bin"
111+ mkdir -p $BIN_FOLDER
112+ ls -lah $BIN_FOLDER
113+ for type in Base Reverse Forward; do
114+ TYPE_FOLDER="${type}${{matrix.tag}}"
115+ echo "Processing '$TYPE_FOLDER' ..."
116+ if [ -d $TYPE_FOLDER ]; then
117+ pushd $TYPE_FOLDER
118+ ls -lah
119+ tar -zxvf install_bin.tgz
120+ ls -lah install/bin/
121+ cp -r install/bin/* $BIN_FOLDER;
122+ popd;
123+ fi
124+ done
125+ chmod a+x $BIN_FOLDER/*
126+ ls -lahR $BIN_FOLDER
91127 - name : Run Tests in Container
92- uses : docker://su2code/test-su2:20200303
128+ uses : docker://ghcr.io/ su2code/su2/ test-su2:220614-1237
93129 with :
94130 # -t <Tutorials-branch> -c <Testcases-branch>
95131 args : -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
132+ - name : Cleanup
133+ uses : docker://ghcr.io/su2code/su2/test-su2:220614-1237
134+ with :
135+ entrypoint : /bin/rm
136+ args : -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
96137 unit_tests :
97- runs-on : ubuntu-latest
138+ runs-on : ${{ inputs.runner || ' ubuntu-latest' }}
98139 name : Unit Tests
99140 needs : build
100141 strategy :
@@ -109,26 +150,54 @@ jobs:
109150 - testdriver : ' test_driver_DD'
110151 tag : MPI
111152 steps :
153+ - name : Pre Cleanup
154+ uses : docker://ghcr.io/su2code/su2/test-su2:220614-1237
155+ with :
156+ entrypoint : /bin/rm
157+ args : -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
112158 - name : Download Base
113- uses : actions/download-artifact@v1
159+ uses : actions/download-artifact@v3
114160 with :
115161 name : ${{format('Base{0}', matrix.tag)}}
162+ path : ${{format('Base{0}', matrix.tag)}}
116163 - name : Download Reverse
117- uses : actions/download-artifact@v1
164+ uses : actions/download-artifact@v3
118165 with :
119166 name : ${{format('Reverse{0}', matrix.tag)}}
167+ path : ${{format('Reverse{0}', matrix.tag)}}
120168 - name : Download Forward
121- uses : actions/download-artifact@v1
169+ uses : actions/download-artifact@v3
122170 with :
123171 name : ${{format('Forward{0}', matrix.tag)}}
124- - name : Move Binaries
172+ path : ${{format('Forward{0}', matrix.tag)}}
173+ - name : Uncompress and Move Binaries
125174 run : |
126- mkdir -p install/bin
127- cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/
128- cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/
129- cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/
130- chmod a+x install/bin/*
175+ ls -lah
176+ BIN_FOLDER="$PWD/install/bin"
177+ mkdir -p $BIN_FOLDER
178+ ls -laH $BIN_FOLDER
179+ for type in Base Reverse Forward; do
180+ TYPE_FOLDER="${type}${{matrix.tag}}"
181+ if [ -d $TYPE_FOLDER ]; then
182+ echo "Processing '$TYPE_FOLDER' ..."
183+ pushd $TYPE_FOLDER
184+ ls -lah
185+ tar -zxvf install_bin.tgz
186+ ls -laH install/bin/
187+ cp -r install/bin/* $BIN_FOLDER;
188+ popd;
189+ else
190+ echo "$TYPE_FOLDER does not exist!"
191+ fi
192+ done
193+ find $BIN_FOLDER -type f -exec chmod a+x '{}' \;
194+ ls -lahR $BIN_FOLDER
131195 - name : Run Unit Tests
132- uses : docker://su2code/test-su2:20191031
196+ uses : docker://ghcr.io/ su2code/su2/ test-su2:220614-1237
133197 with :
134198 entrypoint : install/bin/${{matrix.testdriver}}
199+ - name : Post Cleanup
200+ uses : docker://ghcr.io/su2code/su2/test-su2:220614-1237
201+ with :
202+ entrypoint : /bin/rm
203+ args : -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
0 commit comments