diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d1b317b52..783e4ff7f 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,27 +1,27 @@ -name: 'build' -description: 'Build and install framework' +name: "build" +description: "Build and install framework" inputs: branch: - description: 'Branch to checkout framework repo' + description: "Branch to checkout framework repo" required: true - default: 'master' - cmakeflags: - description: 'CMake flags for the build' + default: "master" + cmake-flags: + description: "CMake flags for the build" required: true - default: '-DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON' - buildpath: - description: 'Path where the framework is built' + default: "-DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON" + build-path: + description: "Path where the framework is built" required: false - default: 'build' - + default: "build" + runs: using: "composite" steps: - name: Checkout repo uses: actions/checkout@v3 with: - repository: rest-for-physics/framework - path: framework + repository: rest-for-physics/framework + path: framework - name: Checkout framework branch run: | cd framework @@ -31,7 +31,7 @@ runs: - name: Build and install run: | cd framework - mkdir -p ${{ inputs.buildpath }} - cmake -B ${{ inputs.buildpath }} ${{ inputs.cmakeflags }} - make -C ${{ inputs.buildpath }} -j8 install + mkdir -p ${{ inputs.build-path }} + cmake -B ${{ inputs.build-path }} ${{ inputs.cmake-flags }} + make -C ${{ inputs.build-path }} -j8 install shell: bash diff --git a/.github/workflows/Validation.yml b/.github/workflows/Validation.yml deleted file mode 100644 index 88e173cf6..000000000 --- a/.github/workflows/Validation.yml +++ /dev/null @@ -1,380 +0,0 @@ -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: - -env: - CMAKE_BUILD_TYPE: Release - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - -defaults: - run: - shell: bash - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - - BuildTest: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev - steps: - - uses: actions/checkout@v3 - - name: Build and install - uses: ./.github/actions/build - with: - cmakeflags: '-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON -DTEST=ON' - branch: '${{ env.BRANCH_NAME }}' - buildpath: build - - name: Test - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/build - ctest --output-on-failure - - Build: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev - steps: - - uses: actions/checkout@v3 - - name: Build and install - uses: ./.github/actions/build - with: - cmakeflags: '-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON' - branch: '${{ env.BRANCH_NAME }}' - - name: Test REST - run: | - printenv - cat framework/install/thisREST.sh - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - restManager ListMacros - restRoot -b -q - - name: Cache framework installation - id: framework-install-cache - uses: actions/cache@v3 - with: - key: ${{ github.sha }} - path: framework/install - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: rest-install - path: framework/install - retention-days: 1 - - BuildOld: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022 - steps: - - uses: actions/checkout@v3 - - name: Build and install - uses: ./.github/actions/build - with: - cmakeflags: '-DCMAKE_INSTALL_PREFIX=installOld -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON' - branch: '${{ env.BRANCH_NAME }}' - - name: Test REST - run: | - printenv - cat framework/installOld/thisREST.sh - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - restManager ListMacros - restRoot -b -q - - name: Cache framework installation - id: framework-install-cache-old - uses: actions/cache@v3 - with: - key: ${{ github.sha }} - path: framework/installOld - - Metadata: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev - needs: Build - steps: - - uses: actions/checkout@v3 - with: - repository: rest-for-physics/framework - path: framework - - name: Checkout framework branch - run: | - cd framework - ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} - - name: Restore cache - uses: actions/cache@v3 - id: framework-install-cache - with: - key: ${{ github.sha }} - path: framework/install - # Not used in gitlab pipeline, checks $CI_SERVER_HOST - - name: Load Gas - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/metadata/gas/ - restRoot -b -q LoadGasFromServerAndValidate.C - # Not working, not used in gitlab pipeline - #- name: Generate Gas - # run: | - # source framework/install/thisREST.sh - # source $(root-config --bindir)/thisroot.sh - # cd framework/pipeline/metadata/gas/ - # restRoot -b -q GenerateDummyGas.C - - name: Generate Readout - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/metadata/readout/ - restManager --c generateReadout.rml --o readout.root - restRoot -b -q PrintReadout.C'("readout.root")' > /dev/null - # We need to introduce basic validation here - # - diff validation.txt print.txt - - name: Basic Readout - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/projects/basic-readouts - git submodule update --init . - restRoot -b -q GenerateReadouts.C'("basic.root")' - restRoot -b -q BasicValidation.C'("basic.root", "pixelDecoding")' - - PandaXIII: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022 - needs: BuildOld - steps: - - uses: actions/checkout@v3 - with: - repository: rest-for-physics/framework - path: framework - - name: Checkout framework branch - run: | - cd framework - ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} - - name: Restore cache - uses: actions/cache@v3 - id: framework-install-cache-old - with: - key: ${{ github.sha }} - path: framework/installOld - - name: 02_PandaXiiiMC - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/pandaxiii_MC - restG4 Xe136bb0n.rml - restRoot -b -q ValidateG4.C'("Xe136bb0n_n2E06.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: Xe136bb - path: framework/pipeline/pandaxiii_MC/Xe136bb0n_n2E06.root - retention-days: 1 - - name: PandaXIII Topological - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/pandaxiii_MC - restManager --c AllProcesses.rml --i testInput.root --o testOutput.root --j 1 --e 10 - restRoot -b -q ../MakeBasicTree.C'("testOutput.root")' - restRoot -b -q ../ValidateTrees.C'("validation.root")' -# This command is failing in the docker, reproducible locally, not clear why... -# echo | sleep 5 | restManager --c plots.rml --i testOutput.root -# - name: Upload Artifacts -# uses: actions/upload-artifact@v3 -# with: -# name: PandaTrackParam -# path: framework/pipeline/pandaxiii_MC/trackParameter.png -# retention-days: 1 - - name: PandaXIII Topological from Geant4 - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/pandaxiii_MC - echo "using just-generated g4 file" - restManager --c AllProcesses.rml --i Xe136bb0n_n2E06.root --o testOutput.root --j 1 --e 10 - restRoot -b -q ../MakeBasicTree.C'("testOutput.root")' - restRoot -b -q ../ValidateTrees.C'("validation.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: PandaTestOutput - path: framework/pipeline/pandaxiii_MC/testOutput.root - retention-days: 1 - - name: PandaXIII Data - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/pandaxiii_data - restManager --c P3AutoChain.rml --i CoBo_AsAd0_2019-03-15.graw --o testOutput.root --j 1 - restRoot -b -q ../MakeBasicTree.C'("testOutput.root")' - restRoot -b -q ../ValidateTrees.C'("validation.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: PandaTriggerRate - path: framework/pipeline/pandaxiii_data/TriggerRate.png - retention-days: 1 - - TREX: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev - needs: Build - steps: - - uses: actions/checkout@v3 - with: - repository: rest-for-physics/framework - path: framework - - name: Checkout framework branch - run: | - cd framework - ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} - - name: Restore cache - uses: actions/cache@v3 - id: framework-install-cache - with: - key: ${{ github.sha }} - path: framework/install - - name: TREX-DM Latest Data - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/trex - wget https://sultan.unizar.es/trexdm-readouts/readouts_v2.3.root - restManager --c 01_raw.rml --f R01928_tagTest_Vm_250_Vd_160_Pr_6_Gain_0x0_Shape_0xF_Clock_0x4-068.aqs - restManager --c 02_signal.rml --f RawData_01928.root - restManager --c 03_hits.rml --f Signals_01928.root - restRoot -b -q ../MakeBasicTree.C'("Hits_01928.root")' - rm RawData_01928.root - rm Signals_01928.root - root -b -q ../ValidateTrees.C'("validation.root")' - restRoot -b -q ValidateDetectorParams.C'("Hits_01928.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: TREXHits - path: framework/pipeline/trex/Hits_01928.root - retention-days: 1 - - name: AnalysisPlot - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/analysisPlot/ - restManager --c summary.rml --f ../trex/Hits_01928.root - - name: AnalysisPlot2 - run: | - source framework/install/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/analysisPlot/ - restManager --batch --c classify.rml - restRoot -b -q ValidateClassify.C - - Examples: - runs-on: ubuntu-latest - container: - image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022 - needs: BuildOld - steps: - - uses: actions/checkout@v3 - with: - repository: rest-for-physics/framework - path: framework - - name: Checkout framework branch - run: | - cd framework - ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} - - name: Restore cache - uses: actions/cache@v3 - id: framework-install-cache-old - with: - key: ${{ github.sha }} - path: framework/installOld - - name: Test Metadata - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/installOld/examples - restManager --c saveMetadataFile.rml --o meta.root - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: Metadata - path: framework/installOld/examples/meta.root - retention-days: 1 - - name: 01_NLDBD - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/installOld/examples/restG4/01.NLDBD/ - restG4 NLDBD.rml - restRoot -b -q Validate.C'("Run00001_NLDBD_Test.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: NLDBD - path: framework/installOld/examples/restG4/01.NLDBD/Run00001_NLDBD_Test.root - retention-days: 1 - - name: Event Selection - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/pipeline/selection - restManager --c g4Analysis.rml --f ../../installOld/examples/restG4/01.NLDBD/Run00001_NLDBD_Test.root - restManager --c g4OnSelection.rml --f Run00001_NLDBD_Test_g4Analysis.root - restRoot -b -q Validate.C'("Run00001_NLDBD_Test_EvSelection.root")' - restManager --c g4EvSelectionIDsFromFile.rml --f Run00001_NLDBD_Test_g4Analysis.root - restRoot -b -q ValidateIDsFromFile.C'("Run00001_NLDBD_Test_EvSelectionIDsFromFile.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: EventSelection - path: framework/pipeline/selection/IDs.txt - retention-days: 1 - - name: 08_alphas - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/installOld/examples/restG4/08.Alphas/ - mkdir data - export REST_ENERGY=5 - export REST_FOIL=1 - restG4 alphas.rml - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: Alphas - path: framework/installOld/examples/restG4/08.Alphas/data/Run_5MeV_1um.root - retention-days: 1 - - name: 01_alphaTrack - run: | - source framework/installOld/thisREST.sh - source $(root-config --bindir)/thisroot.sh - cd framework/installOld/examples/01.alphaTrack/ - mkdir data - export RAW_PROCESSING=ON - export HIT_PROCESSING=ON - export TRACK_PROCESSING=ON - restManager --c processing.rml --f ../restG4/08.Alphas/data/Run_5MeV_1um.root - restRoot -b -q Validate.C'("data/Response_5MeV_1um.root")' - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: AlphaTrack - path: framework/installOld/examples/restG4/08.Alphas/data/Run_5MeV_1um.root - retention-days: 1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d6c8f48d3..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,73 +0,0 @@ -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 diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 000000000..fb0475052 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,370 @@ +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: + +env: + CMAKE_BUILD_TYPE: Release + REST_PATH: /rest/framework/install + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +defaults: + run: + shell: bash + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + + build-test: + name: Build and run tests + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev + steps: + - uses: actions/checkout@v3 + - name: Build and install + uses: ./.github/actions/build + with: + cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON -DTEST=ON" + branch: ${{ env.BRANCH_NAME }} + build-path: build + - name: Test + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/build + ctest --output-on-failure + + framework-install: + name: Build and cache installation + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev + steps: + - uses: actions/checkout@v3 + - name: Build and install + uses: ./.github/actions/build + with: + cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON" + branch: ${{ env.BRANCH_NAME }} + - name: Test REST + run: | + printenv + cat ${{ env.REST_PATH }}/thisREST.sh + source ${{ env.REST_PATH }}/thisREST.sh + restManager ListMacros + restRoot -b -q + - name: Cache framework installation + id: framework-install-cache + uses: actions/cache@v3 + with: + key: ${{ env.BRANCH_NAME }}-${{ github.sha }} + path: ${{ env.REST_PATH }} + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: rest-install + path: ${{ env.REST_PATH }} + retention-days: 1 + + framework-install-reference: + name: Build with reference version of dependencies + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022 + steps: + - uses: actions/checkout@v3 + - name: Build and install + uses: ./.github/actions/build + with: + cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH=$GARFIELD_INSTALL -DREST_ALL_LIBS=ON -DREST_G4=ON -DREST_GARFIELD=ON" + branch: ${{ env.BRANCH_NAME }} + - name: Test REST + run: | + printenv + cat ${{ env.REST_PATH }}/thisREST.sh + source ${{ env.REST_PATH }}/thisREST.sh + restManager ListMacros + restRoot -b -q + - name: Cache framework installation + id: framework-install-cache-reference + uses: actions/cache@v3 + with: + key: ${{ env.BRANCH_NAME }}-${{ github.sha }} + path: ${{ env.REST_PATH }} + + metadata: + name: "Metadata" + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev + needs: [ framework-install ] + steps: + - uses: actions/checkout@v3 + with: + repository: rest-for-physics/framework + path: framework + - name: Checkout framework branch + run: | + cd framework + ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} + - name: Restore cache + uses: actions/cache@v3 + id: framework-install-cache + with: + key: ${{ env.BRANCH_NAME }}-${{ github.sha }} + path: ${{ env.REST_PATH }} + # Not used in gitlab pipeline, checks $CI_SERVER_HOST + - name: Load Gas + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/metadata/gas/ + restRoot -b -q LoadGasFromServerAndValidate.C + # Not working, not used in gitlab pipeline + #- name: Generate Gas + # run: | + # source ${{ env.REST_PATH }}/thisREST.sh + # source $(root-config --bindir)/thisroot.sh + # cd framework/pipeline/metadata/gas/ + # restRoot -b -q GenerateDummyGas.C + - name: Generate Readout + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/metadata/readout/ + restManager --c generateReadout.rml --o readout.root + restRoot -b -q PrintReadout.C'("readout.root")' > /dev/null + # We need to introduce basic validation here + # - diff validation.txt print.txt + - name: Basic Readout + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/projects/basic-readouts + git submodule update --init . + restRoot -b -q GenerateReadouts.C'("basic.root")' + restRoot -b -q BasicValidation.C'("basic.root", "pixelDecoding")' + + pandax-iii: + name: "PandaX-III" + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022 + needs: [ framework-install-reference ] + steps: + - uses: actions/checkout@v3 + with: + repository: rest-for-physics/framework + path: framework + - name: Checkout framework branch + run: | + cd framework + ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} + - name: Restore cache + uses: actions/cache@v3 + id: framework-install-cache-reference + with: + key: ${{ env.BRANCH_NAME }}-${{ github.sha }} + path: ${{ env.REST_PATH }} + - name: 02_PandaXiiiMC + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/pandaxiii_MC + restG4 Xe136bb0n.rml + restRoot -b -q ValidateG4.C'("Xe136bb0n_n2E06.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: Xe136bb + path: framework/pipeline/pandaxiii_MC/Xe136bb0n_n2E06.root + retention-days: 1 + - name: PandaXIII Topological + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/pandaxiii_MC + restManager --c AllProcesses.rml --i testInput.root --o testOutput.root --j 1 --e 10 + restRoot -b -q ../MakeBasicTree.C'("testOutput.root")' + restRoot -b -q ../ValidateTrees.C'("validation.root")' + # This command is failing in the docker, reproducible locally, not clear why... + # echo | sleep 5 | restManager --c plots.rml --i testOutput.root + # - name: Upload Artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: PandaTrackParam + # path: framework/pipeline/pandaxiii_MC/trackParameter.png + # retention-days: 1 + - name: PandaXIII Topological from Geant4 + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/pandaxiii_MC + echo "using just-generated g4 file" + restManager --c AllProcesses.rml --i Xe136bb0n_n2E06.root --o testOutput.root --j 1 --e 10 + restRoot -b -q ../MakeBasicTree.C'("testOutput.root")' + restRoot -b -q ../ValidateTrees.C'("validation.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: PandaTestOutput + path: framework/pipeline/pandaxiii_MC/testOutput.root + retention-days: 1 + - name: PandaXIII Data + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/pandaxiii_data + restManager --c P3AutoChain.rml --i CoBo_AsAd0_2019-03-15.graw --o testOutput.root --j 1 + restRoot -b -q ../MakeBasicTree.C'("testOutput.root")' + restRoot -b -q ../ValidateTrees.C'("validation.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: PandaTriggerRate + path: framework/pipeline/pandaxiii_data/TriggerRate.png + retention-days: 1 + + trex-dm: + name: "TREX-DM" + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-dev + needs: [ framework-install ] + steps: + - uses: actions/checkout@v3 + with: + repository: rest-for-physics/framework + path: framework + - name: Checkout framework branch + run: | + cd framework + ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} + - name: Restore cache + uses: actions/cache@v3 + id: framework-install-cache + with: + key: ${{ env.BRANCH_NAME }}-${{ github.sha }} + path: ${{ env.REST_PATH }} + - name: TREX-DM Latest Data + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/trex + wget https://sultan.unizar.es/trexdm-readouts/readouts_v2.3.root + restManager --c 01_raw.rml --f R01928_tagTest_Vm_250_Vd_160_Pr_6_Gain_0x0_Shape_0xF_Clock_0x4-068.aqs + restManager --c 02_signal.rml --f RawData_01928.root + restManager --c 03_hits.rml --f Signals_01928.root + restRoot -b -q ../MakeBasicTree.C'("Hits_01928.root")' + rm RawData_01928.root + rm Signals_01928.root + root -b -q ../ValidateTrees.C'("validation.root")' + restRoot -b -q ValidateDetectorParams.C'("Hits_01928.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: TREXHits + path: framework/pipeline/trex/Hits_01928.root + retention-days: 1 + - name: AnalysisPlot + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/analysisPlot/ + restManager --c summary.rml --f ../trex/Hits_01928.root + - name: AnalysisPlot2 + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/analysisPlot/ + restManager --batch --c classify.rml + restRoot -b -q ValidateClassify.C + + examples: + name: Run examples + runs-on: ubuntu-latest + container: + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022 + needs: [ framework-install-reference ] + steps: + - uses: actions/checkout@v3 + with: + repository: rest-for-physics/framework + path: framework + - name: Checkout framework branch + run: | + cd framework + ./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }} + - name: Restore cache + uses: actions/cache@v3 + id: framework-install-cache-reference + with: + key: ${{ env.BRANCH_NAME }}-${{ github.sha }} + path: ${{ env.REST_PATH }} + - name: Test Metadata + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd ${{ env.REST_PATH }}/examples + restManager --c saveMetadataFile.rml --o meta.root + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: Metadata + path: ${{ env.REST_PATH }}/examples/meta.root + retention-days: 1 + - name: 01_NLDBD + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd ${{ env.REST_PATH }}/examples/restG4/01.NLDBD/ + restG4 NLDBD.rml + restRoot -b -q Validate.C'("Run00001_NLDBD_Test.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: NLDBD + path: ${{ env.REST_PATH }}/examples/restG4/01.NLDBD/Run00001_NLDBD_Test.root + retention-days: 1 + - name: Event Selection + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd framework/pipeline/selection + restManager --c g4Analysis.rml --f ${{ env.REST_PATH }}/examples/restG4/01.NLDBD/Run00001_NLDBD_Test.root + restManager --c g4OnSelection.rml --f Run00001_NLDBD_Test_g4Analysis.root + restRoot -b -q Validate.C'("Run00001_NLDBD_Test_EvSelection.root")' + restManager --c g4EvSelectionIDsFromFile.rml --f Run00001_NLDBD_Test_g4Analysis.root + restRoot -b -q ValidateIDsFromFile.C'("Run00001_NLDBD_Test_EvSelectionIDsFromFile.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: EventSelection + path: framework/pipeline/selection/IDs.txt + retention-days: 1 + - name: 08_alphas + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd ${{ env.REST_PATH }}/examples/restG4/08.Alphas/ + mkdir data + export REST_ENERGY=5 + export REST_FOIL=1 + restG4 alphas.rml + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: Alphas + path: ${{ env.REST_PATH }}/examples/restG4/08.Alphas/data/Run_5MeV_1um.root + retention-days: 1 + - name: 01_alphaTrack + run: | + source ${{ env.REST_PATH }}/thisREST.sh + cd ${{ env.REST_PATH }}/examples/01.alphaTrack/ + mkdir data + export RAW_PROCESSING=ON + export HIT_PROCESSING=ON + export TRACK_PROCESSING=ON + restManager --c processing.rml --f ../restG4/08.Alphas/data/Run_5MeV_1um.root + restRoot -b -q Validate.C'("data/Response_5MeV_1um.root")' + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: AlphaTrack + path: ${{ env.REST_PATH }}/examples/restG4/08.Alphas/data/Run_5MeV_1um.root + retention-days: 1