-
Notifications
You must be signed in to change notification settings - Fork 2
200 lines (184 loc) · 7.18 KB
/
basic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#
# 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, minio]
include:
- os: macos-11
type: basic
openssl-version: 1.1
- os: macos-11
type: basic
openssl-version: 3
- os: macos-12
type: basic
openssl-version: 1.1
- os: macos-12
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@v3
- 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@v3
with:
path: ~/awssdk-install
key: awssdk-${{env.AWSSDK_VER}}-${{matrix.os}}-openssl-${{matrix.openssl-version}}-v1
- name: Cache GCS SDK
uses: actions/cache@v3
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@v3
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@v3
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 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/install_azurite.sh
elif [[ ${{matrix.type}} == "minio" ]]; then
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}}
AZURITE_TAR: ${{secrets.AZURITE_TAR}}
AWS_TAR: ${{secrets.AWS_TAR}}
- name: Upload Report to CodeCov
uses: codecov/codecov-action@v3
with:
gcov: true