-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (62 loc) · 2.12 KB
/
build-test-new.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and Test (NEW)
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description:
Run the build with tmate debugging enabled
(https://github.com/marketplace/actions/debugging-with-tmate)
required: false
default: false
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-geant4:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
geant4-version:
- 11.1.3
runs-on: ${{ matrix.platform }}
steps:
- name: Install additional dependencies (ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential git curl libexpat-dev libxerces-c-dev
pip install cmake
- name: Check Cache
id: cache
uses: actions/cache@v2
with:
path: geant4-install
key: geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}
restore-keys: |
geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}
- name: Build and Install Geant4
if: steps.cache.outputs.cache-hit != 'true'
run: >
git clone https://github.com/Geant4/geant4.git geant4 --depth 1
--branch v${{ matrix.geant4-version }}
cmake -B geant4/build
-S geant4 -DCMAKE_INSTALL_PREFIX=geant4-install
-DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release
-DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_EXAMPLES=OFF
-DGEANT4_INSTALL_DATA=OFF -DGEANT4_BUILD_TLS_MODEL=global-dynamic
cmake --build geant4/build -j$(nproc) --target install
rm -rf geant4
- name: Cache Geant4 Installation
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache@v2
with:
path: geant4-install
key: geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}
restore-keys: |
geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}