Allow for GT to be a nocall if GQ and PL[0] are zero instead of homre… #2224
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.rst' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.rst' | |
env: | |
PREREQS_ENV: ${{github.workspace}}/prereqs.sh | |
SPARK_ENV: ${{github.workspace}}/spark_env.sh | |
HADOOP_ENV: ${{github.workspace}}/hadoop_env.sh | |
PREREQS_INSTALL_DIR: ${{github.workspace}}/prereqs | |
PROTOBUF_VERSION: 3.21.7 | |
CMAKE_INSTALL_PREFIX: ${{github.workspace}}/install | |
GENOMICSDB_BUILD_DIR: ${{github.workspace}}/build | |
GENOMICSDB_RELEASE_VERSION: x.y.z.test | |
HADOOP_VER: 3.3.5 | |
SPARK_VER: 3.4.0 | |
SPARK_HADOOP_VER: 3 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04,ubuntu-22.04,macos-12] | |
type: [basic] | |
java: [17] | |
include: | |
- os: ubuntu-22.04 | |
type: hdfs | |
java: 17 | |
env: | |
OS_TYPE: ${{matrix.os}} | |
JAVA_VER: ${{matrix.java}} | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: ${{matrix.java}} | |
distribution: temurin | |
java-package: jdk | |
cache: maven | |
- name: Cache built prerequisites | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{env.PREREQS_INSTALL_DIR}} | |
~/awssdk-install | |
~/gcssdk-install | |
~/protobuf-install/${{env.PROTOBUF_VERSION}} | |
key: ${{matrix.os}}-cache-prereqs-${{env.PROTOBUF_VERSION}}-v1 | |
- name: Cache Distributed FileSystems | |
if: matrix.type == 'hdfs' | |
uses: actions/cache@v3 | |
with: | |
path: ${{runner.workspace}}/hadoop-${{env.HADOOP_VER}} | |
key: ${{matrix.os}}-dfs-${{env.HADOOP_VER}} | |
- name: Install Prerequisites | |
shell: bash | |
working-directory: ${{github.workspace}}/scripts/prereqs | |
run: | | |
$GITHUB_WORKSPACE/.github/scripts/cleanup_hosts.sh | |
if [[ ${{matrix.os}} == macos* ]]; then | |
echo "Installing Prerequistes for MacOS..." | |
INSTALL_PREFIX=$PREREQS_INSTALL_DIR PREREQS_ENV=$PREREQS_ENV ./install_prereqs.sh | |
else | |
echo "Install Prerequisites for Linux.." | |
sudo INSTALL_PREFIX=$PREREQS_INSTALL_DIR PREREQS_ENV=$PREREQS_ENV ./install_prereqs.sh | |
fi | |
echo "cat prereqs env..." | |
cat $PREREQS_ENV | |
echo "cat prereqs env DONE" | |
- name: Install spark and hadoop dependencies | |
if: matrix.type == 'hdfs' | |
shell: bash | |
working-directory: ${{github.workspace}} | |
run: | | |
source $GITHUB_WORKSPACE/.github/scripts/install_hadoop.sh | |
# Spark needs JAVA_HOME to be the jdk path | |
JAVA_HOME==$(dirname $(dirname $(readlink -f $(which javac)))) SPARK_ENV=$SPARK_ENV source $GITHUB_WORKSPACE/.github/scripts/install_spark.sh | |
env: | |
INSTALL_DIR: ${{runner.workspace}} | |
- name: Create Build Directory | |
shell: bash | |
run: mkdir -p $GENOMICSDB_BUILD_DIR | |
- name: Configure CMake Build | |
shell: bash | |
working-directory: ${{env.GENOMICSDB_BUILD_DIR}} | |
run: | | |
source $PREREQS_ENV | |
# java tests take a very long time to run on MacOS, so limit running the tests to PRs and master/develop branches | |
BRANCH=${GITHUB_REF##*/} | |
if [[ ${{matrix.os}} != macos* || ${GITHUB_REF##*/} == master || ${GITHUB_REF##*/} == develop || $GITHUB_BASE_REF == master || $GITHUB_BASE_REF == develop ]]; then | |
echo "cmake BUILD_JAVA set to 1" | |
JAVA_BUILD_ARGS="-DBUILD_JAVA=1" | |
fi | |
if [[ ${{matrix.type}} == 'hdfs' ]]; then | |
HDFS_BUILD_ARGS="-DUSE_HDFS=1" | |
fi | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX \ | |
-DCMAKE_PREFIX_PATH=$PREREQS_INSTALL_DIR -DGENOMICSDB_PROTOBUF_VERSION=$PROTOBUF_VERSION \ | |
-DGENOMICSDB_RELEASE_VERSION=$GENOMICSDB_RELEASE_VERSION $JAVA_BUILD_ARGS $HDFS_BUILD_ARGS | |
- name: Build | |
working-directory: ${{env.GENOMICSDB_BUILD_DIR}} | |
shell: bash | |
run: | | |
source $PREREQS_ENV | |
make -j4 | |
make install | |
- name: Test | |
shell: bash | |
working-directory: ${{env.GENOMICSDB_BUILD_DIR}} | |
if: matrix.type == 'basic' | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install jsondiff | |
make test ARGS=-V | |
- name: Test - Distributed FileSystems | |
if: matrix.type == 'hdfs' | |
shell: bash | |
working-directory: ${{github.workspace}} | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install jsondiff | |
source $SPARK_ENV | |
python tests/run_spark_hdfs.py $GENOMICSDB_BUILD_DIR $CMAKE_INSTALL_PREFIX local hdfs://localhost:9000/ client $GENOMICSDB_RELEASE_VERSION $GITHUB_WORKSPACE/tests "" Coverage | |
$GITHUB_WORKSPACE/.github/scripts/test_hdfs_htslib_support.sh | |
- name: Coverage | |
shell: bash | |
working-directory: ${{env.GENOMICSDB_BUILD_DIR}} | |
run: | | |
lcov --directory . --capture --output-file coverage.info | |
lcov --remove coverage.info '/opt*' '/usr*' '*/dependencies/*' '*/src/test*' '*.pb.h' '*.pb.cc' '*/protobuf-install/*' '*/awssdk-install/*' '*/gcssdk-install/*' 'v1/*' '/Library/*' -o coverage.info | |
- name: Upload Coverage to CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: build/coverage.info, build/target/jacoco-reports/jacoco-ut/jacoco.xml, build/target/jacoco-reports/jacoco-ci/jacoco-ci.xml | |
verbose: true |