DNMTools release (Linux) #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |