Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel committed Aug 25, 2023
1 parent ec3ef0f commit c3ef800
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 44 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ on: [push, pull_request]
jobs:
clang-format:
runs-on: ubuntu-latest
container: debian:stable-slim
steps:

- name: Install clang-format
- uses: actions/checkout@v3
- uses: cvmfs-contrib/[email protected]
- name: Start container
run: |
apt-get update
apt-get install -y curl git
curl -SL https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/master-208096c1/clang-format-14_linux-amd64 > /usr/local/bin/clang-format
chmod +x /usr/local/bin/clang-format
- uses: actions/checkout@v2
docker run \
-it --name k4Acts_CI \
-v ${{ github.workspace }}:/k4Acts \
-v /cvmfs:/cvmfs:shared \
-d ghcr.io/aidasoft/centos7:latest /bin/bash
- name: Run format
run: ci/format.sh .
- name: Check Format
run: |
docker exec k4Acts_CI /bin/bash -c 'source /cvmfs/sft.cern.ch/lcg/releases/clang/10.0.0-62e61/x86_64-centos7/setup.sh;\
clang-format -Werror --verbose --dry-run --style=file $(find ./k4Acts/ -name "*.cpp" -o -name "*.h" );\
exit $?;\
'
2 changes: 1 addition & 1 deletion .github/workflows/downstream-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3.1
- uses: key4hep/key4hep-actions/downstream-build@main
54 changes: 22 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: linux

on:
push:
pull_request:
on: [push, pull_request]

jobs:
test:
Expand All @@ -12,35 +10,27 @@ jobs:
matrix:
SETUP: ['/cvmfs/sw.hsf.org/key4hep/setup.sh', '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3.1
- name: Start container
run: |
docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
# - name: CMake Configure
# run: |
# docker exec CI_container /bin/bash -c 'cd Package;\
# mkdir -p build install;\
# git submodule init;\
# git submodule update;\
# source ${{ matrix.SETUP }};\
# cd build;\
# cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " -G Ninja ..;'
# - name: Compile
# run: |
# docker exec CI_container /bin/bash -c 'cd ./Package;\
# source ${{ matrix.SETUP }};\
# cd build;\
# ninja -k0;'
# - name: Install
# run: |
# docker exec CI_container /bin/bash -c 'cd ./Package;\
# source ${{ matrix.SETUP }};\
# cd build;\
# ninja -k0 install;'
# - name: Test
docker run \
-it --name k4Acts_CI \
-v ${{ github.workspace }}:/k4Acts \
-v /cvmfs:/cvmfs:shared \
-d ghcr.io/aidasoft/centos7:latest /bin/bash
- name: Compile
run: |
docker exec k4Acts_CI /bin/bash -c 'source ${{ matrix.SETUP }};
cd k4Acts;
mkdir build install; cd build;
cmake -G Ninja -D CMAKE_INSTALL_PREFIX=$PWD/../install -D CMAKE_BUILD_TYPE=RelWithDebInfo ..;
ninja install;
'
# - name: Run tests (CTest)
# run: |
# docker exec CI_container /bin/bash -c 'cd ./Package;\
# source ${{ matrix.SETUP }};\
# cd build;\
# ninja -k0 && ctest --output-on-failure;'
# docker exec k4Acts_CI /bin/bash -c 'source ${{ matrix.SETUP }};
# cd k4Acts/build;
# ctest --output-on-failure;
# '

0 comments on commit c3ef800

Please sign in to comment.