-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (61 loc) · 1.81 KB
/
build_release.yml
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
name: Build Geant4
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
release: [ 11.2.2 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
# - name: Install prerequisites
# shell: bash
# run: |
# sudo apt-get update -y
# sudo apt-get install -y libz-dev libpcap-dev libzstd-dev libzmq3-dev \
# libprotobuf-c-dev protobuf-c-compiler libprotobuf-dev \
# protobuf-compiler libprotoc-dev
- name: Fetch Geant4 release
shell: bash
run: |
curl -L https://github.com/Geant4/geant4/archive/refs/tags/v${{ matrix.release }}.tar.gz | tar -zxf -
- name: Configure
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr ../geant4-${{ matrix.release }}
# -DGEANT4_INSTALL_DATA=ON \
- name: Build
shell: bash
run: |
cd build
make -j3
- name: Install
shell: bash
run: |
find /usr -print > files1.txt
cd build
sudo make install
- name: Make TBZ2 package
shell: bash
run: |
find /usr -print > files2.txt
cat files1.txt files2.txt | sort | uniq -u > files3.txt
tar -jcf Geant4-${{ matrix.os }}-${{ matrix.release }}.tbz2 -C / -T files3.txt
ls -l
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ matrix.os }}-${{ matrix.release }}"
prerelease: true
title: "Build of Geant4 v${{ matrix.release }} on ${{ matrix.os }}"
files: |
*.tbz2