Skip to content

EVA-3662 - Enable build with dynamically linked dependencies #70

EVA-3662 - Enable build with dynamically linked dependencies

EVA-3662 - Enable build with dynamically linked dependencies #70

Workflow file for this run

name: Build
on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- '*'
jobs:
### Linux build
linux_build:
runs-on: ubuntu-20.04
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang-10", cxx: "clang++-10"}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install cmake wget build-essential
./install_dependencies.sh linux
- name: Compile and test
run: |
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DSTATIC_BUILD=1 ..
make -j2
cd .. && ./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@v3
if: ${{ matrix.config.cc == 'gcc' }}
with:
name: vcf_validator_linux
path: vcf_validator_linux
- name: Upload vcf-assembly-checker
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'gcc' }}
with:
name: vcf_assembly_checker_linux
path: vcf_assembly_checker_linux
### Mac OS build intel
macos_build_intel:
runs-on: macos-12
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang", cxx: "clang++"}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
#brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost automake
./install_dependencies.sh osx
- name: Compile and test
run: |
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} ..
export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib:/usr/local/lib
make -j2
cd .. && ./build/bin/test_validation_suite
- name: Rename release files
if: ${{ matrix.config.cc == 'clang' }}
run: |
mv build/bin/vcf_validator vcf_validator_macos_x64
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos_x64
- name: Upload vcf-validator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_validator_macos_x64
path: vcf_validator_macos_x64
- name: Upload vcf-assembly-checker
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_assembly_checker_macos_x64
path: vcf_assembly_checker_macos_x64
### Mac OS build arm
macos_build_arm:
runs-on: macos-14
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang", cxx: "clang++"}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
#brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost automake libtool
./install_dependencies.sh osx
- name: Compile and test
run: |
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} ..
make -j2
cd .. && ./build/bin/test_validation_suite
- name: Rename release files
if: ${{ matrix.config.cc == 'clang' }}
run: |
mv build/bin/vcf_validator vcf_validator_macos_arm64
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos_arm64
- name: Upload vcf-validator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_validator_macos_arm64
path: vcf_validator_macos_arm64
- name: Upload vcf-assembly-checker
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_assembly_checker_macos_arm64
path: vcf_assembly_checker_macos_arm64
### Release job (tags only)
create_release:
if: startsWith(github.ref, 'refs/tags/')
needs: [ linux_build, macos_build_intel, macos_build_arm ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: bin
- name: Draft release
uses: softprops/action-gh-release@v1
with:
draft: true
files: ${{ github.workspace }}/bin/*/*
fail_on_unmatched_files: true