| 1 |
name: CI CMake |
| 2 |
on: [push, pull_request] |
| 3 |
jobs: |
| 4 |
ci-cmake: |
| 5 |
name: ${{ matrix.name }} |
| 6 |
runs-on: ${{ matrix.os }} |
| 7 |
strategy: |
| 8 |
fail-fast: false |
| 9 |
matrix: |
| 10 |
include: |
| 11 |
- name: Ubuntu GCC |
| 12 |
os: ubuntu-latest |
| 13 |
compiler: gcc |
| 14 |
|
| 15 |
- name: Ubuntu GCC No Plugins |
| 16 |
os: ubuntu-latest |
| 17 |
compiler: gcc |
| 18 |
cmake-args: -D BUILD_PLUGINS=OFF |
| 19 |
|
| 20 |
# Out of source build |
| 21 |
- name: Ubuntu GCC OSB |
| 22 |
os: ubuntu-latest |
| 23 |
compiler: gcc |
| 24 |
build-dir: ../build |
| 25 |
build-src-dir: ../c-blosc2 |
| 26 |
|
| 27 |
- name: Ubuntu GCC External LZ4 |
| 28 |
os: ubuntu-latest |
| 29 |
compiler: gcc |
| 30 |
packages: liblz4-1 liblz4-dev |
| 31 |
cmake-args: -D PREFER_EXTERNAL_LZ4=ON |
| 32 |
|
| 33 |
- name: Ubuntu GCC External ZLIB |
| 34 |
os: ubuntu-latest |
| 35 |
compiler: gcc |
| 36 |
packages: zlib1g-dev |
| 37 |
cmake-args: -D PREFER_EXTERNAL_ZLIB=ON |
| 38 |
|
| 39 |
# Not too recent Zstd libs (< 1.4.4) in distros perform pretty bad on compression |
| 40 |
# ratios when using dictionaries, making some tests not passing. |
| 41 |
# Commenting this out for the time being. |
| 42 |
# - name: Ubuntu GCC External ZSTD |
| 43 |
# os: ubuntu-latest |
| 44 |
# compiler: gcc |
| 45 |
# packages: zstd libzstd-dev |
| 46 |
# cmake-args: -D PREFER_EXTERNAL_ZSTD=ON |
| 47 |
|
| 48 |
# For some reason, some tests do not pass on ARM SF and HF. Not sure what's going on, |
| 49 |
# but having ARM AARCH64 working is good enough for now, so commenting the former out. |
| 50 |
# - name: Ubuntu GCC ARM SF |
| 51 |
# os: ubuntu-latest |
| 52 |
# packages: qemu qemu-user gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libc-dev-armel-cross |
| 53 |
# cmake-args: -D CMAKE_TOOLCHAIN_FILE=cmake/toolchain-armsf.cmake |
| 54 |
|
| 55 |
# - name: Ubuntu GCC ARM HF |
| 56 |
# os: ubuntu-latest |
| 57 |
# packages: qemu qemu-user gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc-dev-armel-cross |
| 58 |
# cmake-args: -D CMAKE_TOOLCHAIN_FILE=cmake/toolchain-armhf.cmake |
| 59 |
|
| 60 |
- name: Ubuntu GCC AARCH64 |
| 61 |
os: ubuntu-latest |
| 62 |
packages: qemu-system-aarch64 qemu-user gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc-dev-arm64-cross |
| 63 |
cmake-args: -D CMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake |
| 64 |
|
| 65 |
- name: Ubuntu Clang |
| 66 |
os: ubuntu-latest |
| 67 |
compiler: clang |
| 68 |
|
| 69 |
- name: Ubuntu Clang No AVX2 |
| 70 |
os: ubuntu-latest |
| 71 |
compiler: clang |
| 72 |
cmake-args: -D DEACTIVATE_AVX2=ON |
| 73 |
|
| 74 |
- name: Ubuntu Clang No AVX512 |
| 75 |
os: ubuntu-latest |
| 76 |
compiler: clang |
| 77 |
cmake-args: -D DEACTIVATE_AVX512=ON |
| 78 |
|
| 79 |
- name: Ubuntu Clang No ZLIB |
| 80 |
os: ubuntu-latest |
| 81 |
compiler: clang |
| 82 |
cmake-args: -D DEACTIVATE_ZLIB=ON |
| 83 |
|
| 84 |
- name: Ubuntu Clang No ZSTD |
| 85 |
os: ubuntu-latest |
| 86 |
compiler: clang |
| 87 |
cmake-args: -D DEACTIVATE_ZSTD=ON |
| 88 |
|
| 89 |
- name: Windows MSVC Win64 |
| 90 |
os: windows-latest |
| 91 |
compiler: cl |
| 92 |
cmake-args: -A x64 |
| 93 |
|
| 94 |
- name: Windows GCC Ninja |
| 95 |
os: windows-latest |
| 96 |
compiler: gcc |
| 97 |
cmake-args: -G Ninja |
| 98 |
|
| 99 |
- name: Windows GCC MinGW |
| 100 |
os: windows-latest |
| 101 |
compiler: gcc |
| 102 |
cmake-args: -G "MinGW Makefiles" |
| 103 |
|
| 104 |
- name: macOS Clang |
| 105 |
os: macOS-latest |
| 106 |
compiler: clang |
| 107 |
|
| 108 |
- name: macOS GCC |
| 109 |
os: macOS-latest |
| 110 |
compiler: gcc |
| 111 |
|
| 112 |
steps: |
| 113 |
- uses: actions/checkout@v4 |
| 114 |
|
| 115 |
- name: Install packages (Ubuntu) |
| 116 |
if: runner.os == 'Linux' && matrix.packages |
| 117 |
run: | |
| 118 |
sudo apt-get update |
| 119 |
sudo apt-get install -y ${{ matrix.packages }} |
| 120 |
|
| 121 |
- name: Install packages (Windows) |
| 122 |
if: runner.os == 'Windows' |
| 123 |
run: choco install ninja ${{ matrix.packages }} |
| 124 |
|
| 125 |
- name: Install packages (macOS) |
| 126 |
if: runner.os == 'macOS' |
| 127 |
run: brew install ninja ${{ matrix.packages }} |
| 128 |
|
| 129 |
- name: Generate project files |
| 130 |
run: cmake -S ${{ matrix.build-src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} -D BUILD_SHARED_LIBS=OFF |
| 131 |
env: |
| 132 |
CC: ${{ matrix.compiler }} |
| 133 |
CFLAGS: ${{ matrix.cflags }} |
| 134 |
LDFLAGS: ${{ matrix.ldflags }} |
| 135 |
CI: true |
| 136 |
|
| 137 |
- name: Compile source code |
| 138 |
run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }} |
| 139 |
|
| 140 |
- name: Run test cases |
| 141 |
run: ctest -C Release --output-on-failure --max-width 120 |
| 142 |
working-directory: ${{ matrix.build-dir || '.' }} |