Detecting PPC64/ARM64 CPUs (#113) #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI on 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 | |
env: | |
CMAKE_VERSION: 3.12.4 | |
TZ: Europe/Berlin | |
defaults: | |
run: | |
shell: bash -ex {0} | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 120 | |
if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch' | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++23" | |
- name: "Header gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++23" | |
header_test: "ON" | |
- name: "ASAN gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
build_type: Debug | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++23 -fsanitize=address" | |
ctest_exclude: "-E 'faust|moby'" | |
ctest_include: "-R '-im'" | |
- name: "cereal gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++23" | |
has_cereal: "1" | |
- name: "gcc11" | |
cxx: "g++-11" | |
cc: "gcc-11" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++23" | |
- name: "gcc10" | |
cxx: "g++-10" | |
cc: "gcc-10" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++20" | |
- name: "clang14" | |
cxx: "clang++-14" | |
cc: "clang-14" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++2b" | |
- name: "Header clang14" | |
cxx: "clang++-14" | |
cc: "clang-14" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++2b" | |
header_test: "ON" | |
- name: "ASAN clang14" | |
cxx: "clang++-14" | |
cc: "clang-14" | |
build_type: Debug | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++2b -fsanitize=address" | |
ctest_exclude: "-E 'faust|moby'" | |
ctest_include: "-R '-im'" | |
- name: "cereal clang14" | |
cxx: "clang++-14" | |
cc: "clang-14" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++2b" | |
has_cereal: "1" | |
- name: "clang13" | |
cxx: "clang++-13" | |
cc: "clang-13" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++2b" | |
- name: "clang12" | |
cxx: "clang++-12" | |
cc: "clang-12" | |
build_type: Release | |
build_threads: 2 | |
test_threads: 2 | |
cxx_flags: "-std=c++20" | |
steps: | |
- name: Checkout SDSL | |
uses: actions/checkout@v3 | |
with: | |
path: sdsl | |
fetch-depth: 2 | |
submodules: true | |
- name: Checkout SeqAn3 | |
uses: actions/checkout@v3 | |
with: | |
repository: seqan/seqan3 | |
ref: 39e696830bbdcde0e520c87811db3eb5e083d7c0 | |
path: seqan3 | |
fetch-depth: 1 | |
submodules: false | |
- name: Configure APT | |
continue-on-error: true | |
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh | |
- name: Install CMake | |
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh | |
- name: Install ccache | |
run: sudo apt-get install --yes ccache | |
- name: Install compiler ${{ matrix.cxx }} | |
run: sudo apt-get install --yes ${{ matrix.cxx }} | |
- name: Load ccache | |
uses: actions/cache@v3 | |
with: | |
path: .ccache | |
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }} | |
# Restoring: From current branch, otherwise from base branch, otherwise from any branch. | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }} | |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }} | |
${{ runner.os }}-${{ matrix.name }}-ccache- | |
- name: Tool versions | |
run: | | |
env cmake --version | |
env ${{ matrix.cxx }} --version | |
- name: Configure tests | |
env: | |
CXX: ${{ matrix.cxx }} | |
CC: ${{ matrix.cc }} | |
run: | | |
mkdir sdsl-build | |
cd sdsl-build | |
cmake ../sdsl -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-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 }} \ | |
-DSDSL_HEADER_TEST=${{ matrix.header_test }} | |
make -j${{ matrix.build_threads }} gtest_build | |
- name: Build tests | |
env: | |
CCACHE_BASEDIR: ${{ github.workspace }} | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPRESS: true | |
CCACHE_COMPRESSLEVEL: 6 | |
CCACHE_MAXSIZE: 100M | |
CCACHE_IGNOREHEADERS: ${{ github.workspace }}/sdsl/include/sdsl/structure_tree.hpp | |
run: | | |
ccache -p || true | |
cd sdsl-build | |
if [[ "${{ matrix.header_test }}" == "ON" ]]; then | |
make sdsl_header_test -k -j${{ matrix.build_threads }} | |
else | |
make sdsl_test_targets sdsl_examples sdsl_tutorials -k -j${{ matrix.build_threads }} | |
fi | |
ccache -s || true | |
- name: Run tests | |
run: | | |
cd sdsl-build | |
ctest . -j${{ matrix.test_threads }} \ | |
${{ matrix.ctest_exclude }} \ | |
${{ matrix.ctest_include }} \ | |
|| ctest . -j${{ matrix.test_threads }} \ | |
--output-on-failure \ | |
--rerun-failed |