Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Documentation
name: docs

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: write
contents: read
pages: write
id-token: write

Expand All @@ -18,38 +17,33 @@ concurrency:

jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.11"
cache: pip
cache-dependency-path: docs/requirements.txt

- name: Install MkDocs and dependencies
run: pip install mkdocs-material pymdown-extensions
- name: Install MkDocs Material
run: pip install -r docs/requirements.txt

- name: Build documentation
- name: Build site
run: mkdocs build --strict

- name: Upload artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
- uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
- id: deployment
uses: actions/deploy-pages@v4
37 changes: 37 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: python

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
bindings:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y libeigen3-dev cmake ninja-build

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Python deps
run: pip install nanobind pytest

- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DTAX_BUILD_PYTHON=ON

- name: Build
run: cmake --build build -j

- name: Test (C++ + Python)
run: ctest --test-dir build --output-on-failure
140 changes: 14 additions & 126 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
@@ -1,142 +1,30 @@
name: Sanitizers
name: sanitizers

on:
workflow_dispatch:
pull_request:

jobs:
build-and-test:
name: precheck / ${{ matrix.os }} / ${{ matrix.compiler }} / eigen-${{ matrix.eigen_version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [gcc, clang]
eigen_version: ["3.4.0", "5.0.0"]
include:
- os: ubuntu-latest
compiler: gcc
cc: gcc
cxx: g++
- os: ubuntu-latest
compiler: clang
cc: clang
cxx: clang++
- os: macos-latest
compiler: clang
cc: clang
cxx: clang++
- os: macos-latest
compiler: gcc
cc: gcc
cxx: g++

env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

asan-ubsan:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "4.2.x"
- uses: actions/checkout@v4

- name: Install Linux compilers
if: runner.os == 'Linux'
- name: Install dependencies
run: |
sudo apt-get update
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++
else
sudo apt-get install -y clang
fi

- name: Install Homebrew GCC
if: runner.os == 'macOS' && matrix.compiler == 'gcc'
run: brew install gcc

- name: Select Homebrew GCC binaries
if: runner.os == 'macOS' && matrix.compiler == 'gcc'
run: |
GCC_BIN=$(ls -1 /opt/homebrew/bin/gcc-* /usr/local/bin/gcc-* 2>/dev/null | grep -E 'gcc-[0-9]+$' | sort -V | tail -n1)
GXX_BIN="${GCC_BIN/gcc-/g++-}"
echo "CC=$GCC_BIN" >> "$GITHUB_ENV"
echo "CXX=$GXX_BIN" >> "$GITHUB_ENV"
sudo apt-get install -y libeigen3-dev cmake ninja-build clang-18

- name: Toolchain info
- name: Configure with ASan + UBSan
run: |
cmake --version
"$CC" --version
"$CXX" --version

- name: Install Eigen ${{ matrix.eigen_version }}
run: bash tools/install_eigen.sh ${{ matrix.eigen_version }}

- name: Configure
run: >
cmake -S . -B build
-DCMAKE_BUILD_TYPE=Release
-DTAX_BUILD_BENCH=OFF
-DTAX_ENABLE_EIGEN=ON
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g -O1" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"

- name: Build
run: cmake --build build -j 2
run: cmake --build build -j

- name: Test
run: ctest --test-dir build --output-on-failure

sanitizers:
name: sanitizer / ${{ matrix.sanitizer }}
needs: build-and-test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- sanitizer: asan
flags: -fsanitize=address -fno-omit-frame-pointer -O1 -g
- sanitizer: ubsan
flags: -fsanitize=undefined -fno-omit-frame-pointer -O1 -g
- sanitizer: tsan
flags: -fsanitize=thread -fno-omit-frame-pointer -O1 -g

env:
CC: clang
CXX: clang++

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "4.2.x"

- name: Install clang
run: |
sudo apt-get update
sudo apt-get install -y clang

- name: Toolchain info
run: |
cmake --version
"$CC" --version
"$CXX" --version

- name: Configure
run: >
cmake -S . -B build-${{ matrix.sanitizer }}
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DTAX_BUILD_BENCH=OFF
-DCMAKE_CXX_FLAGS="${{ matrix.flags }}"
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.flags }}"

- name: Build
run: cmake --build build-${{ matrix.sanitizer }} -j 2

- name: Test
run: ctest --test-dir build-${{ matrix.sanitizer }} --output-on-failure
Loading
Loading