Skip to content

Add bitSplit codec for splitting numeric values by bit ranges #1173

Add bitSplit codec for splitting numeric values by bit ranges

Add bitSplit codec for splitting numeric values by bit ranges #1173

Workflow file for this run

# Copyright (c) Meta Platforms, Inc. and affiliates.
name: dev-ci
on:
push:
branches: [dev]
pull_request:
branches: [dev, master, actionsTest]
workflow_dispatch: {}
env:
# Common environment variables
MAKEFLAGS: "V=1"
jobs:
# =============================================================================
# BUILD JOBS
# =============================================================================
# Basic build job with tests
build-basic:
name: Basic Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and run basic tests
run: |
make all V=1
cd tests && ./test_ensure.sh
# Platform-specific builds
build-platforms:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "Linux AVX2"
os: ubuntu-latest
flags: "-mavx2 -mbmi2 -mlzcnt"
- name: "Linux Werror + NDEBUG"
os: ubuntu-latest
flags: "-Werror -DNDEBUG"
show_compiler: true
- name: "macOS Debug"
os: macos-latest
flags: "-Werror -Wgnu-anonymous-struct"
- name: "macOS Release"
os: macos-latest
flags: "-Werror -Wgnu-anonymous-struct -DNDEBUG"
steps:
- uses: actions/checkout@v4
- name: Show compiler info
if: ${{ matrix.show_compiler }}
run: cc -v
- name: Build
env:
MOREFLAGS: ${{ matrix.flags }}
run: make all V=1
# Compiler-specific builds
build-compilers:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "GCC 14"
os: ubuntu-24.04
cc: gcc-14
cxx: g++-14
flags: "-Werror -Wno-calloc-transposed-args"
- name: "GCC 13"
os: ubuntu-24.04
cc: gcc-13
cxx: g++-13
flags: "-Werror"
- name: "GCC 12"
os: ubuntu-24.04
cc: gcc-12
cxx: g++-12
flags: "-Werror"
- name: "GCC 11"
os: ubuntu-22.04
cc: gcc-11
cxx: g++-11
flags: ""
- name: "GCC 10"
os: ubuntu-22.04
cc: gcc-10
cxx: g++-10
flags: ""
- name: "GCC 9"
os: ubuntu-22.04
cc: gcc-9
cxx: g++-9
flags: "-Werror -Wno-conversion -Wno-sign-conversion"
- name: "Clang 18"
os: ubuntu-24.04
cc: clang-18
cxx: clang++-18
flags: "-Werror -Wgnu-anonymous-struct -DZS_ENABLE_CLANG_PRAGMA"
- name: "Clang 17"
os: ubuntu-24.04
cc: clang-17
cxx: clang++-17
flags: "-Werror -Wgnu-anonymous-struct -DZS_ENABLE_CLANG_PRAGMA"
- name: "Clang 16"
os: ubuntu-24.04
cc: clang-16
cxx: clang++-16
flags: "-Werror -Wgnu-anonymous-struct -DZS_ENABLE_CLANG_PRAGMA"
- name: "Clang 15"
os: ubuntu-22.04
cc: clang-15
cxx: clang++-15
flags: "-Werror -Wgnu-anonymous-struct -DZS_ENABLE_CLANG_PRAGMA"
- name: "Clang 14"
os: ubuntu-22.04
cc: clang-14
cxx: clang++-14
flags: "-Werror -Wgnu-anonymous-struct -DZS_ENABLE_CLANG_PRAGMA"
- name: "Clang 13"
os: ubuntu-22.04
cc: clang-13
cxx: clang++-13
flags: "-Werror -Wgnu-anonymous-struct -DZS_ENABLE_CLANG_PRAGMA -Wno-implicit-fallthrough"
steps:
- uses: actions/checkout@v4
- name: Install GCC-9
if: ${{ matrix.cc == 'gcc-9' }}
run: |
sudo apt install gcc-9 g++-9
- name: Build
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
MOREFLAGS: ${{ matrix.flags }}
run: make all V=1
# C++ standard compliance builds
build-standards:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "GCC 10 GNU11"
os: ubuntu-22.04
cc: gcc-10
cxx: g++-10
cflags: "-std=gnu11"
cxxflags: "-std=gnu++1z"
flags: "-Werror"
- name: "Clang GNU11"
os: ubuntu-latest
cc: clang
cxx: clang++
cflags: "-std=gnu11"
cxxflags: "-std=gnu++1z"
flags: "-Werror"
steps:
- uses: actions/checkout@v4
- name: Build
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CFLAGS: ${{ matrix.cflags }}
CXXFLAGS: ${{ matrix.cxxflags }}
MOREFLAGS: ${{ matrix.flags }}
run: make all V=1
# =============================================================================
# TESTING JOBS
# =============================================================================
# Basic testing
test-basic:
name: Basic Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: make test
# CLI integration testing
test-cli:
name: CLI Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run CLI integration tests
run: make cli_test
# Sanitizer testing
test-sanitizers:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: "AddressSanitizer"
flags: "-fsanitize=address -g"
- name: "UBSan (GCC)"
flags: "-fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=all"
show_compiler: true
- name: "UBSan (Clang)"
flags: "-fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=all"
cc: clang
show_compiler: true
steps:
- uses: actions/checkout@v4
- name: Show compiler info
if: ${{ matrix.show_compiler }}
run: |
if [ "${{ matrix.cc }}" = "clang" ]; then
clang -v
else
cc -v
fi
- name: Run tests
env:
MOREFLAGS: ${{ matrix.flags }}
CC: ${{ matrix.cc || 'cc' }}
run: make test
# # Code quality checks
test-quality:
name: Code Quality (clang-format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check
uses: jidicula/clang-format-action@6cd220de46c89139a0365edae93eee8eb30ca8fe # v4.16.0
with:
clang-format-version: '21'
check-path: '.'
# Python formatting check
test-python-format:
name: Code Quality (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install ruff
run: pip install ruff
- name: Check Python formatting with ruff
run: make check-python-format
# Static analysis
test-static-analysis:
name: Static Analysis (scan-build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install scan-build
run: |
sudo apt-get update
sudo apt-get install -y clang-tools
- name: Run scan-build
continue-on-error: true
run: CFLAGS="-Og -g" scan-build --status-bugs -v make -j unitBench V=1
# =============================================================================
# FUTURE WORK / DISABLED JOBS
# =============================================================================
# TODO: Memory sanitizer (msan)
# TODO: Thread sanitizer (tsan)