Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
112 changes: 112 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: CD

on:
push:
tags:
- "v*"

jobs:
build-conda-package:
name: Conda package (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.8.3

- name: Build conda package
run: |
mkdir -p dist
pixi build
# Copy built package to dist/ for upload
find .pixi/build -name '*.conda' -o -name '*.tar.bz2' | xargs -I{} cp {} dist/ 2>/dev/null || true

- name: Upload conda package artifact
uses: actions/upload-artifact@v4
with:
name: conda-package-${{ matrix.os }}
path: dist/
if-no-files-found: warn
retention-days: 30

build-release-binaries:
name: Release binaries (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: bgen-linux-x86_64
- os: macos-latest
artifact: bgen-macos-arm64

steps:
- uses: actions/checkout@v4

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libboost-all-dev \
libsqlite3-dev \
zlib1g-dev \
libzstd-dev \
ninja-build

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install boost sqlite zstd ninja

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

- name: Build
run: cmake --build build --parallel

- name: Package binaries
run: |
cmake --install build --prefix staging
tar -czf ${{ matrix.artifact }}.tar.gz -C staging .

- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}.tar.gz

create-release:
name: Create GitHub Release
needs: [build-conda-package, build-release-binaries]
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
artifacts/bgen-linux-x86_64/*.tar.gz
artifacts/bgen-macos-x86_64/*.tar.gz
artifacts/bgen-macos-arm64/*.tar.gz
artifacts/conda-package-*/*.conda
artifacts/conda-package-*/*.tar.bz2
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

jobs:
build-cmake:
name: CMake (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libboost-all-dev \
libsqlite3-dev \
zlib1g-dev \
libzstd-dev \
ninja-build

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install boost sqlite zstd ninja

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

- name: Build
run: cmake --build build --parallel

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

- name: Install
run: cmake --install build --prefix build/install

- name: Verify CMake package config files installed
run: |
test -f build/install/lib/cmake/bgen/bgenConfig.cmake
test -f build/install/lib/cmake/bgen/bgenConfigVersion.cmake
test -f build/install/lib/cmake/bgen/bgenTargets.cmake
echo "CMake package config files present"

build-pixi:
name: Pixi package (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.8.3

- name: Run tests via pixi tasks
run: pixi run test

- name: Build conda package
run: pixi build

- name: Test R package
working-directory: R/package
run: pixi run test
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Build directories
build/
dist/
.waf-1.8.13*
.waf-2.0.6*

# CMake
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
CTestTestfile.cmake
build.ninja
Testing/

# Compiled binaries and libraries
*.o
*.a
*.so
*.so.*
*.dylib
*.dll
*.exe
*.out

# Python
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
dist/
build/
.Python
*.conda

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
.clang_complete

# Pixi/Conda
.pixi/
pixi-lock.yaml

# Local environment files
.env
.env.local
*.lock

# Temporary files
*.tmp
*.bak
*.orig
3 changes: 0 additions & 3 deletions .hgignore

This file was deleted.

8 changes: 0 additions & 8 deletions 3rd_party/boost_1_55_0/INSTALL

This file was deleted.

Loading