generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
177 lines (150 loc) · 5.04 KB
/
ExtensionTemplate.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
#
# NOTE: this workflow is for testing the extension template itself,
# this workflow will be removed when scripts/bootstrap-template.py is run
#
name: Extension Template
on: [push, pull_request,repository_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
jobs:
linux:
name: Linux
if: ${{ vars.RUN_RENAME_TEST == 'true' || github.repository == 'duckdb/extension-template' }}
runs-on: ubuntu-latest
container: ubuntu:18.04
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>' ]
env:
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: 'x64-linux'
GEN: ninja
defaults:
run:
shell: bash
steps:
- name: Install required ubuntu packages
run: |
apt-get update -y -qq
apt-get install -y -qq software-properties-common
add-apt-repository ppa:git-core/ppa
apt-get update -y -qq
apt-get install -y -qq ninja-build make gcc-multilib g++-multilib libssl-dev wget openjdk-8-jdk zip maven unixodbc-dev libc6-dev-i386 lib32readline6-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip build-essential checkinstall libffi-dev curl libz-dev openssh-client
- name: Install Git 2.18.5
run: |
wget https://github.com/git/git/archive/refs/tags/v2.18.5.tar.gz
tar xvf v2.18.5.tar.gz
cd git-2.18.5
make
make prefix=/usr install
git --version
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Checkout DuckDB to version
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
- uses: ./duckdb/.github/actions/ubuntu_18_setup
- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6
- name: Rename extension
run: |
python3 scripts/bootstrap-template.py ext_1_a_123b_b11
- name: Build
run: |
make
- name: Test
run: |
make test
macos:
name: MacOS
if: ${{ vars.RUN_RENAME_TEST == 'true' || github.repository == 'duckdb/extension-template' }}
runs-on: macos-latest
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>']
env:
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: 'x64-osx'
OSX_BUILD_ARCH: 'x86_64'
GEN: ninja
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Install Ninja
run: brew install ninja
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Checkout DuckDB to version
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6
- name: Rename extension
run: |
python scripts/bootstrap-template.py ext_1_a_123b_b11
- name: Build
run: |
make
- name: Test
run: |
make test
windows:
name: Windows
if: ${{ vars.RUN_RENAME_TEST == 'true' || github.repository == 'duckdb/extension-template' }}
runs-on: windows-latest
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>' ]
env:
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: 'x64-windows-static-md'
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Checkout DuckDB to version
# Add commits/tags to build against other DuckDB versions
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6
- name: Rename extension
run: |
python scripts/bootstrap-template.py ext_1_a_123b_b11
- name: Build
run: |
make
- name: Test extension
run: |
build/release/test/Release/unittest.exe