Skip to content

Build on Ubuntu 20.0.4 and 22.0.4 #5

Build on Ubuntu 20.0.4 and 22.0.4

Build on Ubuntu 20.0.4 and 22.0.4 #5

Workflow file for this run

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