|
| 1 | +name: dnmtools Release (Linux) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +env: |
| 7 | + CONTAINER: andrewdavidsmith/transferase-build |
| 8 | + |
| 9 | +jobs: |
| 10 | + linux-releases: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - name: Start docker container |
| 14 | + # Pull the container, run it in detached mode, mount the workspace |
| 15 | + run: | |
| 16 | + docker pull $CONTAINER |
| 17 | + docker run --name build-container \ |
| 18 | + -d -v ${{ github.workspace }}:/workspace $CONTAINER tail -f /dev/null |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + submodules: recursive |
| 22 | + - name: Configure and build |
| 23 | + env: |
| 24 | + SCRIPT: | |
| 25 | + export DEBIAN_FRONTEND=noninteractive && \ |
| 26 | + apt-get update && apt-get install --no-install-recommends -y automake && \ |
| 27 | + find /usr -name libz.so -exec rm {} \; && \ |
| 28 | + git clone --recursive https://github.com/samtools/htslib.git && \ |
| 29 | + cd htslib && \ |
| 30 | + autoreconf -i && \ |
| 31 | + mkdir build && cd build && \ |
| 32 | + ../configure \ |
| 33 | + --disable-bz2 \ |
| 34 | + --disable-libcurl \ |
| 35 | + --disable-lzma \ |
| 36 | + --disable-ref-cache \ |
| 37 | + LDADD="-L/usr/local/lib" && \ |
| 38 | + make CFLAGS="-Wall -O2 -fvisibility=hidden" libhts.a && \ |
| 39 | + cp libhts.a /usr/local/lib/ && \ |
| 40 | + cp -r ../htslib /usr/local/include/ && \ |
| 41 | + cd /workspace && \ |
| 42 | + autoreconf -i && \ |
| 43 | + mkdir build && cd build && \ |
| 44 | + ../configure && \ |
| 45 | + make -j4 LDFLAGS="-static-libgcc -static-libstdc++ -s" |
| 46 | + run: | |
| 47 | + docker exec build-container bash -c "$SCRIPT" |
| 48 | + - name: Get version number |
| 49 | + id: get-vn |
| 50 | + run: | |
| 51 | + awk '/AC_INIT/ {print "vn="$2}' configure.ac | sed -e "s/\[//; s/\]//; s/,//" >> "$GITHUB_OUTPUT" |
| 52 | + env: |
| 53 | + GH_TOKEN: ${{ github.token }} |
| 54 | + - name: Upload the binary |
| 55 | + uses: actions/upload-artifact@v4 |
| 56 | + with: |
| 57 | + name: dnmtools-${{ steps.get-vn.outputs.vn }}-Linux |
| 58 | + path: build/dnmtools |
0 commit comments