From 667a23cd1b37d1872e014d63ca5f1785c0488cf6 Mon Sep 17 00:00:00 2001 From: tcezard Date: Wed, 9 Jul 2025 07:28:49 +0100 Subject: [PATCH 1/6] replace ubuntu with debian --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f56bdab9..3a660050 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: ### Linux build linux_build: - runs-on: ubuntu-24.04 + runs-on: debian:bullseye-slim strategy: matrix: config: @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install cmake build-essential wget pkg-config + sudo apt-get install -y --no-install-recommends build-essential cmake wget pkg-config ./install_dependencies.sh - name: Compile and test run: | From a2b755621def8dcb85be076c89047cd7ea2fa292 Mon Sep 17 00:00:00 2001 From: tcezard Date: Wed, 9 Jul 2025 11:11:41 +0100 Subject: [PATCH 2/6] try an older version of ubuntu --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a660050..66fee73f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: ### Linux build linux_build: - runs-on: debian:bullseye-slim + runs-on: ubuntu-22.04 strategy: matrix: config: From 5c6647abdb63e36f55a5800c2c007f5aed9171fe Mon Sep 17 00:00:00 2001 From: tcezard Date: Thu, 10 Jul 2025 00:12:48 +0100 Subject: [PATCH 3/6] build linux from docker --- .github/workflows/build.yml | 24 ++++++------------------ docker/Dockerfile_debian_dynamic | 6 ++---- docker/Dockerfile_debian_static | 8 +++----- docker/build_dynamic.sh | 10 ++++++++++ docker/build_static.sh | 15 +++++++++++++++ 5 files changed, 36 insertions(+), 27 deletions(-) create mode 100755 docker/build_dynamic.sh create mode 100755 docker/build_static.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66fee73f..62cb10b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,39 +14,27 @@ jobs: ### Linux build linux_build: - runs-on: ubuntu-22.04 - strategy: - matrix: - config: - - {cc: "gcc", cxx: "g++"} - - {cc: "clang", cxx: "clang++"} - + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install dependencies + - name: build static run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends build-essential cmake wget pkg-config - ./install_dependencies.sh - - name: Compile and test + docker build -t debian_static -f docker/Dockerfile_debian_static . + docker run --rm -v $(pwd):/app --user $UID --user 502:20 -v $(pwd):/app debian_static docker/build_static.sh + - name: test run: | - mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DSTATIC_BUILD=ON .. - make -j2 - cd .. && ./build/bin/test_validation_suite + ./build/bin/test_validation_suite - name: Rename release files - if: ${{ matrix.config.cc == 'gcc' }} run: | mv build/bin/vcf_validator vcf_validator_linux mv build/bin/vcf_assembly_checker vcf_assembly_checker_linux - name: Upload vcf-validator uses: actions/upload-artifact@v4 - if: ${{ matrix.config.cc == 'gcc' }} with: name: vcf_validator_linux path: vcf_validator_linux - name: Upload vcf-assembly-checker uses: actions/upload-artifact@v4 - if: ${{ matrix.config.cc == 'gcc' }} with: name: vcf_assembly_checker_linux path: vcf_assembly_checker_linux diff --git a/docker/Dockerfile_debian_dynamic b/docker/Dockerfile_debian_dynamic index 02b4bc92..23568cd7 100644 --- a/docker/Dockerfile_debian_dynamic +++ b/docker/Dockerfile_debian_dynamic @@ -20,9 +20,7 @@ RUN apt-get update && \ WORKDIR /app # Copy the whole project -COPY . . +#COPY . . ## Create build directory and compile -RUN rm -rf build && mkdir build && cd build && \ - cmake -DSTATIC_BUILD=OFF .. && \ - make -j$(nproc) +#ENTRYPOINT ["docker/build_dynamic.sh"] \ No newline at end of file diff --git a/docker/Dockerfile_debian_static b/docker/Dockerfile_debian_static index f0bf7cc8..dcff72e6 100644 --- a/docker/Dockerfile_debian_static +++ b/docker/Dockerfile_debian_static @@ -15,11 +15,9 @@ RUN apt-get update && \ WORKDIR /app # Copy the whole project -COPY . . +#COPY . . -RUN ./install_dependencies.sh +#RUN ./install_dependencies.sh # Create build directory and compile -RUN rm -rf build && mkdir build && cd build && \ - cmake -DSTATIC_BUILD=ON .. && \ - make -j$(nproc) +#ENTRYPOINT ["docker/build_static.sh"] diff --git a/docker/build_dynamic.sh b/docker/build_dynamic.sh new file mode 100755 index 00000000..1d16dbf8 --- /dev/null +++ b/docker/build_dynamic.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +rm -rf build +mkdir build +cd build + +cmake -DSTATIC_BUILD=OFF .. +make -j$(nproc) \ No newline at end of file diff --git a/docker/build_static.sh b/docker/build_static.sh new file mode 100755 index 00000000..6c54da0e --- /dev/null +++ b/docker/build_static.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +rm -rf dependencies +./install_dependencies.sh + +rm -rf build +mkdir build +cd build + +cmake -DSTATIC_BUILD=ON .. +make -j$(nproc) + +rm -rf dependencies From f479eb947811693027a044efa87cb9afe9a3ba67 Mon Sep 17 00:00:00 2001 From: tcezard Date: Thu, 10 Jul 2025 08:48:44 +0100 Subject: [PATCH 4/6] remove hard coded user --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62cb10b9..db2e0840 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - name: build static run: | docker build -t debian_static -f docker/Dockerfile_debian_static . - docker run --rm -v $(pwd):/app --user $UID --user 502:20 -v $(pwd):/app debian_static docker/build_static.sh + docker run --rm -v $(pwd):/app --user $UID -v $(pwd):/app debian_static docker/build_static.sh - name: test run: | ./build/bin/test_validation_suite From 3e1ebb1487b4033c8126a093956acadbcf55628e Mon Sep 17 00:00:00 2001 From: tcezard Date: Thu, 10 Jul 2025 09:29:02 +0100 Subject: [PATCH 5/6] Test inside the docker build --- docker/Dockerfile_debian_dynamic | 8 +------- docker/Dockerfile_debian_static | 8 -------- docker/build_dynamic.sh | 5 ++++- docker/build_static.sh | 4 ++++ 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/docker/Dockerfile_debian_dynamic b/docker/Dockerfile_debian_dynamic index 23568cd7..8d2d68e2 100644 --- a/docker/Dockerfile_debian_dynamic +++ b/docker/Dockerfile_debian_dynamic @@ -17,10 +17,4 @@ RUN apt-get update && \ && rm -rf /var/lib/apt/lists/* # Set work directory -WORKDIR /app - -# Copy the whole project -#COPY . . - -## Create build directory and compile -#ENTRYPOINT ["docker/build_dynamic.sh"] \ No newline at end of file +WORKDIR /app \ No newline at end of file diff --git a/docker/Dockerfile_debian_static b/docker/Dockerfile_debian_static index dcff72e6..128125ca 100644 --- a/docker/Dockerfile_debian_static +++ b/docker/Dockerfile_debian_static @@ -13,11 +13,3 @@ RUN apt-get update && \ # Set work directory WORKDIR /app - -# Copy the whole project -#COPY . . - -#RUN ./install_dependencies.sh - -# Create build directory and compile -#ENTRYPOINT ["docker/build_static.sh"] diff --git a/docker/build_dynamic.sh b/docker/build_dynamic.sh index 1d16dbf8..bcf38079 100755 --- a/docker/build_dynamic.sh +++ b/docker/build_dynamic.sh @@ -7,4 +7,7 @@ mkdir build cd build cmake -DSTATIC_BUILD=OFF .. -make -j$(nproc) \ No newline at end of file +make -j$(nproc) +cd .. +build/bin/test_validation_suite + diff --git a/docker/build_static.sh b/docker/build_static.sh index 6c54da0e..5ff70ba7 100755 --- a/docker/build_static.sh +++ b/docker/build_static.sh @@ -12,4 +12,8 @@ cd build cmake -DSTATIC_BUILD=ON .. make -j$(nproc) +cd .. + +build/bin/test_validation_suite + rm -rf dependencies From 8626239fbcd454dd41d7be2de28d479223fb72d7 Mon Sep 17 00:00:00 2001 From: tcezard Date: Thu, 10 Jul 2025 13:24:51 +0100 Subject: [PATCH 6/6] Fix openss/libcurl dependency --- install_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_dependencies.sh b/install_dependencies.sh index 448f03f9..8b6f4723 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -109,7 +109,7 @@ cd "curl-${CURL_VERSION}" LDFLAGS="-L${lib_dir_abs_path}" CPPFLAGS="-I$include_dir_abs_path" \ ./configure --disable-shared --enable-static --without-librtmp \ --without-ca-bundle --disable-ldap --without-zlib --without-libidn2 \ - --without-nss --enable-ares=$build_dir_abs_path --with-openssl \ + --without-nss --enable-ares=$build_dir_abs_path --with-ssl=$build_dir_abs_path \ --prefix=$build_dir_abs_path make && make install cd ..