|
| 1 | +name: Compiler Checks |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - master |
| 11 | + |
| 12 | +jobs: |
| 13 | + builds-matrix: |
| 14 | + name: "${{matrix.os-version }} ${{ matrix.compiler }} ROOT ${{ matrix.root-version.name }} 17 CMake ${{ matrix.cmake-version }}" |
| 15 | + runs-on: ${{ matrix.os-version }} |
| 16 | + |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + os-version: [ ubuntu-latest ] |
| 21 | + build_type: [ Release ] |
| 22 | + compiler: [ gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15 ] |
| 23 | + cmake-version: [ 3.14, latest ] |
| 24 | + root-version: |
| 25 | + - name: 6.28.04 |
| 26 | + std: 17 |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Print env |
| 30 | + run: | |
| 31 | + echo github.event.action: ${{ github.event.action }} |
| 32 | + echo github.event_name: ${{ github.event_name }} |
| 33 | +
|
| 34 | + - name: Setup gcc compiler |
| 35 | + id: setup_cc |
| 36 | + uses: rlalik/setup-cpp-compiler@v1.1 |
| 37 | + with: |
| 38 | + compiler: ${{ matrix.compiler }} |
| 39 | + |
| 40 | + - name: Install common dependencies |
| 41 | + run: | |
| 42 | + sudo apt update |
| 43 | + sudo apt install wget -y |
| 44 | + sudo apt install python3-numpy libtbb-dev libxxhash0 -y |
| 45 | + cmake --version |
| 46 | + wget http://gccb.if.uj.edu.pl/code/root-cpp17_${{ matrix.root-version.name }}_amd64.deb |
| 47 | + sudo dpkg -i root-cpp17_${{ matrix.root-version.name }}_amd64.deb |
| 48 | +
|
| 49 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 50 | + - name: Checkout repository |
| 51 | + uses: actions/checkout@v1 |
| 52 | + with: |
| 53 | + submodules: recursive |
| 54 | + |
| 55 | + - name: Setup CMake |
| 56 | + uses: jwlawson/actions-setup-cmake@v1.14.0 |
| 57 | + with: |
| 58 | + cmake-version: ${{ matrix.cmake-version }} |
| 59 | + |
| 60 | + - name: Configure |
| 61 | + env: |
| 62 | + CC: ${{ steps.setup_cc.outputs.cc }} |
| 63 | + CXX: ${{ steps.setup_cc.outputs.cxx }} |
| 64 | + shell: bash |
| 65 | + run: | |
| 66 | + . /etc/profile |
| 67 | + root-config --version |
| 68 | + root-config --cflags |
| 69 | + root-config --features |
| 70 | + mkdir build |
| 71 | + cd build |
| 72 | + cmake .. \ |
| 73 | + -DCMAKE_CXX_STANDARD=${{ matrix.root-version.std }} \ |
| 74 | + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ |
| 75 | + -DCMAKE_INSTALL_PREFIX:PATH=instdir |
| 76 | +
|
| 77 | + - name: Build |
| 78 | + shell: bash |
| 79 | + run: | |
| 80 | + cd build |
| 81 | + make |
| 82 | +
|
| 83 | + - name: Test |
| 84 | + shell: bash |
| 85 | + run: | |
| 86 | + cd build |
| 87 | + make test |
0 commit comments