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

ci: add github workflow to build pull requests #23

Merged
merged 7 commits into from
Feb 3, 2025
Merged
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
49 changes: 49 additions & 0 deletions .github/workflows/build-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Pull Request

on:
pull_request:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:

build-n-test:
runs-on: [gpu]

container:
image: ghcr.io/bnlnpps/esi-shell
volumes:
- /usr/local/optix:/usr/local/optix
options: -i -t

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build
shell: bash
run: |
echo OPTICKS_PREFIX=$OPTICKS_PREFIX
rm -fr $OPTICKS_PREFIX/*
cmake -S . -B $OPTICKS_PREFIX/build -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX -DCMAKE_BUILD_TYPE=Release
cmake --build $OPTICKS_PREFIX/build --parallel --target install

- name: Test
shell: bash
run: |
QCurandState_SPEC=3:0:0 /usr/local/opticks/lib/QCurandStateTest
ctest --test-dir $OPTICKS_PREFIX/build/okconf
ctest --test-dir $OPTICKS_PREFIX/build/sysrap -E STTFTest
ctest --test-dir $OPTICKS_PREFIX/build/ana
ctest --test-dir $OPTICKS_PREFIX/build/analytic
ctest --test-dir $OPTICKS_PREFIX/build/bin
ctest --test-dir $OPTICKS_PREFIX/build/CSG -E "CSGNodeTest|CSGPrimSpecTest|CSGPrimTest|CSGFoundryTest|CSGFoundry_getCenterExtent_Test|CSGFoundry_findSolidIdx_Test|CSGNameTest|CSGTargetTest|CSGTargetGlobalTest|CSGFoundry_MakeCenterExtentGensteps_Test|CSGFoundry_getFrame_Test|CSGFoundry_getFrameE_Test|CSGFoundry_getMeshName_Test|CSGFoundryLoadTest|CSGQueryTest|CSGSimtraceTest|CSGSimtraceRerunTest|CSGSimtraceSampleTest|CSGCopyTest|CSGScanTest"
ctest --test-dir $OPTICKS_PREFIX/build/qudarap -E "QSimTest|QOpticalTest|QSim_Lifecycle_Test|QSimWithEventTest"
ctest --test-dir $OPTICKS_PREFIX/build/CSGOptiX -E CSGOptiXRenderTest
ctest --test-dir $OPTICKS_PREFIX/build/gdxml
ctest --test-dir $OPTICKS_PREFIX/build/u4 -E "U4GDMLReadTest|U4RandomTest|U4TraverseTest"
ctest --test-dir $OPTICKS_PREFIX/build/g4cx -E G4CXRenderTest