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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/dnmtools_release_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: dnmtools Release (Linux)

on:
workflow_dispatch:

env:
CONTAINER: andrewdavidsmith/transferase-build

jobs:
linux-releases:
runs-on: ubuntu-latest
steps:
- name: Start docker container
# Pull the container, run it in detached mode, mount the workspace
run: |
docker pull $CONTAINER
docker run --name build-container \
-d -v ${{ github.workspace }}:/workspace $CONTAINER tail -f /dev/null
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure and build
env:
SCRIPT: |
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && apt-get install --no-install-recommends -y automake && \
find /usr -name libz.so -exec rm {} \; && \
git clone --recursive https://github.com/samtools/htslib.git && \
cd htslib && \
autoreconf -i && \
mkdir build && cd build && \
../configure \
--disable-bz2 \
--disable-libcurl \
--disable-lzma \
--disable-ref-cache \
LDADD="-L/usr/local/lib" && \
make CFLAGS="-Wall -O2 -fvisibility=hidden" libhts.a && \
cp libhts.a /usr/local/lib/ && \
cp -r ../htslib /usr/local/include/ && \
cd /workspace && \
autoreconf -i && \
mkdir build && cd build && \
../configure && \
make -j4 LDFLAGS="-static-libgcc -static-libstdc++ -s"
run: |
docker exec build-container bash -c "$SCRIPT"
- name: Get version number
id: get-vn
run: |
awk '/AC_INIT/ {print "vn="$2}' configure.ac | sed -e "s/\[//; s/\]//; s/,//" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Upload the binary
uses: actions/upload-artifact@v4
with:
name: dnmtools-${{ steps.get-vn.outputs.vn }}-Linux
path: build/dnmtools
89 changes: 89 additions & 0 deletions .github/workflows/dnmtools_release_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: dnmtools Release (macOS)

on:
workflow_dispatch:

jobs:
build-macos-binaries:
strategy:
matrix:
os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Make dnmtools dependency directories
run: sudo mkdir -p /opt/dnmtools/lib /opt/dnmtools/include
- name: Install dependency headers and static libs
run: |
brew install zlib gsl automake
sudo cp $(brew --prefix zlib)/lib/*.a /opt/dnmtools/lib
sudo cp $(brew --prefix gsl)/lib/*.a /opt/dnmtools/lib
sudo cp -r $(brew --prefix zlib)/include/* /opt/dnmtools/include
sudo cp -r $(brew --prefix gsl)/include/* /opt/dnmtools/include
- name: Build and install HTSlib
run: |
git clone --recursive https://github.com/samtools/htslib.git
cd htslib
sudo cp -r htslib /opt/dnmtools/include
autoreconf -i
mkdir build && cd build
../configure \
--disable-bz2 \
--disable-libcurl \
--disable-lzma \
--disable-ref-cache \
--without-libdeflate \
LDADD="-L/usr/local/lib"
make CFLAGS="-Wall -O2 -fvisibility=hidden" libhts.a
sudo cp libhts.a /opt/dnmtools/lib
- name: Build dnmtools
run: |
./autogen.sh
mkdir build && cd build
../configure CXX=g++-14 LDFLAGS="-L/opt/dnmtools/lib -static-libgcc -static-libstdc++ -Wl,-dead_strip" CPPFLAGS="-I/opt/dnmtools/include"
make -j4
- name: Rename the binary
run: mv build/dnmtools dnmtools_$(uname -m)
- name: Get version number
id: vars
run: |
awk '/AC_INIT/ {print "vn="$2}' configure.ac | \
sed "s/\[//; s/\]//; s/,//" >> "$GITHUB_OUTPUT"
uname -m | awk '{print "arch="$0}' >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Upload the binary
uses: actions/upload-artifact@v4
with:
name: dnmtools-${{ steps.vars.outputs.arch }}
path: |
dnmtools_${{ steps.vars.outputs.arch }}
make-lipo:
needs: build-macos-binaries
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: binaries
pattern: dnmtools-*
merge-multiple: false
- name: Create universal binary
run: |
lipo -create \
binaries/dnmtools-*/dnmtools_* \
-output dnmtools
chmod +x dnmtools
- name: Get version number
id: vn
run: awk '/AC_INIT/ {print "vn="$2}' configure.ac | sed "s/\[//; s/\]//; s/,//" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Upload the lipo binary
uses: actions/upload-artifact@v4
with:
name: dnmtools-${{ steps.vn.outputs.vn }}-macOS
path: dnmtools
38 changes: 29 additions & 9 deletions .github/workflows/macos-builds.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
name: DNMTools builds on macOS
name: DNMTools build (macOS)

on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

build-on-x86:
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update Homebrew
run: brew update
- name: Install autotools
run: brew install automake
- name: Install dependencies
run: brew install htslib gsl
- name: Generate configure script
run: ./autogen.sh
- name: configure with g++-14
run: ./configure CXX="g++-14" CPPFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib"
- name: make
run: make -j4
build-on-arm64:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update Homebrew
run: brew update
- name: Install autotools
run: brew install autoconf automake libtool
run: brew install automake
- name: Install dependencies
run: brew install htslib gsl
- name: Generate configure script
run: ./autogen.sh
- name: configure with g++-12
run: ./configure CXX="g++-12" CPPFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib"
- name: configure with g++-14
run: ./configure CXX="g++-14" CPPFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib"
- name: make
run: make
run: make -j4
36 changes: 22 additions & 14 deletions .github/workflows/ubuntu-builds.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: DNMTools builds on Ubuntu
name: DNMTools build (Ubuntu)

on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
build-with-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -14,21 +18,25 @@ jobs:
run: sudo apt-get install -y libhts-dev libgsl-dev
- name: Generate configure script
run: ./autogen.sh
- name: Configure for g++
- name: Configure for GCC
run: ./configure CXX="g++"
- name: Build with g++
run: make
run: make -j4
- name: Test the g++ build
run: make check-TESTS
- name: Cleanup after the g++ build
run: make distclean
- name: Install Clang/LLVM dependencies
run: sudo apt-get install -y libomp-dev
- name: Configure for clang++
run: make -j4 check-TESTS
build-with-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get install -y libhts-dev libgsl-dev
- name: Generate configure script
run: ./autogen.sh
- name: Configure for Clang
run: ./configure CXX="clang++"
- name: Build with clang++
run: make
run: make -j4
- name: Test the clang++ build
run: make
- name: Cleanup after the clang++ build
run: make distclean
run: make -j4 check-TESTS
8 changes: 3 additions & 5 deletions .github/workflows/ubuntu-distcheck.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DNMTools distribution check on Ubuntu
name: DNMTools distcheck (Ubuntu)

on:
workflow_dispatch:
Expand All @@ -9,11 +9,9 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update packages
Expand All @@ -25,4 +23,4 @@ jobs:
- name: configure
run: ./configure
- name: make distcheck
run: make distcheck
run: make -j4 distcheck