diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f56bdab9..db2e0840 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,39 +14,27 @@ jobs: ### Linux build linux_build: - runs-on: ubuntu-24.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 cmake build-essential 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 -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..8d2d68e2 100644 --- a/docker/Dockerfile_debian_dynamic +++ b/docker/Dockerfile_debian_dynamic @@ -17,12 +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 -RUN rm -rf build && mkdir build && cd build && \ - cmake -DSTATIC_BUILD=OFF .. && \ - make -j$(nproc) +WORKDIR /app \ No newline at end of file diff --git a/docker/Dockerfile_debian_static b/docker/Dockerfile_debian_static index f0bf7cc8..128125ca 100644 --- a/docker/Dockerfile_debian_static +++ b/docker/Dockerfile_debian_static @@ -13,13 +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 -RUN rm -rf build && mkdir build && cd build && \ - cmake -DSTATIC_BUILD=ON .. && \ - make -j$(nproc) diff --git a/docker/build_dynamic.sh b/docker/build_dynamic.sh new file mode 100755 index 00000000..bcf38079 --- /dev/null +++ b/docker/build_dynamic.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +rm -rf build +mkdir build +cd build + +cmake -DSTATIC_BUILD=OFF .. +make -j$(nproc) +cd .. +build/bin/test_validation_suite + diff --git a/docker/build_static.sh b/docker/build_static.sh new file mode 100755 index 00000000..5ff70ba7 --- /dev/null +++ b/docker/build_static.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +rm -rf dependencies +./install_dependencies.sh + +rm -rf build +mkdir build +cd build + +cmake -DSTATIC_BUILD=ON .. +make -j$(nproc) + +cd .. + +build/bin/test_validation_suite + +rm -rf dependencies 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 ..