-
Notifications
You must be signed in to change notification settings - Fork 9
103 lines (84 loc) · 2.73 KB
/
tests.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
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linux:
name: Linux (CentOS 7) ${{matrix.configuration}}
runs-on: ubuntu-latest
container: centos:7
strategy:
matrix:
configuration: [release]
steps:
- name: Install
run: yum install -y gcc gcc-c++ make python3
- name: Install recent git
run: |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y git
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update submodules
run: |
git config --global --add safe.directory '*'
git submodule init
git submodule update
- name: Install CMake
run: |
mkdir -p cmake
pushd "cmake"
if ! [ -e cmake-3.23.2-linux-x86_64.sh ]; then
curl --verbose -L -O https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-linux-x86_64.sh
fi
echo "5cca63af386e5bd0bde67c87ffac915865abd7dcc48073528f58645abda8f695 cmake-3.23.2-linux-x86_64.sh" > cmake-3.23.2-SHA-256.txt
sha256sum -c cmake-3.23.2-SHA-256.txt
if ! [ -e ./bin/cmake ]; then
chmod a+x cmake-3.23.2-linux-x86_64.sh
./cmake-3.23.2-linux-x86_64.sh --skip-license
fi
echo "$(pwd)/bin" >> $GITHUB_PATH
popd
- name: Check CMake
run: cmake --version
- name: Build
run: CMAKE_BUILD_PARALLEL_LEVEL=4 make ${{matrix.configuration}} duckdb_${{matrix.configuration}}
- name: Test
run: ./duckdb/build/${{matrix.configuration}}/test/unittest --test-dir . "[h3]"
# TODO: clang-format not installed
# - name: Check formatting
# run: |
# make format
# git diff --exit-code
- uses: actions/upload-artifact@v2
if: matrix.configuration == 'release'
with:
name: h3-linux
path: |
build/release/h3.duckdb_extension
windows:
name: Windows (64-bit)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update submodules
run: |
git submodule init
git submodule update
- name: Build
run: |
make duckdb_release
(mkdir -p build/release && cd build/release && cmake -DCMAKE_BUILD_TYPE=Release -DDUCKDB_INCLUDE_FOLDER=duckdb/src/include -DDUCKDB_LIBRARY_FOLDER=duckdb/build/release/src/Release ../.. && cmake --build .)
# TODO: Broken on Windows
# - name: Test
# run: ./duckdb/build/release/test/Release/unittest.exe --test-dir . "[h3]"
- uses: actions/upload-artifact@v2
with:
name: h3-windows
path: |
build/release/h3.duckdb_extension