-
Notifications
You must be signed in to change notification settings - Fork 11
73 lines (70 loc) · 2.84 KB
/
dnmtools_release_linux.yml
File metadata and controls
73 lines (70 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: DNMTools release (Linux)
on:
workflow_dispatch:
env:
CONTAINER: andrewdavidsmith/builder
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: Get version number
id: get-vn
run: |
awk '/AC_INIT/ {print "vn="$2}' configure.ac | sed "s/\[//; s/\]//; s/,//" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Configure and build
env:
SCRIPT: |
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && apt-get install --no-install-recommends -y libgsl-dev && \
find /usr -name libz.so -exec rm {} \; && \
find /usr -name libgsl\*.so -exec rm {} \; && \
git clone https://github.com/ebiggers/libdeflate.git && \
cd libdeflate && \
cmake -B build \
-DLIBDEFLATE_BUILD_GZIP=off \
-DLIBDEFLATE_BUILD_TESTS=off \
-DLIBDEFLATE_BUILD_SHARED_LIB=off \
-DCMAKE_VERBOSE_MAKEFILE=on \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build -j4 && \
cmake --install build --prefix=/usr/local && \
cd .. && \
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 \
--with-libdeflate && \
make -j4 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 --with-libdeflate --with-htsmods && \
../data/make_full_license_info_header.sh ../data/LICENSE > license.h && \
echo "#define INCLUDE_FULL_LICENSE_INFO 1" >> config.h && \
make -j4 LDFLAGS="-static-libgcc -static-libstdc++ -s" && \
tar -cf dnmtools-${{ steps.get-vn.outputs.vn }}-Linux.tar.gz dnmtools
run: |
docker exec build-container bash -c "$SCRIPT"
- name: Upload the binary
uses: actions/upload-artifact@v4
with:
name: dnmtools-${{ steps.get-vn.outputs.vn }}-Linux.tar.gz
path: build/dnmtools-${{ steps.get-vn.outputs.vn }}-Linux.tar.gz