Skip to content

Commit a621a63

Browse files
committed
ubuntu:16.04 Dockerfile -- check loadability
1 parent 929f468 commit a621a63

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
fetch-depth: 0
1717
- name: deps
1818
run: |
19+
sudo apt-get -qq update
1920
sudo apt-get install -y clang-format cppcheck python3-pip
2021
sudo pip3 install --system pre-commit $PIP_DEPS black flake8 pylint
2122
- name: pre-commit
@@ -45,6 +46,7 @@ jobs:
4546
fetch-depth: 0
4647
- name: deps
4748
run: |
49+
sudo apt-get -qq update
4850
sudo apt-get install -y $APT_DEPS
4951
sudo pip3 install --system $PIP_DEPS
5052
- name: rust toolchain
@@ -65,6 +67,7 @@ jobs:
6567
fetch-depth: 0
6668
- name: build loaders
6769
run: |
70+
sudo apt-get -qq update
6871
sudo apt-get install -y $APT_DEPS
6972
sudo pip3 install --system $PIP_DEPS
7073
cmake -DCMAKE_BUILD_TYPE=Release -B build . && cmake --build build -j $(nproc)

Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
# This recipe works on 14.04 too, but there are C++ symbol differences before & after g++ 5.1:
33
# https://gcc.gnu.org/onlinedocs/gcc-5.2.0/libstdc++/manual/manual/using_dual_abi.html
44
FROM ubuntu:16.04
5+
56
ARG CMAKE_VERSION=3.17.3
67
ARG SQLITE_VERSION=3310000
78
ARG ZSTD_VERSION=1.4.5
8-
ENV CFLAGS="-march=haswell -O3"
9+
ARG CPU_ARCH=haswell
10+
11+
ENV CFLAGS="-march=${CPU_ARCH} -O3"
912
ENV CXXFLAGS=${CFLAGS}
1013

1114
# apt
@@ -20,7 +23,8 @@ RUN wget -nv https://www.sqlite.org/2020/sqlite-amalgamation-${SQLITE_VERSION}.z
2023
&& unzip -o sqlite-amalgamation-${SQLITE_VERSION}.zip
2124
WORKDIR /work/sqlite-amalgamation-${SQLITE_VERSION}
2225
RUN gcc -shared -o libsqlite3.so.0 -fPIC -shared -Wl,-soname,libsqlite3.so.0 -g ${CFLAGS} sqlite3.c
23-
RUN cp libsqlite3.so.0 /usr/local/lib && cp *.h /usr/local/include
26+
RUN gcc -o sqlite3 -g ${CFLAGS} sqlite3.c shell.c -lpthread -ldl
27+
RUN cp libsqlite3.so.0 /usr/local/lib && cp *.h /usr/local/include && cp sqlite3 /usr/local/bin
2428
RUN ln -s /usr/local/lib/libsqlite3.so.0 /usr/local/lib/libsqlite3.so
2529

2630
# Zstandard -- hacked with -fPIC for use with ZSTD_WHOLE_ARCHIVE
@@ -35,8 +39,11 @@ RUN wget -nv https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION
3539
RUN yes | sh cmake-${CMAKE_VERSION}-Linux-x86_64.sh
3640
RUN rsync -a cmake-${CMAKE_VERSION}-Linux-x86_64/ /usr/local/
3741

42+
RUN ldconfig
43+
3844
# libgenomicsqlite.so
3945
ADD . /work/GenomicSQLite
4046
WORKDIR /work/GenomicSQLite
4147
RUN rm -rf build && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_WHOLE_ARCHIVE=true -B build . && cmake --build build --target genomicsqlite -j $(nproc)
4248
RUN ldd -v -r build/libgenomicsqlite.so
49+
RUN sqlite3 -cmd '.load build/libgenomicsqlite.so' :memory: 'select genomicsqlite_version()'

0 commit comments

Comments
 (0)