diff --git a/.github/workflows/c++standards.yml b/.github/workflows/c++standards.yml new file mode 100644 index 0000000..fdc7cb3 --- /dev/null +++ b/.github/workflows/c++standards.yml @@ -0,0 +1,93 @@ +name: C++ Standards Checks + +on: + push: + branches: + - master + + pull_request: + branches: + - master + +jobs: + builds-matrix: + name: "${{matrix.os-version }} ${{ matrix.compiler }} ROOT ${{ matrix.root-version.name }} ${{ matrix.root-version.std }} CMake ${{ matrix.cmake-version }}" + runs-on: ${{ matrix.os-version }} + + strategy: + fail-fast: false + matrix: + os-version: [ ubuntu-latest ] + build_type: [ Release ] + compiler: [ gcc-latest, clang-latest ] + cmake-version: [ latest ] + root-version: + - name: 6.24.08 + std: 11 + - name: 6.26.06 + std: 14 + - name: 6.28.04 + std: 17 + - name: 6.28.04 + std: 20 + + steps: + - name: Print env + run: | + echo github.event.action: ${{ github.event.action }} + echo github.event_name: ${{ github.event_name }} + + - name: Setup gcc compiler + id: setup_cc + uses: rlalik/setup-cpp-compiler@v1.1 + with: + compiler: ${{ matrix.compiler }} + + - name: Install common dependencies + run: | + sudo apt update + sudo apt install wget -y + sudo apt install python3-numpy libtbb-dev libxxhash0 -y + cmake --version + wget http://gccb.if.uj.edu.pl/code/root-cpp${{ matrix.root-version.std }}_${{ matrix.root-version.name }}_amd64.deb + sudo dpkg -i root-cpp${{ matrix.root-version.std }}_${{ matrix.root-version.name }}_amd64.deb + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout repository + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Setup CMake + uses: jwlawson/actions-setup-cmake@v1.14.0 + with: + cmake-version: ${{ matrix.cmake-version }} + + - name: Configure + env: + CC: ${{ steps.setup_cc.outputs.cc }} + CXX: ${{ steps.setup_cc.outputs.cxx }} + shell: bash + run: | + . /etc/profile + root-config --version + root-config --cflags + root-config --features + mkdir build + cd build + cmake .. \ + -DCMAKE_CXX_STANDARD=${{ matrix.root-version.std }} \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + -DCMAKE_INSTALL_PREFIX:PATH=instdir + + - name: Build + shell: bash + run: | + cd build + make + + - name: Test + shell: bash + run: | + cd build + make test diff --git a/.github/workflows/sys_checks.yml b/.github/workflows/sys_checks.yml new file mode 100644 index 0000000..4b9509d --- /dev/null +++ b/.github/workflows/sys_checks.yml @@ -0,0 +1,87 @@ +name: Compiler Checks + +on: + push: + branches: + - master + + pull_request: + branches: + - master + +jobs: + builds-matrix: + name: "${{matrix.os-version }} ${{ matrix.compiler }} ROOT ${{ matrix.root-version.name }} 17 CMake ${{ matrix.cmake-version }}" + runs-on: ${{ matrix.os-version }} + + strategy: + fail-fast: false + matrix: + os-version: [ ubuntu-latest ] + build_type: [ Release ] + compiler: [ gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15 ] + cmake-version: [ 3.14, latest ] + root-version: + - name: 6.28.04 + std: 17 + + steps: + - name: Print env + run: | + echo github.event.action: ${{ github.event.action }} + echo github.event_name: ${{ github.event_name }} + + - name: Setup gcc compiler + id: setup_cc + uses: rlalik/setup-cpp-compiler@v1.1 + with: + compiler: ${{ matrix.compiler }} + + - name: Install common dependencies + run: | + sudo apt update + sudo apt install wget -y + sudo apt install python3-numpy libtbb-dev libxxhash0 -y + cmake --version + wget http://gccb.if.uj.edu.pl/code/root-cpp17_${{ matrix.root-version.name }}_amd64.deb + sudo dpkg -i root-cpp17_${{ matrix.root-version.name }}_amd64.deb + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout repository + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Setup CMake + uses: jwlawson/actions-setup-cmake@v1.14.0 + with: + cmake-version: ${{ matrix.cmake-version }} + + - name: Configure + env: + CC: ${{ steps.setup_cc.outputs.cc }} + CXX: ${{ steps.setup_cc.outputs.cxx }} + shell: bash + run: | + . /etc/profile + root-config --version + root-config --cflags + root-config --features + mkdir build + cd build + cmake .. \ + -DCMAKE_CXX_STANDARD=${{ matrix.root-version.std }} \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + -DCMAKE_INSTALL_PREFIX:PATH=instdir + + - name: Build + shell: bash + run: | + cd build + make + + - name: Test + shell: bash + run: | + cd build + make test