diff --git a/.github/workflows/ci_asan.yml b/.github/workflows/ci_asan.yml index e47ae697..a03b56a8 100644 --- a/.github/workflows/ci_asan.yml +++ b/.github/workflows/ci_asan.yml @@ -3,15 +3,13 @@ name: ASAN on: push: branches: - # Push events to branches matching refs/heads/master - 'master' pull_request: - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: group: asan-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name != 'push' }} env: TZ: Europe/Berlin @@ -22,58 +20,51 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} ${{ matrix.cereal == '1' && 'cereal' || '' }} if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: - include: - - name: "gcc13" - compiler: "gcc-13" - cxx_flags: "-std=c++23" - - - name: "clang17" - compiler: "clang-17" - cxx_flags: "-std=c++23 -stdlib=libc++" - + compiler: ["clang-18", "gcc-14"] + cereal: ["0", "1"] + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 1 submodules: true - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 125M + - name: Get number of processors + run: echo "NUM_THREADS=$(getconf _NPROCESSORS_ONLN)" >> "$GITHUB_ENV" - - name: Install CMake - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.13.5 + path: /home/runner/.ccache + save-always: true + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} - name: Configure tests run: | - mkdir ci-build - cd ci-build + mkdir bbuild && cd bbuild cmake .. -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -fsanitize=address ${{ matrix.cxx_flags }}" - make -j2 gtest_build + -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23 -fsanitize=address" \ + -DSDSL_CEREAL=${{ matrix.cereal }} + make -j${NUM_THREADS} gtest_build - name: Build tests + working-directory: bbuild run: | - ccache -p - cd ci-build - make sdsl_test_targets sdsl_examples sdsl_tutorials -k -j2 - ccache -s + ccache -z + make -k -j${NUM_THREADS} sdsl_test_targets sdsl_examples sdsl_tutorials + ccache -sv - name: Run tests - run: | - cd ci-build - ctest . -j2 -E 'faust|moby' -R '-im' + working-directory: bbuild + run: ctest . -j${NUM_THREADS} --output-on-failure -E 'faust|moby' -R '-im' diff --git a/.github/workflows/ci_header.yml b/.github/workflows/ci_header.yml index f6e37786..feeb834e 100644 --- a/.github/workflows/ci_header.yml +++ b/.github/workflows/ci_header.yml @@ -3,15 +3,13 @@ name: Header on: push: branches: - # Push events to branches matching refs/heads/master - 'master' pull_request: - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: group: header-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name != 'push' }} env: TZ: Europe/Berlin @@ -22,72 +20,53 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} ${{ matrix.type }} if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: - include: - - name: "gcc13" - compiler: "gcc-13" - build_type: Release - cxx_flags: "-std=c++23" - - - name: "gcc11" - compiler: "gcc-13" - build_type: Debug - cxx_flags: "-std=c++23" - - - name: "clang17" - compiler: "clang-17" - build_type: Release - cxx_flags: "-std=c++23 -stdlib=libc++" - - - name: "clang16" - compiler: "clang-16" - build_type: Debug - cxx_flags: "-std=c++20 -stdlib=libc++" - + compiler: ["clang-18", "gcc-14", "gcc-11"] + type: ["Release", "Debug"] + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 1 submodules: true - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 75M + - name: Get number of processors + run: echo "NUM_THREADS=$(getconf _NPROCESSORS_ONLN)" >> "$GITHUB_ENV" - - name: Install CMake - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.13.5 + path: /home/runner/.ccache + save-always: true + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} - name: Configure tests run: | - mkdir ci-build - cd ci-build - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + mkdir bbuild && cd bbuild + cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.type }} \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" \ + -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23" \ -DSDSL_CEREAL=1 \ -DSDSL_HEADER_TEST=ON - make -j2 gtest_build + make -j${NUM_THREADS} gtest_build - name: Build tests + working-directory: bbuild run: | - ccache -p - cd ci-build - make sdsl_header_test -k -j2 - ccache -s + ccache -z + make -k -j${NUM_THREADS} sdsl_header_test + ccache -sv - name: Run tests - run: | - cd ci-build - ctest . -j2 + working-directory: bbuild + run: ctest . -j${NUM_THREADS} --output-on-failure + diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 321bc8c7..c7b1900d 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -3,15 +3,13 @@ name: Linux on: push: branches: - # Push events to branches matching refs/heads/master - 'master' pull_request: - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: group: linux-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name != 'push' }} env: TZ: Europe/Berlin @@ -22,93 +20,51 @@ defaults: jobs: build: - name: ${{ matrix.name }} - runs-on: ubuntu-22.04 - timeout-minutes: 120 + runs-on: ubuntu-latest + name: ${{ matrix.compiler }} ${{ matrix.cereal == '1' && 'cereal' || '' }} if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: - include: - - name: "gcc13" - compiler: "gcc-13" - build_type: Release - cxx_flags: "-std=c++23" - - - name: "cereal gcc13" - compiler: "gcc-13" - build_type: Release - cxx_flags: "-std=c++23" - has_cereal: "1" - - - name: "gcc12" - compiler: "gcc-12" - build_type: Release - cxx_flags: "-std=c++23" - - - name: "gcc11" - compiler: "gcc-11" - build_type: Release - cxx_flags: "-std=c++23" - - - name: "clang17" - compiler: "clang-17" - build_type: Release - cxx_flags: "-std=c++23 -stdlib=libc++" - - - name: "cereal clang17" - compiler: "clang-17" - build_type: Release - cxx_flags: "-std=c++23 -stdlib=libc++" - has_cereal: "1" - - - name: "clang16" - compiler: "clang-16" - build_type: Release - cxx_flags: "-std=c++20 -stdlib=libc++" - - - name: "clang15" - compiler: "clang-15" - build_type: Release - cxx_flags: "-std=c++20 -stdlib=libc++" - + compiler: ["clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "gcc-11", "intel"] + cereal: ["0", "1"] + container: + image: ghcr.io/seqan/${{ matrix.compiler }} + volumes: + - /home/runner:/home/runner steps: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 1 submodules: true - - name: Setup toolchain - uses: seqan/actions/setup-toolchain@main - with: - compiler: ${{ matrix.compiler }} - ccache_size: 75M + - name: Get number of processors + run: echo "NUM_THREADS=$(getconf _NPROCESSORS_ONLN)" >> "$GITHUB_ENV" - - name: Install CMake - uses: seqan/actions/setup-cmake@main + - name: Load ccache + uses: actions/cache@v4 with: - cmake: 3.13.5 + path: /home/runner/.ccache + save-always: true + key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }} - name: Configure tests run: | - mkdir ci-build - cd ci-build - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + mkdir bbuild && cd bbuild + cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" \ - -DSDSL_CEREAL=${{ matrix.has_cereal }} - make -j2 gtest_build + -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23" \ + -DSDSL_CEREAL=${{ matrix.cereal }} + make -j${NUM_THREADS} gtest_build - name: Build tests + working-directory: bbuild run: | - ccache -p - cd ci-build - make sdsl_test_targets sdsl_examples sdsl_tutorials -k -j2 - ccache -s + ccache -z + make -k -j${NUM_THREADS} sdsl_test_targets sdsl_examples sdsl_tutorials + ccache -sv - name: Run tests - run: | - cd ci-build - ctest . -j2 + working-directory: bbuild + run: ctest . -j${NUM_THREADS} --output-on-failure diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index ff6f52d7..269fe2ed 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -3,15 +3,13 @@ name: macOS on: push: branches: - # Push events to branches matching refs/heads/master - 'master' pull_request: - # Enables a manual trigger, may run on any branch workflow_dispatch: concurrency: group: macos-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name != 'push' }} env: TZ: Europe/Berlin @@ -22,72 +20,46 @@ defaults: jobs: build: - name: ${{ matrix.name }} runs-on: macos-12 - timeout-minutes: 120 + name: ${{ matrix.compiler }} ${{ matrix.cereal == '1' && 'cereal' || '' }} if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: - include: - - name: "clang17" - compiler: "clang-17" - build_type: Release - cxx_flags: "-std=c++23" - - - name: "cereal clang17" - compiler: "clang-17" - build_type: Release - cxx_flags: "-std=c++23" - has_cereal: "1" - - - name: "clang16" - compiler: "clang-16" - build_type: Release - cxx_flags: "-std=c++20" - - - name: "clang15" - compiler: "clang-15" - build_type: Release - cxx_flags: "-std=c++20" - + compiler: ["clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "gcc-11"] + cereal: ["0", "1"] steps: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 1 submodules: true + - name: Get number of processors + run: echo "NUM_THREADS=$(getconf _NPROCESSORS_ONLN)" >> "$GITHUB_ENV" + - name: Setup toolchain uses: seqan/actions/setup-toolchain@main with: compiler: ${{ matrix.compiler }} ccache_size: 75M - - name: Install CMake - uses: seqan/actions/setup-cmake@main - with: - cmake: 3.13.5 - - name: Configure tests run: | - mkdir ci-build - cd ci-build - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + mkdir bbuild && cd bbuild + cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror ${{ matrix.cxx_flags }}" \ - -DSDSL_CEREAL=${{ matrix.has_cereal }} - make -j3 gtest_build + -DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23" \ + -DSDSL_CEREAL=${{ matrix.cereal }} + make -j${NUM_THREADS} gtest_build - name: Build tests + working-directory: bbuild run: | - ccache -p - cd ci-build - make sdsl_test_targets sdsl_examples sdsl_tutorials -k -j3 - ccache -s + ccache -z + make -k -j${NUM_THREADS} sdsl_test_targets sdsl_examples sdsl_tutorials + ccache -sv - name: Run tests - run: | - cd ci-build - ctest . -j3 + working-directory: bbuild + run: ctest . -j${NUM_THREADS} --output-on-failure