Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated github actions #138

Merged
merged 1 commit into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build and Test

on:
workflow_dispatch:

jobs:
Check-Image:
runs-on: self-hosted
container:
image: ghcr.io/lobis/root-geant4-garfield:cpp17_ROOT-v6-20-06_Geant4-v10.4.3_Garfield-4.0

steps:
- name: Check ROOT is available in non-interactive shell
run: |
root-config --version
root-config --prefix
root-config --cflags
- name: Check Geant4 is available in non-interactive shell
run: |
geant4-config --version
geant4-config --prefix
geant4-config --cflags
geant4-config --datasets
- name: Check ROOT
run: |
root -e 'TTree tree; return 0;' -q
- name: Check Geant4 by building and runing a basic example
run: |
G4_VERSION=$(geant4-config --version)
G4_INSTALL=$(geant4-config --prefix)
G4_EXAMPLES=${G4_INSTALL}/share/Geant4-${G4_VERSION}/examples
echo "Geant4 examples dir: $G4_EXAMPLES"
cd $G4_EXAMPLES/basic/B1
mkdir build && cd build
cmake ..
make
./exampleB1 run1.mac
- name: Check Garfield is available from ROOT prompt
run: |
root -e '
#include "Garfield/MediumMagboltz.hh"
using namespace Garfield;
MediumMagboltz gas;
return 0;' -q

Build:
needs: Check-Image
runs-on: self-hosted
container:
image: ghcr.io/lobis/root-geant4-garfield:cpp17_ROOT-v6-20-06_Geant4-v10.4.3_Garfield-4.0
env:
REST_PATH: /rest/install

steps:
- uses: actions/checkout@v2

- name: Pull Submodules
run: yes | python3 pull-submodules.py --clean

- name: Build
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH } -DREST_WELCOME=OFF -DREST_GARFIELD=ON -DREST_G4=ON -DRESTLIB_DETECTOR=ON -DRESTLIB_RAW=ON -DRESTLIB_TRACK=ON
make -j$(nproc)
make install

- name: REST config
run: |
${REST_PATH}/bin/rest-config --version
${REST_PATH}/bin/rest-config --libs
${REST_PATH}/bin/rest-config --flags
${REST_PATH}/bin/rest-config --commit
93 changes: 0 additions & 93 deletions .github/workflows/ci.yml

This file was deleted.