1- name : Gambit CI
1+ name : Gambit Ubuntu CI
22
33on :
44 push :
99 - cron : ' 0 5 * * *'
1010
1111jobs :
12+ # A job that builds GAMBIT + scanners, tests the command-line interface
13+ # and runs a minimal test run with spartan.yaml
1214 gambit_build :
1315 runs-on : [docker, self-hosted]
1416 strategy :
4850 - name : Configure with cmake
4951 run : |
5052 cd BUILD/ && . buildenv.sh
51- cmake .. -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF
53+ cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF
5254 - name : Build scanners
5355 run : |
5456 cd BUILD/ && . buildenv.sh
@@ -57,28 +59,208 @@ jobs:
5759 - name : Build Gambit
5860 run : |
5961 cd BUILD && . buildenv.sh
62+ # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467
63+ # Can remove this once issue #467 is fixed.
64+ make -j$(( ($(nproc)+1)/2 )) yoda
65+ make -j$(( ($(nproc)+1)/2 )) hepmc
66+ # Now build Gambit
6067 make -j$(( ($(nproc)+1)/2 )) gambit
61- - name : Build backends
62- run : |
63- cd BUILD && . buildenv.sh
64- #make -j$(( ($(nproc)+1)/2 )) backends
65- make backends
6668 - name : CLI test
6769 run : |
6870 . BUILD/buildenv.sh
6971 ./gambit -h
70- - name : WC test
72+ - name : Run spartan.yaml
7173 run : |
7274 . BUILD/buildenv.sh
73- ./gambit -f yaml_files/WC_lite.yaml
74- - name : ColliderBit test
75+ ./gambit -rf yaml_files/spartan.yaml
76+
77+
78+ # A job that tests the builds for all backends in the "make backends" target.
79+ # Backends that are anyway tested as part of the "test_runs" job can be skipped,
80+ # see the build_backends.sh command below.
81+ backends_build :
82+ if : ${{ always() }}
83+ needs : [gambit_build] # Sets run order
84+ runs-on : [docker, self-hosted]
85+ strategy :
86+ fail-fast : false
87+ matrix :
88+ arch : [ubuntu] # , ubuntu-py2, fedora
89+ # mpi: [ON, OFF]
90+ container : gambitbsm/gambit-base:${{ matrix.arch }}
91+ defaults :
92+ run :
93+ shell : bash -eo pipefail {0}
94+ steps :
95+ - name : Checkout
96+ uses : actions/checkout@v2
97+ - name : Set up build environment
98+ run : |
99+ mkdir -p BUILD
100+ cd BUILD
101+ echo "Sourcing setup.sh"
102+ cat /etc/profile.d/gambit-setup.sh
103+ source /etc/profile.d/gambit-setup.sh
104+ echo "Making buildenv.sh"
105+ > buildenv.sh
106+ echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh
107+ echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh
108+ echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh
109+ echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh
110+ echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh
111+ PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))')
112+ PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))')
113+ echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh
114+ echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh
115+ echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh
116+ echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh
117+ cat buildenv.sh
118+ pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0
119+ - name : Configure with cmake
120+ run : |
121+ cd BUILD/ && . buildenv.sh
122+ cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF
123+ - name : Build backends
124+ run : |
125+ cd BUILD && . buildenv.sh
126+ # Build backends, except those that are tested via other jobs.
127+ # This replaces the "make backends" command.
128+ ../cmake/scripts/build_backends.sh -f default_backends.txt -j 1 -s "nulike susyhit rivet contur pythia higgsbounds higgssignals ATLAS_FullLikes superiso heplikedata heplike"
129+
130+
131+ # A job for GAMBIT test runs. Only those GAMBIT modules, scanners and backends
132+ # required by the test runs are built.
133+ test_runs :
134+ if : ${{ always() }}
135+ needs : [gambit_build, backends_build] # Sets run order
136+ runs-on : [docker, self-hosted]
137+ strategy :
138+ fail-fast : false
139+ matrix :
140+ arch : [ubuntu] # , ubuntu-py2, fedora
141+ # mpi: [ON, OFF]
142+ container : gambitbsm/gambit-base:${{ matrix.arch }}
143+ defaults :
144+ run :
145+ shell : bash -eo pipefail {0}
146+ steps :
147+ - name : Checkout
148+ uses : actions/checkout@v2
149+ - name : Set up build environment
150+ run : |
151+ mkdir -p BUILD
152+ cd BUILD
153+ echo "Sourcing setup.sh"
154+ cat /etc/profile.d/gambit-setup.sh
155+ source /etc/profile.d/gambit-setup.sh
156+ echo "Making buildenv.sh"
157+ > buildenv.sh
158+ echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh
159+ echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh
160+ echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh
161+ echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh
162+ echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh
163+ PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))')
164+ PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))')
165+ echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh
166+ echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh
167+ echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh
168+ echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh
169+ cat buildenv.sh
170+ pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0
171+ - name : Configure with cmake
172+ run : |
173+ cd BUILD/ && . buildenv.sh
174+ cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM" -D WITH_MPI=OFF -Ditch="DarkBit;CosmoBit;NeutrinoBit;ObjectivesBit"
175+ - name : Build required scanners
176+ run : |
177+ cd BUILD/ && . buildenv.sh
178+ make -j$(( ($(nproc)+1)/2 )) diver
179+ cmake ..
180+ - name : Build required backends
181+ run : |
182+ cd BUILD/ && . buildenv.sh
183+ # Build bakends needed for ColliderBit_CMSSM.yaml
184+ make -j$(( ($(nproc)+1)/2 )) nulike
185+ make -j$(( ($(nproc)+1)/2 )) susyhit
186+ make -j$(( ($(nproc)+1)/2 )) rivet
187+ make -j$(( ($(nproc)+1)/2 )) contur
188+ make -j$(( ($(nproc)+1)/2 )) pythia
189+ make -j$(( ($(nproc)+1)/2 )) higgsbounds
190+ make -j$(( ($(nproc)+1)/2 )) higgssignals
191+ make ATLAS_FullLikes
192+ # Build bakends needed for WC.yaml
193+ make superiso
194+ make -j$(( ($(nproc)+1)/2 )) heplikedata
195+ make -j$(( ($(nproc)+1)/2 )) heplike
196+ - name : Build Gambit
197+ run : |
198+ cd BUILD && . buildenv.sh
199+ # Build YODA and HepMC first, to avoid race condition during parallel build: https://github.com/GambitBSM/gambit/issues/467
200+ # Can remove this once issue #467 is fixed.
201+ make -j$(( ($(nproc)+1)/2 )) yoda
202+ make -j$(( ($(nproc)+1)/2 )) hepmc
203+ # Now build Gambit
204+ make -j$(( ($(nproc)+1)/2 )) gambit
205+ - name : Run ColliderBit_CMSSM.yaml
206+ run : |
207+ . BUILD/buildenv.sh
208+ ./gambit -rf yaml_files/ColliderBit_CMSSM.yaml
209+ - name : Run WC.yaml
75210 run : |
76211 . BUILD/buildenv.sh
77- ./gambit -f yaml_files/ColliderBit_CMSSM.yaml
212+ ./gambit -rf yaml_files/WC.yaml
213+
214+
215+ # A job that builds all the standalones
216+ standalones_build :
217+ if : ${{ always() }}
218+ needs : [gambit_build, backends_build, test_runs] # Sets run order
219+ runs-on : [docker, self-hosted]
220+ strategy :
221+ fail-fast : false
222+ matrix :
223+ arch : [ubuntu] # , ubuntu-py2, fedora
224+ # mpi: [ON, OFF]
225+ container : gambitbsm/gambit-base:${{ matrix.arch }}
226+ defaults :
227+ run :
228+ shell : bash -eo pipefail {0}
229+ steps :
230+ - name : Checkout
231+ uses : actions/checkout@v2
232+ - name : Set up build environment
233+ run : |
234+ mkdir -p BUILD
235+ cd BUILD
236+ echo "Sourcing setup.sh"
237+ cat /etc/profile.d/gambit-setup.sh
238+ source /etc/profile.d/gambit-setup.sh
239+ echo "Making buildenv.sh"
240+ > buildenv.sh
241+ echo "source /etc/profile.d/gambit-setup.sh" >> buildenv.sh
242+ echo "export CMAKE_BUILD_TYPE=None" >> buildenv.sh
243+ echo "export CMAKE_C_COMPILER=$(which gcc)" >> buildenv.sh
244+ echo "export CMAKE_CXX_COMPILER=$(which g++)" >> buildenv.sh
245+ echo "export CMAKE_Fortran_COMPILER=$(which gfortran)" >> buildenv.sh
246+ PYTHON_LIBRARY=$(python -c 'from __future__ import print_function; from distutils.sysconfig import get_config_var; print("%s/%s" % (get_config_var("LIBDIR"), get_config_var("INSTSONAME")))')
247+ PYTHON_INCLUDE_DIR=$(python -c 'from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))')
248+ echo "export PYTHON_EXECUTABLE=$(which python)" >> buildenv.sh
249+ echo "export PYTHON_LIBRARY=$PYTHON_LIBRARY" >> buildenv.sh
250+ echo "export PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" >> buildenv.sh
251+ echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> buildenv.sh
252+ cat buildenv.sh
253+ pip install --upgrade pyyaml pybind11 h5py scipy numpy pyhf configobj pandas matplotlib setuptools==58.2.0
254+ - name : Configure with cmake
255+ run : |
256+ cd BUILD/ && . buildenv.sh
257+ cmake .. -D CMAKE_CXX_FLAGS="-rdynamic" -D WITH_ROOT=OFF -D WITH_RESTFRAMES=OFF -D WITH_HEPMC=ON -D WITH_YODA=ON -D BUILD_FS_MODELS="CMSSM;MSSM;MDM" -D WITH_MPI=OFF
78258 - name : Build standalones
79259 run : |
80260 cd BUILD && . buildenv.sh
81261 make standalones
262+
263+
82264 # - name: Validation dependencies
83265 # run: |
84266 # . BUILD/buildenv.sh
0 commit comments