File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Geant4
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ version :
6+ description : ' Geant4 version to build'
7+ required : true
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ env :
12+ GEANT4_VERSION : " ${{ github.event.inputs.version }}"
13+ GEANT4_ARCHIVE : " geant4.${{ github.event.inputs.version }}-binaries.tar.gz"
14+ steps :
15+ - name : Check out repository code
16+ uses : actions/checkout@v2
17+ - name : Install packages
18+ run : sudo apt-get install libxerces-c-dev
19+ - name : Build Geant4
20+ run : |
21+ cd $HOME
22+ $GITHUB_WORKSPACE/build.sh
23+ tar czf $GITHUB_WORKSPACE/$GEANT4_ARCHIVE Geant4
24+ - name : Upload binaries
25+ uses : actions/upload-artifact@v2
26+ with :
27+ name : geant4.${{ github.event.inputs.version }}
28+ path : ${{ env.GEANT4_ARCHIVE }}
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ if [ -z " $GEANT4_VERSION " ]; then
6+ echo " Please set GEANT4_VERSION!"
7+ exit 1
8+ fi
9+
10+ # Download the source code.
11+ dir=" geant4.$GEANT4_VERSION "
12+ archive=" $dir .tar.gz"
13+ url=" https://geant4-data.web.cern.ch/releases/$archive "
14+ wget " $url "
15+ tar xf " $archive "
16+
17+ # Build the libraries and install them, including the data files.
18+ mkdir build
19+ cd build
20+ cmake \
21+ -DCMAKE_BUILD_TYPE=Release \
22+ -DCMAKE_INSTALL_PREFIX=../Geant4 \
23+ -DGEANT4_INSTALL_DATA=ON \
24+ -DGEANT4_INSTALL_EXAMPLES=OFF \
25+ -DGEANT4_BUILD_MULTITHREADED=ON \
26+ -DGEANT4_USE_GDML=ON \
27+ " ../$dir "
28+ make -j4
29+ make install
30+
31+ # Delete optional data files.
32+ cd ..
33+ rm -rf Geant4/share/* /data/G4NDL*
34+ rm -rf Geant4/share/* /data/RealSurface*
You can’t perform that action at this time.
0 commit comments