Fix memory leaks, add parallel examples for testing and support valgrind githib actions #1230
Workflow file for this run
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
# | |
# basic.yml | |
# | |
# The MIT License | |
# | |
# Copyright (c) 2020-2023 Omics Data Automation, Inc. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in | |
# all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
# THE SOFTWARE. | |
# | |
name: build | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
env: | |
CMAKE_BUILD_TYPE: Coverage | |
CMAKE_BUILD_DIR: ${{github.workspace}}/build | |
HADOOP_VER: 3.2.4 | |
AWSSDK_VER: 1.8.x | |
GCSSDK_VER: v1.24.0 | |
# Only used to install Catch2 on Ubuntu from source | |
# MacOS uses brew that installs v3.1.0 | |
# Ubuntu distributions are currently on v2.13.9 | |
CATCH2_VER: v2.13.9 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
# All supported types | |
# type: [basic, basic-no-hdfs, basic-codec, hdfs, gcs, azure, azurite, aws] | |
type: [basic, basic-no-hdfs, basic-codec, hdfs, gcs, azure, aws] | |
include: | |
- os: macos-13 | |
type: basic | |
openssl-version: 1.1 | |
- os: macos-13 | |
type: basic | |
openssl-version: 3 | |
- os: ubuntu-22.04 | |
type: basic | |
#- os: ubuntu-22.04 | |
#type: azurite | |
- os: ubuntu-22.04 | |
type: aws | |
- os: ubuntu-22.04 | |
type: gcs | |
- os: ubuntu-22.04 | |
type: azure | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Build Environment | |
shell: bash | |
run: | | |
mkdir -p $CMAKE_BUILD_DIR | |
# For extracting cached Catch2 | |
sudo chmod a+rwx /usr/local/include /usr/local/lib /usr/local/share /usr/local/share/doc | |
mkdir -p /usr/local/share/vcpkg/ports | |
- name: Cache AWS SDK | |
uses: actions/cache@v4 | |
with: | |
path: ~/awssdk-install | |
key: awssdk-${{env.AWSSDK_VER}}-${{matrix.os}}-openssl-${{matrix.openssl-version}}-v1 | |
- name: Cache GCS SDK | |
uses: actions/cache@v4 | |
with: | |
path: ~/gcssdk-install | |
key: gcssdk-${{env.GCSSDK_VER}}-${{matrix.os}}-openssl-${{matrix.openssl-version}}-v1 | |
- name: Cache Catch2 artifacts | |
if: startsWith(matrix.os,'ubuntu') | |
uses: actions/cache@v4 | |
with: | |
path: ~/catch2-install | |
key: catch2-${{env.CATCH2_VER}}-v0-${{matrix.os}} | |
- name: Cache Distributed FileSystems | |
if: matrix.type == 'hdfs' || matrix.type == 'gcs' | |
uses: actions/cache@v4 | |
with: | |
path: ${{runner.workspace}}/hadoop-${{env.HADOOP_VER}} | |
key: dfs-${{env.HADOOP_VER}}-v1-${{matrix.os}}-openssl-v1 | |
- name: Install Prereqs and Configure CMake - Ubuntu | |
if: startsWith(matrix.os,'ubuntu') | |
shell: bash | |
working-directory: ${{env.CMAKE_BUILD_DIR}} | |
run: | | |
sudo apt-get update -q | |
sudo apt-get -y install cmake lcov | |
sudo apt-get -y install zlib1g-dev libssl-dev uuid-dev libcurl4-openssl-dev | |
# sudo apt-get -y install catch2 | |
INSTALL_DIR=~/catch2-install CATCH2_VER=$CATCH2_VER $GITHUB_WORKSPACE/.github/scripts/install_catch2.sh | |
export ENABLE_ZSTD=0 | |
export ENABLE_BLOSC=0 | |
if [[ ${{matrix.type}} == "basic-no-hdfs" ]]; then | |
export USE_HDFS="-DUSE_HDFS=0" | |
fi | |
if [[ ${{matrix.type}} == "basic-codec" ]]; then | |
source $GITHUB_WORKSPACE/.github/scripts/install_supported_codec.sh | |
fi | |
echo "CMAKE VERSION=$(cmake --version)" | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \ | |
-DCMAKE_PREFIX_PATH=~/catch2-install \ | |
-DENABLE_ZSTD=$ENABLE_ZSTD -DENABLE_BLOSC=$ENABLE_BLOSC \ | |
-DAWSSDK_VERSION=$AWSSDK_VER -DGCSSDK_VERSION=$GCSSDK_VER $USE_HDFS | |
- name: Install Prereqs and Configure CMake - MacOS | |
if: startsWith(matrix.os, 'macOS') | |
shell: bash | |
working-directory: ${{env.CMAKE_BUILD_DIR}} | |
run: | | |
brew list cmake &>/dev/null || brew install cmake | |
brew list lcov &>/dev/null || brew install lcov | |
brew list openssl@${{matrix.openssl-version}} &>/dev/null || brew install openssl@${{matrix.openssl-version}} | |
brew list ossp-uuid &>/dev/null || brew install ossp-uuid | |
brew list catch2 &>/dev/null || brew install catch2 | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DAWSSDK_VERSION=$AWSSDK_VER \ | |
-DGCSSDK_VERSION=$GCSSDK_VER | |
# GCS SDK needs OPENSSL_ROOT_DIR set for MAC, so build here | |
make -j4 | |
env: | |
OPENSSL_ROOT_DIR: /usr/local/opt/openssl@${{matrix.openssl-version}} | |
- name: Build and Test | |
if: startsWith(matrix.type, 'basic') | |
shell: bash | |
working-directory: ${{env.CMAKE_BUILD_DIR}} | |
run: | | |
make -j4 | |
make tests -j 4 | |
export TILEDB_BENCHMARK=1 | |
time TILEDB_BOOKKEEPING_STATS=1 TILEDB_CACHE=1 test/test_sparse_array_benchmark | |
export TILEDB_DISABLE_FILE_LOCKING=1 | |
time test/test_sparse_array_benchmark | |
export TILEDB_KEEP_FILE_HANDLES_OPEN=1 | |
time test/test_sparse_array_benchmark | |
test/test_print_array_schema $GITHUB_WORKSPACE/test/inputs/examples_ws/sparse_arrays/my_array_B | |
test/test_print_book_keeping $GITHUB_WORKSPACE/test/inputs/examples_ws/sparse_arrays/my_array_B/__4FECD19A-4F7D-4D21-B170-A2D111C8FCC44550772224_1652300381620 | |
- name: Build and Test - Distributed FileSystems | |
if: startsWith(matrix.type, 'basic') != true | |
shell: bash | |
working-directory: ${{env.CMAKE_BUILD_DIR}} | |
run: | | |
if [[ ${{matrix.type}} == "azurite" ]]; then | |
source $GITHUB_WORKSPACE/.github/scripts/mkcert.sh | |
source $GITHUB_WORKSPACE/.github/scripts/install_azurite.sh | |
elif [[ ${{matrix.type}} == "minio" ]]; then | |
source $GITHUB_WORKSPACE/.github/scripts/mkcert.sh | |
source $GITHUB_WORKSPACE/.github/scripts/install_minio.sh | |
elif [[ ${{matrix.type}} == "aws" ]]; then | |
source $GITHUB_WORKSPACE/.github/scripts/install_aws.sh | |
else | |
source $GITHUB_WORKSPACE/.github/scripts/install_hadoop.sh | |
fi | |
source $GITHUB_WORKSPACE/.github/scripts/run_dfs_tests.sh | |
env: | |
INSTALL_DIR: ${{runner.workspace}} | |
INSTALL_TYPE: ${{matrix.type}} | |
R_TAR: ${{secrets.R_NEW_TAR}} | |
AZ_TAR: ${{secrets.AZ_TAR}} | |
AZURITE_TAR: ${{secrets.AZURITE_TAR}} | |
AWS_TAR: ${{secrets.AWS_TAR}} | |
- name: Upload Report to CodeCov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} |