Skip to content

Commit

Permalink
Merge pull request #28 from DataZooDE/25-add-build-for-v0102
Browse files Browse the repository at this point in the history
25 add build for v0102
  • Loading branch information
sipemu authored Apr 29, 2024
2 parents 3909e0f + da0caaf commit 50c0156
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/_extension_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
env:
VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }}
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
GEN: Ninja

steps:
Expand Down Expand Up @@ -182,6 +183,7 @@ jobs:
GEN: 'ninja'
CC: ${{ matrix.duckdb_arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
CXX: ${{ matrix.duckdb_arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
run: |
./scripts/download_and_extract_nwrfc.sh s3://erpl-resources/sapnwrfc/nwrfc750P_11-70002752_linux.zip ./nwrfcsdk/linux/
make release
Expand All @@ -204,8 +206,17 @@ jobs:
GEN: Ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }}
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
CC: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 'gcc' || '' }}
CXX: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 'g++' || '' }}

steps:
- name: Keep \n line endings
shell: bash
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Generate GitHub token
id: generate_token
uses: tibdex/[email protected]
Expand All @@ -219,9 +230,16 @@ jobs:
submodules: 'true'
token: ${{ steps.generate_token.outputs.token }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: '3.7'
python-version: '3.11'

- uses: r-lib/actions/setup-r@v2
if: matrix.duckdb_arch == 'windows_amd64_rtools'
with:
r-version: 'devel'
update-rtools: true
rtools-version: '42' # linker bug in 43

- name: Checkout DuckDB to version
run: |
Expand All @@ -245,7 +263,20 @@ jobs:
role-session-name: ErplGithubOicdSession
aws-region: eu-west-1

- name: Fix for MSVC issue
shell: bash
env:
OVERLAY_TRIPLET_SRC: ${{ github.workspace }}/vcpkg/triplets/community/x64-windows-static-md.cmake
OVERLAY_TRIPLET_DST: ${{ github.workspace }}/overlay_triplets/x64-windows-static-md.cmake
run: |
mkdir overlay_triplets
cp $OVERLAY_TRIPLET_SRC $OVERLAY_TRIPLET_DST
echo "set(VCPKG_PLATFORM_TOOLSET_VERSION "14.38")" >> $OVERLAY_TRIPLET_DST
- name: Build extension
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/overlay_triplets"
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
run: |
python -m pip install awscli
.\scripts\download_and_extract_nwrfc.ps1 's3://erpl-resources/sapnwrfc/nwrfc750P_12-70002755_win.zip' './nwrfcsdk/win/'
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,18 @@ EXTRA_EXTENSIONS_FLAG=-DBUILD_EXTENSIONS=""

# EXTENSION_STATIC_BUILD=1 means that duckdb is linked into the extension for compatibility reasons,
# do not change this
BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 $(EXTENSION_FLAGS) ${EXTRA_EXTENSIONS_FLAG} $(OSX_BUILD_FLAG) $(TOOLCHAIN_FLAGS)
BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 $(EXTENSION_FLAGS) ${EXTRA_EXTENSIONS_FLAG} $(OSX_BUILD_FLAG) $(TOOLCHAIN_FLAGS) -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}'
CLIENT_FLAGS:=

#### Main build
CLIENT_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0

ifdef DUCKDB_PLATFORM
ifneq ("${DUCKDB_PLATFORM}", "")
CMAKE_VARS:=${CMAKE_VARS} -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}'
endif
endif

debug:
ifeq ($(OS),Windows_NT)
powershell.exe -Command "if (!(Test-Path -Path ./build/debug/)) { New-Item -ItemType Directory -Path ./build/debug/ }"
Expand Down
8 changes: 7 additions & 1 deletion trampoline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ EXTRA_EXTENSIONS_FLAG=-DBUILD_EXTENSIONS=""

# EXTENSION_STATIC_BUILD=1 means that duckdb is linked into the extension for compatibility reasons,
# do not change this
BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 $(EXTENSION_FLAGS) ${EXTRA_EXTENSIONS_FLAG} $(OSX_BUILD_FLAG) $(TOOLCHAIN_FLAGS)
BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 $(EXTENSION_FLAGS) ${EXTRA_EXTENSIONS_FLAG} $(OSX_BUILD_FLAG) $(TOOLCHAIN_FLAGS) -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}'
CLIENT_FLAGS:=

#### Main build
CLIENT_FLAGS=-DDUCKDB_EXTENSION_${EXTENSION_NAME}_SHOULD_LINK=0 -D_GLIBCXX_USE_CXX11_ABI=0

ifdef DUCKDB_PLATFORM
ifneq ("${DUCKDB_PLATFORM}", "")
CMAKE_VARS:=${CMAKE_VARS} -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}'
endif
endif

debug:
ifeq ($(OS),Windows_NT)
powershell.exe -Command "if (!(Test-Path -Path ../build/debug/$(EXTENSION_NAME))) { New-Item -ItemType Directory -Path ../build/debug/$(EXTENSION_NAME) }"
Expand Down

0 comments on commit 50c0156

Please sign in to comment.