Skip to content

Print number of files to process #364

Print number of files to process

Print number of files to process #364

# calin/.github/workflows/native-build-and-test.yml - Stephen Fegan - 2021-08-19
#
# Continuous integration using Github Actions : build and test calin
#
# Copyright 2021, Stephen Fegan <[email protected]>
# Laboratoire Leprince-Ringuet, CNRS/IN2P3, Ecole Polytechnique, Institut Polytechnique de Paris
#
# This file is part of "calin"
#
# "calin" is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License version 2 or later, as published by
# the Free Software Foundation.
#
# "calin" is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
name: Native build and test
on:
push:
branches:
- main
paths-ignore:
- singularity_build.def
- .github/workflows/singularity-build-and-deploy.yml
- azure-pipelines.yml
- Dockerfile
- README.md
pull_request:
branches:
- main
paths-ignore:
- singularity_build.def
- .github/workflows/singularity-build-and-deploy.yml
- azure-pipelines.yml
- Dockerfile
- README.md
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
geant: [11.2.2]
compiler: [ [gcc-12, g++-12, 'gcc-12 g++-12', broadwell ],
[gcc-11, g++-11, 'gcc-11 g++-11', broadwell ],
[gcc-10, g++-10, 'gcc-10 g++-10', broadwell ],
[gcc-9, g++-9, 'gcc-9 g++-9', broadwell ],
[clang-15, clang++-15, 'clang-15', broadwell ],
[clang-14, clang++-14, 'clang-14', broadwell ],
[clang-13, clang++-13, 'clang-13', broadwell ],
[clang-12, clang++-12, 'clang-12', broadwell ] ]
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler[0] }}
CXX: ${{ matrix.compiler[1] }}
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y gsl-bin libgsl0-dev libfftw3-dev \
libzmq3-dev python3 python3-dev python3-numpy libxerces-c-dev \
libpcap-dev libz-dev libprotobuf-c-dev protobuf-c-compiler \
libprotobuf-dev protobuf-compiler libprotoc-dev libzstd-dev \
${{ matrix.compiler[2] }}
curl -L https://github.com/llr-cta/CTA_ADH_APIS_Build/releases/download/${{matrix.os}}/cta_adh_apis_installed.tgz | sudo tar -zxf - -C /
curl -L https://github.com/llr-cta/Geant4Build/releases/download/${{matrix.os}}-${{matrix.geant}}-OFF/Geant4-${{matrix.os}}-${{matrix.geant}}-OFF.tbz2 | sudo tar -jxf - -C /
- name: Print version information
shell: bash
run: |
swig -version
cmake -version
$CC -v
python -V
python3 -V
- name: Configure build
shell: bash
run: |
mkdir mybuild
cd mybuild
cmake -DCALIN_BUILD_ARCH=${{ matrix.compiler[3] }} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCALIN_PYTHON_SUB_DIR=lib/python3.8 \
-DNO_GEANT4_TEST:BOOLEAN=TRUE \
..
- name: Build
shell: bash
run: |
cd mybuild
make -j3
- name: Test
shell: bash
run: |
cd mybuild
ctest --output-on-failure