Addressing TRESTDAQFEMINOS issues and few bug fixes #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validation | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "master" branch | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
release: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Get branch name (merge) | |
if: github.event_name != 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | |
- name: Get branch name (pull request) | |
if: github.event_name == 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV | |
- name: Print env | |
run: | | |
echo github.event.action: ${{ github.event.action }} | |
echo github.event_name: ${{ github.event_name }} | |
echo github.branch: ${{ env.BRANCH_NAME }} | |
- name: Versioning | |
run: | | |
cmake --version | |
gcc --version | |
root-config --version | |
- name: Checkout REST Framework | |
uses: actions/checkout@v3 | |
with: | |
repository: rest-for-physics/framework | |
path: framework | |
ref: master | |
- name: Checkout framework branch | |
shell: bash | |
run: | | |
cd framework | |
var=$(git ls-remote --heads origin ${{ env.BRANCH_NAME }}) | |
if [ -z $var ]; then | |
git pull | |
else | |
git checkout ${{ env.BRANCH_NAME }} | |
git pull | |
fi | |
- name: Pull submodules | |
run: | | |
cd framework | |
python3 pull-submodules.py --force --dontask --latest:${{ env.BRANCH_NAME }} | |
- name: Configure | |
run: | | |
mkdir build | |
mkdir install | |
cmake framework -B build -DCMAKE_INSTALL_PREFIX=install/ -DRESTLIB_DETECTOR=ON -DREST_G4=OFF -DREST_GARFIELD=OFF -DREST_DAQ=ON | |
- name: Build and install | |
run: | | |
cd build | |
make -j4 install | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rest-intall | |
path: install | |
retention-days: 2 |