From c617c9d27ca80a487f5a83d5c7ff7ee93f6361e9 Mon Sep 17 00:00:00 2001 From: Sam Ansmink Date: Mon, 26 Aug 2024 16:04:32 +0200 Subject: [PATCH 1/5] add custom toolchain script --- .github/workflows/_extension_distribution.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/_extension_distribution.yml b/.github/workflows/_extension_distribution.yml index 7088c1e..8a878d2 100644 --- a/.github/workflows/_extension_distribution.yml +++ b/.github/workflows/_extension_distribution.yml @@ -71,6 +71,11 @@ on: required: false type: string default: "" + # If set, this script will be called before the build step to allow injecting custom build time dependencies + custom_toolchain_script: + required: false + type: string + default: "" # DEPRECATED: use extra_toolchains instead enable_rust: required: false @@ -265,6 +270,15 @@ jobs: echo "OPENSSL_DIR=`pwd`/build/release/vcpkg_installed/${{ matrix.vcpkg_triplet }}" >> $GITHUB_ENV echo "OPENSSL_USE_STATIC_LIBS=true" >> $GITHUB_ENV + ### + # Custom toolchain script + ### + - name: Run custom toolchain script + if: ${{ inputs.custom_toolchain_script != ''}} + shell: bash + run: | + ${{ inputs.custom_toolchain_script }} + ### # Building & testing ### @@ -358,6 +372,12 @@ jobs: run: | rustup target add x86_64-apple-darwin + - name: Run custom toolchain script + if: ${{ inputs.custom_toolchain_script != ''}} + shell: bash + run: | + ${{ inputs.custom_toolchain_script }} + - name: Build extension shell: bash env: @@ -456,6 +476,12 @@ jobs: with: vcpkgGitCommitId: ${{ inputs.vcpkg_commit }} + - name: Run custom toolchain script + if: ${{ inputs.custom_toolchain_script != ''}} + shell: bash + run: | + ${{ inputs.custom_toolchain_script }} + - name: Build & test extension env: DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} @@ -534,6 +560,12 @@ jobs: with: key: ${{ github.job }}-${{ matrix.duckdb_arch }} + - name: Run custom toolchain script + if: ${{ inputs.custom_toolchain_script != ''}} + shell: bash + run: | + ${{ inputs.custom_toolchain_script }} + - name: Build Wasm module run: | make ${{ matrix.duckdb_arch }} From 312d09824328c93fab8740f361e6cbb2f6c4454e Mon Sep 17 00:00:00 2001 From: Sam Ansmink Date: Mon, 26 Aug 2024 16:16:07 +0200 Subject: [PATCH 2/5] test custom toolchain script --- .github/workflows/TestCITools.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestCITools.yml b/.github/workflows/TestCITools.yml index cea7c81..748311e 100644 --- a/.github/workflows/TestCITools.yml +++ b/.github/workflows/TestCITools.yml @@ -17,8 +17,8 @@ jobs: uses: ./.github/workflows/_extension_distribution.yml with: extension_name: quack - override_repository: duckdb/extension-template - override_ref: main + override_repository: samansmink/extension-template + override_ref: add-custom-toolchain-script duckdb_version: v1.0.0 override_ci_tools_repository: ${{ github.repository }} override_ci_tools_ref: ${{ github.sha }} From cd8f0edb64c96b3b02e03ed5545075b2a4a3ccbf Mon Sep 17 00:00:00 2001 From: Sam Ansmink Date: Mon, 26 Aug 2024 16:18:42 +0200 Subject: [PATCH 3/5] enable script --- .github/workflows/TestCITools.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/TestCITools.yml b/.github/workflows/TestCITools.yml index 748311e..8fe8ef9 100644 --- a/.github/workflows/TestCITools.yml +++ b/.github/workflows/TestCITools.yml @@ -22,6 +22,7 @@ jobs: duckdb_version: v1.0.0 override_ci_tools_repository: ${{ github.repository }} override_ci_tools_ref: ${{ github.sha }} + custom_toolchain_script: './scripts/setup-custom-toolchain.sh' delta-extension-main: name: Rust builds (using Delta extension) From aba3a56cf580e453696e2f28bca902e7b684c745 Mon Sep 17 00:00:00 2001 From: Sam Ansmink Date: Mon, 26 Aug 2024 16:43:36 +0200 Subject: [PATCH 4/5] use hardcoded path --- .github/workflows/TestCITools.yml | 2 +- .github/workflows/_extension_distribution.yml | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/TestCITools.yml b/.github/workflows/TestCITools.yml index 8fe8ef9..4b381dd 100644 --- a/.github/workflows/TestCITools.yml +++ b/.github/workflows/TestCITools.yml @@ -22,7 +22,7 @@ jobs: duckdb_version: v1.0.0 override_ci_tools_repository: ${{ github.repository }} override_ci_tools_ref: ${{ github.sha }} - custom_toolchain_script: './scripts/setup-custom-toolchain.sh' + custom_toolchain_script: true delta-extension-main: name: Rust builds (using Delta extension) diff --git a/.github/workflows/_extension_distribution.yml b/.github/workflows/_extension_distribution.yml index 8a878d2..249e5e5 100644 --- a/.github/workflows/_extension_distribution.yml +++ b/.github/workflows/_extension_distribution.yml @@ -71,11 +71,11 @@ on: required: false type: string default: "" - # If set, this script will be called before the build step to allow injecting custom build time dependencies + # If set, the setup will look for a script in `./scripts/custom-toolchain-script.sh` to run custom_toolchain_script: required: false - type: string - default: "" + type: boolean + default: false # DEPRECATED: use extra_toolchains instead enable_rust: required: false @@ -274,10 +274,10 @@ jobs: # Custom toolchain script ### - name: Run custom toolchain script - if: ${{ inputs.custom_toolchain_script != ''}} + if: ${{ inputs.custom_toolchain_script }} shell: bash run: | - ${{ inputs.custom_toolchain_script }} + bash scripts/setup-custom-toolchain.sh ### # Building & testing @@ -373,10 +373,10 @@ jobs: rustup target add x86_64-apple-darwin - name: Run custom toolchain script - if: ${{ inputs.custom_toolchain_script != ''}} + if: ${{ inputs.custom_toolchain_script }} shell: bash run: | - ${{ inputs.custom_toolchain_script }} + bash scripts/setup-custom-toolchain.sh - name: Build extension shell: bash @@ -477,10 +477,10 @@ jobs: vcpkgGitCommitId: ${{ inputs.vcpkg_commit }} - name: Run custom toolchain script - if: ${{ inputs.custom_toolchain_script != ''}} + if: ${{ inputs.custom_toolchain_script }} shell: bash run: | - ${{ inputs.custom_toolchain_script }} + bash scripts/setup-custom-toolchain.sh - name: Build & test extension env: @@ -561,10 +561,10 @@ jobs: key: ${{ github.job }}-${{ matrix.duckdb_arch }} - name: Run custom toolchain script - if: ${{ inputs.custom_toolchain_script != ''}} + if: ${{ inputs.custom_toolchain_script }} shell: bash run: | - ${{ inputs.custom_toolchain_script }} + bash scripts/setup-custom-toolchain.sh - name: Build Wasm module run: | From 71c5d20ed2a52c543d17afba52f0330cfadc9408 Mon Sep 17 00:00:00 2001 From: Sam Ansmink Date: Tue, 27 Aug 2024 17:37:14 +0200 Subject: [PATCH 5/5] fix ci to point to main branch of extension template --- .github/workflows/TestCITools.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestCITools.yml b/.github/workflows/TestCITools.yml index 4b381dd..28ff218 100644 --- a/.github/workflows/TestCITools.yml +++ b/.github/workflows/TestCITools.yml @@ -17,8 +17,8 @@ jobs: uses: ./.github/workflows/_extension_distribution.yml with: extension_name: quack - override_repository: samansmink/extension-template - override_ref: add-custom-toolchain-script + override_repository: duckdb/extension-template + override_ref: main duckdb_version: v1.0.0 override_ci_tools_repository: ${{ github.repository }} override_ci_tools_ref: ${{ github.sha }}