1+ #
2+ # NOTE: this workflow is for testing the extension template itself,
3+ # this workflow will be removed when scripts/bootstrap-template.py is run
4+ #
5+ name : Extension Template
6+ on : [push, pull_request,repository_dispatch]
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
9+ cancel-in-progress : true
10+
11+ jobs :
12+ linux :
13+ name : Linux
14+ if : ${{ vars.RUN_RENAME_TEST == 'true' || github.repository == 'duckdb/extension-template' }}
15+ runs-on : ubuntu-latest
16+ container : ubuntu:18.04
17+ strategy :
18+ matrix :
19+ # Add commits/tags to build against other DuckDB versions
20+ duckdb_version : [ '<submodule_version>' ]
21+ env :
22+ VCPKG_TOOLCHAIN_PATH : ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
23+ VCPKG_TARGET_TRIPLET : ' x64-linux'
24+ GEN : ninja
25+ ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
26+ defaults :
27+ run :
28+ shell : bash
29+
30+ steps :
31+ - name : Install required ubuntu packages
32+ run : |
33+ apt-get update -y -qq
34+ apt-get install -y -qq software-properties-common
35+ add-apt-repository ppa:git-core/ppa
36+ apt-get update -y -qq
37+ 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
38+
39+ - name : Install Git 2.18.5
40+ run : |
41+ wget https://github.com/git/git/archive/refs/tags/v2.18.5.tar.gz
42+ tar xvf v2.18.5.tar.gz
43+ cd git-2.18.5
44+ make
45+ make prefix=/usr install
46+ git --version
47+
48+ - uses : actions/checkout@v3
49+ with :
50+ fetch-depth : 0
51+ submodules : ' true'
52+
53+ - name : Checkout DuckDB to version
54+ if : ${{ matrix.duckdb_version != '<submodule_version>'}}
55+ run : |
56+ cd duckdb
57+ git checkout ${{ matrix.duckdb_version }}
58+
59+ - uses : ./duckdb/.github/actions/ubuntu_18_setup
60+
61+ - name : Setup vcpkg
62+ 63+ with :
64+ vcpkgGitCommitId : a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
65+
66+ - name : Rename extension
67+ run : |
68+ python3 scripts/bootstrap-template.py ext_1_a_123b_b11
69+
70+ - name : Build
71+ run : |
72+ make
73+
74+ - name : Test
75+ run : |
76+ make test
77+
78+ macos :
79+ name : MacOS
80+ if : ${{ vars.RUN_RENAME_TEST == 'true' || github.repository == 'duckdb/extension-template' }}
81+ runs-on : macos-latest
82+ strategy :
83+ matrix :
84+ # Add commits/tags to build against other DuckDB versions
85+ duckdb_version : [ '<submodule_version>']
86+ env :
87+ VCPKG_TOOLCHAIN_PATH : ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
88+ VCPKG_TARGET_TRIPLET : ' x64-osx'
89+ OSX_BUILD_ARCH : ' x86_64'
90+ GEN : ninja
91+ defaults :
92+ run :
93+ shell : bash
94+
95+ steps :
96+ - uses : actions/checkout@v3
97+ with :
98+ fetch-depth : 0
99+ submodules : ' true'
100+
101+ - name : Install Ninja
102+ run : brew install ninja
103+
104+ - uses : actions/setup-python@v2
105+ with :
106+ python-version : ' 3.11'
107+
108+ - name : Checkout DuckDB to version
109+ if : ${{ matrix.duckdb_version != '<submodule_version>'}}
110+ run : |
111+ cd duckdb
112+ git checkout ${{ matrix.duckdb_version }}
113+
114+ - name : Setup vcpkg
115+ 116+ with :
117+ vcpkgGitCommitId : a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
118+
119+ - name : Rename extension
120+ run : |
121+ python scripts/bootstrap-template.py ext_1_a_123b_b11
122+
123+ - name : Build
124+ run : |
125+ make
126+
127+ - name : Test
128+ run : |
129+ make test
130+
131+ windows :
132+ name : Windows
133+ if : ${{ vars.RUN_RENAME_TEST == 'true' || github.repository == 'duckdb/extension-template' }}
134+ runs-on : windows-latest
135+ strategy :
136+ matrix :
137+ # Add commits/tags to build against other DuckDB versions
138+ duckdb_version : [ '<submodule_version>' ]
139+ env :
140+ VCPKG_TOOLCHAIN_PATH : ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
141+ VCPKG_TARGET_TRIPLET : ' x64-windows-static-md'
142+ defaults :
143+ run :
144+ shell : bash
145+
146+ steps :
147+ - uses : actions/checkout@v3
148+ with :
149+ fetch-depth : 0
150+ submodules : ' true'
151+
152+ - uses : actions/setup-python@v2
153+ with :
154+ python-version : ' 3.11'
155+
156+ - name : Checkout DuckDB to version
157+ # Add commits/tags to build against other DuckDB versions
158+ if : ${{ matrix.duckdb_version != '<submodule_version>'}}
159+ run : |
160+ cd duckdb
161+ git checkout ${{ matrix.duckdb_version }}
162+
163+ - name : Setup vcpkg
164+ 165+ with :
166+ vcpkgGitCommitId : a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
167+
168+ - name : Rename extension
169+ run : |
170+ python scripts/bootstrap-template.py ext_1_a_123b_b11
171+
172+ - name : Build
173+ run : |
174+ make
175+
176+ - name : Test extension
177+ run : |
178+ build/release/test/Release/unittest.exe
0 commit comments