Skip to content

Commit 5327fe3

Browse files
authored
Merge pull request #109 from carlopi/nightly_distribution
Move to extension-ci-tools, enable distribution of nightly versions
2 parents f35aa93 + ccd7929 commit 5327fe3

File tree

14 files changed

+106
-85
lines changed

14 files changed

+106
-85
lines changed

.github/workflows/distribution.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# This workflow calls the main distribution pipeline from DuckDB to build, test and (optionally) release the extension
3+
#
4+
name: Stable Extension Distribution Pipeline
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
paths-ignore:
10+
- '**/README.md'
11+
- 'doc/**'
12+
push:
13+
branches:
14+
- main
15+
paths-ignore:
16+
- '**/README.md'
17+
- 'doc/**'
18+
workflow_dispatch:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
duckdb-stable-build:
26+
name: Build extension binaries
27+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.1.0
28+
with:
29+
duckdb_version: v1.1.0
30+
exclude_archs: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64;windows_amd64_rtools"
31+
extension_name: substrait
32+
33+
duckdb-stable-deploy:
34+
name: Deploy extension binaries
35+
needs: duckdb-stable-build
36+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@v1.1.0
37+
secrets: inherit
38+
with:
39+
duckdb_version: v1.1.0
40+
exclude_archs: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64;windows_amd64_rtools"
41+
extension_name: substrait
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow calls the main distribution pipeline from DuckDB to build, test and (optionally) release the extension
2+
#
3+
name: Main Extension Distribution Pipeline
4+
on:
5+
pull_request:
6+
paths-ignore:
7+
- '**/README.md'
8+
- 'doc/**'
9+
push:
10+
paths-ignore:
11+
- '**/README.md'
12+
- 'doc/**'
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
duckdb-main-build:
21+
name: Build extension binaries
22+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
23+
with:
24+
duckdb_version: main
25+
exclude_archs: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64;windows_amd64_rtools"
26+
extension_name: substrait
27+

.github/workflows/python.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ jobs:
1818
- uses: actions/checkout@v2
1919
with:
2020
fetch-depth: 0
21+
submodules: true
2122

2223
- uses: actions/setup-python@v2
2324
with:
2425
python-version: '3.11'
2526

26-
- name: Update DuckDB submodule
27-
run: |
28-
git config --global --add safe.directory '*'
29-
make pull
30-
3127
- name: Build DuckDB (Python)
3228
run: |
3329
cd duckdb/tools/pythonpkg
@@ -45,4 +41,4 @@ jobs:
4541
4642
- name: Test Python
4743
run: |
48-
(cd test/python && python -m pytest)
44+
(cd test/python && python -m pytest)

.github/workflows/sql.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
[submodule "substrait"]
88
path = substrait
99
url = https://github.com/substrait-io/substrait
10+
[submodule "extension-ci-tools"]
11+
path = extension-ci-tools
12+
url = https://github.com/duckdb/extension-ci-tools.git

Makefile

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,25 @@
1-
.PHONY: all clean format debug release duckdb_debug duckdb_release pull update
1+
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
22

33
all: release
44

5-
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
6-
PROJ_DIR := $(dir $(MKFILE_PATH))
7-
8-
EXTRA_CMAKE_VARIABLES :=
9-
10-
# These flags will make DuckDB build the extension
11-
EXTRA_CMAKE_VARIABLES += -DEXTENSION_STATIC_BUILD=1 -DBUILD_EXTENSIONS="tpch;json" ${OSX_ARCH_FLAG}
12-
EXTRA_CMAKE_VARIABLES += -DDUCKDB_EXTENSION_NAMES="substrait"
13-
EXTRA_CMAKE_VARIABLES += -DDUCKDB_EXTENSION_SUBSTRAIT_SHOULD_LINK=1
14-
EXTRA_CMAKE_VARIABLES += -DDUCKDB_EXTENSION_SUBSTRAIT_LOAD_TESTS=1
15-
EXTRA_CMAKE_VARIABLES += -DDUCKDB_EXTENSION_SUBSTRAIT_PATH=$(PROJ_DIR)
16-
EXTRA_CMAKE_VARIABLES += -DDUCKDB_EXTENSION_SUBSTRAIT_TEST_PATH=$(PROJ_DIR)test
17-
EXTRA_CMAKE_VARIABLES += -DDUCKDB_EXTENSION_SUBSTRAIT_INCLUDE_PATH="$(PROJ_DIR)src/include"
18-
export
19-
20-
DUCKDB_DIRECTORY=
21-
ifndef DUCKDB_DIR
22-
DUCKDB_DIRECTORY=./duckdb
23-
else
24-
DUCKDB_DIRECTORY=${DUCKDB_DIR}
5+
# Configuration of extension
6+
EXT_NAME=substrait
7+
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
8+
9+
CORE_EXTENSIONS='tpch;json'
10+
11+
# Set this flag during building to enable the benchmark runner
12+
ifeq (${BUILD_BENCHMARK}, 1)
13+
TOOLCHAIN_FLAGS:=${TOOLCHAIN_FLAGS} -DBUILD_BENCHMARKS=1
2514
endif
2615

16+
# Include the Makefile from extension-ci-tools
17+
include extension-ci-tools/makefiles/duckdb_extension.Makefile
18+
2719
pull:
2820
git submodule init
2921
git submodule update --recursive --remote
3022

31-
clean:
32-
rm -rf ${DUCKDB_DIRECTORY}/build
33-
rm -rf testext
34-
cd ${DUCKDB_DIRECTORY} && make clean
35-
36-
# Main builds
37-
debug:
38-
# Have to actually cd here because the makefile assumes it's called from within duckdb
39-
cd ${DUCKDB_DIRECTORY} && $(MAKE) -C . debug
40-
41-
release:
42-
# Have to actually cd here because the makefile assumes it's called from within duckdb
43-
cd ${DUCKDB_DIRECTORY} && $(MAKE) -C . release
44-
4523
# Client builds
4624
%_js: export BUILD_NODE=1
4725
debug_js: debug
@@ -58,14 +36,8 @@ release_r: release
5836
debug_python: debug
5937
release_python: release
6038

61-
# Main tests
62-
test: test_release
63-
64-
test_release: release
65-
${DUCKDB_DIRECTORY}/build/release/test/unittest "$(PROJ_DIR)test/*"
66-
6739
test_debug: debug
68-
${DUCKDB_DIRECTORY}/build/debug/test/unittest "$(PROJ_DIR)test/*"
40+
build/debug/test/unittest "$(PROJ_DIR)test/*"
6941

7042
# Client tests
7143
test_python: test_debug_python
@@ -88,4 +60,4 @@ format:
8860
rm .clang-format
8961

9062
update:
91-
git submodule update --remote --merge
63+
git submodule update --remote --merge

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ make
1111

1212
To run, run the bundled `duckdb` shell:
1313
```
14-
./duckdb/build/release/duckdb
14+
./build/release/duckdb
1515
```
1616

1717
Then, load the Substrait - DuckDB extension like so:

duckdb

Submodule duckdb updated 127 files

extension-ci-tools

Submodule extension-ci-tools added at 69ec500

extension_config.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file is included by DuckDB's build system. It specifies which extension to load
2+
3+
# Extension from this repo
4+
duckdb_extension_load(substrait
5+
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}
6+
INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/src/include
7+
LOAD_TESTS
8+
)

0 commit comments

Comments
 (0)