Skip to content
Open
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
183 changes: 183 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: Build

on:
push:
branches:
- master
pull_request:

jobs:
# ─────────────────────────────────────────────────────────────────────────────
# macOS · Apple Silicon (arm64)
# Runner: macos-15 (M-series, arm64)
# cmake 4.x is pre-installed; libomp from Homebrew patches Apple Clang OpenMP
# ─────────────────────────────────────────────────────────────────────────────
build-macos-arm64:
name: macOS · Apple Silicon (arm64)
runs-on: macos-15
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: brew install ccache gsl libomp boost

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-macos-arm64-${{ github.sha }}
restore-keys: ccache-macos-arm64-

- name: Configure
run: |
mkdir build && cd build
cmake ../src \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_PREFIX_PATH="$(brew --prefix boost)" \
-DGSL_ROOT_DIR="$(brew --prefix gsl)"

- name: Build
run: make -C build -j$(sysctl -n hw.logicalcpu)

- name: Verify
run: |
./build/pureclip --version
./build/winextract --version
file build/pureclip | grep -q arm64 && echo "✓ native arm64 binary"

- name: ccache stats
run: ccache --show-stats

# ─────────────────────────────────────────────────────────────────────────────
# macOS · strict warnings (-Werror)
# Non-blocking: flags new warnings introduced by a PR without failing the
# merge gate. Only runs on macOS (AppleClang has the clearest diagnostics).
# ─────────────────────────────────────────────────────────────────────────────
warnings-macos-arm64:
name: macOS · warnings as errors (non-blocking)
runs-on: macos-15
continue-on-error: true
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: brew install ccache gsl libomp boost

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-macos-arm64-werror-${{ github.sha }}
restore-keys: ccache-macos-arm64-werror-

- name: Configure (warnings as errors)
run: |
mkdir build && cd build
cmake ../src \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_PREFIX_PATH="$(brew --prefix boost)" \
-DGSL_ROOT_DIR="$(brew --prefix gsl)" \
-DWERROR=ON

- name: Build
run: make -C build -j$(sysctl -n hw.logicalcpu)

# ─────────────────────────────────────────────────────────────────────────────
# Linux · x86_64
# Runner: ubuntu-24.04 (standard x86_64 runner, available on all plans)
# Primary deployment target for HPC/server environments and the existing
# Bioconda package. GCC supports OpenMP natively.
# ─────────────────────────────────────────────────────────────────────────────
build-linux-x86:
name: Linux · x86_64
runs-on: ubuntu-24.04
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y ccache cmake g++ libgsl-dev libboost-dev zlib1g-dev libbz2-dev

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-linux-x86-${{ github.sha }}
restore-keys: ccache-linux-x86-

- name: Configure
run: |
mkdir build && cd build
cmake ../src \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build
run: make -C build -j$(nproc)

- name: Verify
run: |
./build/pureclip --version
./build/winextract --version
file build/pureclip | grep -q x86-64 && echo "✓ native x86_64 binary"

- name: ccache stats
run: ccache --show-stats

# ─────────────────────────────────────────────────────────────────────────────
# Linux · arm64
# Runner: ubuntu-24.04-arm (available on GitHub Pro and above)
# GCC supports OpenMP natively — no libomp workaround needed
# cmake 3.31 pre-installed — no cmake 4.x compat issues
# ─────────────────────────────────────────────────────────────────────────────
build-linux-arm64:
name: Linux · arm64
runs-on: ubuntu-24.04-arm
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y ccache cmake g++ libgsl-dev libboost-dev zlib1g-dev libbz2-dev

- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-linux-arm64-${{ github.sha }}
restore-keys: ccache-linux-arm64-

- name: Configure
run: |
mkdir build && cd build
cmake ../src \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build
run: make -C build -j$(nproc)

- name: Verify
run: |
./build/pureclip --version
./build/winextract --version
file build/pureclip | grep -q aarch64 && echo "✓ native aarch64 binary"

- name: ccache stats
run: ccache --show-stats
67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

Loading