-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added workflow for building and testing * Fixed bug in workflow yaml * Fixed syntax error in workflow yaml * Different setup for runing containers in github actions * Trying to solve syntax error in container volumes definition * Trying to solve syntax error in container volumes definition * Trying to solve syntax error in container volumes definition using github variables * Changed path of cvmfs * Revert to commit e520eba and expose port 80 * Fix sintax error * Fix sintax error * Tests will output on failure * Tests will output on failure * source local repo install dir for integration tests * Add doc workflow and workflows only run on nightlies now * Add format check workflow * Fix syntax error * Fix format check syntax error * Changed clang-format workflow to use cvmfs toolchain * Jobs renamed
- Loading branch information
1 parent
15867a6
commit fb5d1df
Showing
5 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: build-doc | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
STACK: ['/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh'] | ||
OS: ['alma9', | ||
'ubuntu22'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cvmfs-contrib/github-action-cvmfs@v4 | ||
- name: Start container | ||
run: | | ||
docker run -it --name CI_container \ | ||
-v ${GITHUB_WORKSPACE}:/Package \ | ||
-v /cvmfs:/cvmfs:shared \ | ||
-p 80:80 \ | ||
-d ghcr.io/key4hep/key4hep-images/${{ matrix.OS }}:latest \ | ||
/bin/bash | ||
- name: CMake Configure | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
mkdir -p build install; \ | ||
source ${{ matrix.STACK }}; \ | ||
cd build; \ | ||
cmake -DCMAKE_INSTALL_PREFIX=../install ..' | ||
- name: Generate doxygen documentation | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
source ${{ matrix.STACK }}; \ | ||
cd build; \ | ||
cmake --build . --target doc' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: clang-format-check | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
check-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cvmfs-contrib/github-action-cvmfs@v4 | ||
- name: Start container | ||
run: | | ||
docker run -it --name CI_container \ | ||
-v ${GITHUB_WORKSPACE}:/Package \ | ||
-v /cvmfs:/cvmfs:shared \ | ||
-p 80:80 \ | ||
-d ghcr.io/key4hep/key4hep-images/ubuntu22:latest \ | ||
/bin/bash | ||
- name: Run clang-format | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh; \ | ||
clang-format --dry-run --Werror src/* include/ral/*' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: build-and-test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
STACK: ['/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh'] | ||
OS: ['alma9', | ||
'ubuntu22'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cvmfs-contrib/github-action-cvmfs@v4 | ||
- name: Start container | ||
run: | | ||
docker run -it --name CI_container \ | ||
-v ${GITHUB_WORKSPACE}:/Package \ | ||
-v /cvmfs:/cvmfs:shared \ | ||
-p 80:80 \ | ||
-d ghcr.io/key4hep/key4hep-images/${{ matrix.OS }}:latest \ | ||
/bin/bash | ||
- name: CMake Configure | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
mkdir -p build install; \ | ||
source ${{ matrix.STACK }}; \ | ||
cd build; \ | ||
cmake -DCMAKE_INSTALL_PREFIX=../install ..' | ||
- name: Compile and Install | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
source ${{ matrix.STACK }}; \ | ||
cd build; \ | ||
make ral install' | ||
- name: Compile tests | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
source ${{ matrix.STACK }}; \ | ||
cd build; \ | ||
make unittest' | ||
- name: Run unittest | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
source ${{ matrix.STACK }}; \ | ||
cd build; \ | ||
ctest -R unittest --output-on-failure' | ||
- name: Run integration tests | ||
run: | | ||
docker exec CI_container /bin/bash -c 'cd Package; \ | ||
source ${{ matrix.STACK }}; \ | ||
k4_local_repo; \ | ||
cd build; \ | ||
ctest -R integration --output-on-failure' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
add_test(NAME IntegrationReconstructedParticle | ||
add_test(NAME integration_ReconstructedParticle | ||
COMMAND python "${CMAKE_CURRENT_LIST_DIR}/ReconstructedParticle.py") |
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