-
Notifications
You must be signed in to change notification settings - Fork 185
123 lines (106 loc) · 4.77 KB
/
build-ubuntu20.04-backwards-compatibility.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
name: build-ubuntu-20.04-backwards-compatibility
on:
workflow_call:
env:
CXX: g++-10
CC: gcc-10
jobs:
build:
runs-on: ${{matrix.os}}
if: ${{ startsWith(github.ref , 'refs/tags') != true && startsWith(github.ref , 'build-') != true }}
strategy:
matrix:
os:
- ubuntu-20.04
timeout-minutes: 120
name: Build tiledb_unit
steps:
- uses: actions/checkout@v3
- name: 'Print env'
run: ./scripts/ci/posix/print-env.sh
shell: bash
# Need this for virtualenv and arrow tests if enabled
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- run: |
set -e pipefail
python -m pip install --upgrade pip virtualenv
shell: bash
- name: 'Build tiledb_unit'
id: build
shell: bash
run: |
bootstrap_args="${bootstrap_args}";
bootstrap_args="${bootstrap_args} --enable-release-symbols";
source $GITHUB_WORKSPACE/scripts/ci/bootstrap_libtiledb.sh
source $GITHUB_WORKSPACE/scripts/ci/build_libtiledb.sh
# Save the tiledb_unit binary for use in the next step
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: tiledb_unit
path: ${{ github.workspace }}/build/test/tiledb_unit
retention-days: 1
test:
needs: build
runs-on: ${{matrix.os}}
if: ${{ startsWith(github.ref , 'refs/tags') != true && startsWith(github.ref , 'build-') != true }}
strategy:
matrix:
os:
- ubuntu-20.04
# Note: v2_1_0 arrays were never created so its currently skipped
# Note: This matrix is used to set the value of TILEDB_COMPATIBILITY_VERSION
tiledb_version: ["v1_4_0", "v1_5_0", "v1_6_0", "v1_7_0", "v2_0_0", "v2_2_0", "v2_2_3", "v2_3_0", "v2_4_0", "v2_5_0", "v2_6_0", "v2_7_0", "v2_8_3", "v2_9_1", "v2_10_0", "v2_11_0", "v2_12_3", "v2_13_2", "v2_14_0", "v2_15_0", "v2_16_3", "v2_17_5", "v2_18_3", "v2_19_1", "v2_20_1", "v2_21_1", "v2_22_0", "v2_23_0", "v2_24_0", "v2_25_0", "v2_26_0"]
timeout-minutes: 30
name: ${{ matrix.tiledb_version }}
steps:
- uses: actions/checkout@v3
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: tiledb_unit
path: ${{ github.workspace }}/build/test/
- name: Update tiledb_unit permissions
run: chmod +x $GITHUB_WORKSPACE/build/test/tiledb_unit
- name: Free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: 'Test backward compatibility'
id: test
env:
TILEDB_COMPATIBILITY_VERSION: ${{ matrix.tiledb_version }}
run: |
ulimit -c unlimited
ulimit -c
# we clone the latest version, because we are specifying the
# test target version in the TILEDB_COMPATIBILITY_VERSION variable
git clone --depth=1 https://github.com/TileDB-Inc/TileDB-Unit-Test-Arrays.git --branch main test/inputs/arrays/read_compatibility_test
# Remove all arrays besides the current matrix version
ls test/inputs/arrays/read_compatibility_test/ | grep -v ${TILEDB_COMPATIBILITY_VERSION} | grep -v "__tiledb_group.tdb" | xargs -I{} echo "rm -r test/inputs/arrays/read_compatibility_test/{}"
ls test/inputs/arrays/read_compatibility_test/ | grep -v ${TILEDB_COMPATIBILITY_VERSION} | grep -v "__tiledb_group.tdb" | xargs -I{} rm -r test/inputs/arrays/read_compatibility_test/{}
rm -r test/inputs/arrays/read_compatibility_test/.git
rm test/inputs/arrays/read_compatibility_test/.gitignore
ls -lah test/inputs/arrays/read_compatibility_test/
ls -lah test/inputs/arrays/read_compatibility_test/${TILEDB_COMPATIBILITY_VERSION}/
# Bypass Catch2 Framework stdout interception with awk on test output
$GITHUB_WORKSPACE/build/test/tiledb_unit -d yes "[backwards-compat]"| awk '/1: ::set-output/{sub(/.*1: /, ""); print; next} 1'
- name: 'Test status check'
run: |
# tiledb_unit is configured to set a job-level variable TILEDB_CI_SUCCESS=1
# following the test run. If this variable is not set, the build should fail.
# see https://github.com/TileDB-Inc/TileDB/pull/1400 (5f0623f4d3)
if [[ "${{ steps.test.outputs.TILEDB_CI_SUCCESS }}" -ne 1 ]]; then
exit 1;
fi
- name: "Print log files (failed build only)"
run: |
source $GITHUB_WORKSPACE/scripts/ci/print_logs.sh
if: ${{ failure() }} # only run this job if the build step failed