Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move close to upcoming v0.10.3, adapt to it, move to community key #71

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ concurrency:
jobs:
duckdb-stable-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v0.10.2
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
with:
duckdb_version: v0.10.2
duckdb_version: f12d6d2dc90bc7316c4e0a040abfa7fa1dea2c6c
extension_name: quack
exclude_archs: 'windows_amd64;windows_amd64_rtools;linux_amd64;linux_arm64;wasm_threads;wasm_mvp;wasm_eh'

duckdb-stable-deploy:
name: Deploy extension binaries
needs: duckdb-stable-build
uses: ./.github/workflows/_extension_deploy.yml
secrets: inherit
with:
duckdb_version: v0.10.2
exclude_archs: 'windows_amd64;windows_amd64_rtools;linux_amd64;linux_arm64;wasm_threads;wasm_mvp;wasm_eh'
duckdb_version: f12d6d2dc90bc7316c4e0a040abfa7fa1dea2c6c
extension_name: quack
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
10 changes: 8 additions & 2 deletions .github/workflows/_extension_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
exclude_archs:
required: false
type: string
default: ""
default: "windows_amd64;windows_amd64_rtools;linux_amd64;linux_arm64;wasm_threads;wasm_mvp"
# Whether to upload this deployment as the latest. This may overwrite a previous deployment.
deploy_latest:
required: false
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
DUCKDB_EXTENSION_SIGNING_PK: ${{ secrets.S3_DUCKDB_ORG_EXTENSION_SIGNING_PK }}
DUCKDB_EXTENSION_SIGNING_PK: ${{ secrets.S3_DUCKDB_ORG_COMMUNITY_SIGNING_PK }}
run: |
pwd
python3 -m pip install pip awscli
Expand All @@ -119,3 +119,9 @@ jobs:
export EXT_VERSION=`git tag --points-at HEAD`
export EXT_VERSION=${EXT_VERSION:=`git log -1 --format=%h`}
${{ inputs.deploy_script }} ${{ inputs.extension_name }} $EXT_VERSION $DUCKDB_VERSION ${{ matrix.duckdb_arch }} $BUCKET_NAME ${{inputs.deploy_latest || 'true' && 'false'}} ${{inputs.deploy_versioned || 'true' && 'false'}}

- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}2
path: |
/tmp/extension/${{ inputs.extension_name }}.duckdb_extension.*
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 1420 files
8 changes: 5 additions & 3 deletions scripts/extension-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,19 @@ if [[ $4 == wasm* ]]; then
echo -n -e '\x80\x02' >> $ext.append
fi

( command -v truncate && truncate -s -256 $ext.append ) || ( command -v gtruncate && gtruncate -s -256 $ext.append ) || exit 1

# (Optionally) Sign binary
if [ "$DUCKDB_EXTENSION_SIGNING_PK" != "" ]; then
echo "$DUCKDB_EXTENSION_SIGNING_PK" > private.pem
$script_dir/../duckdb/scripts/compute-extension-hash.sh $ext.append > $ext.hash
openssl pkeyutl -sign -in $ext.hash -inkey private.pem -pkeyopt digest:sha256 -out $ext.sign
rm -f private.pem
else
# Default to 256 zeros
dd if=/dev/zero of=$ext.sign bs=256 count=1
fi

# Signature is always there, potentially defaulting to 256 zeros
truncate -s 256 $ext.sign

# append signature to extension binary
cat $ext.sign >> $ext.append

Expand Down
1 change: 1 addition & 0 deletions src/include/quack_extension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class QuackExtension : public Extension {
public:
void Load(DuckDB &db) override;
std::string Name() override;
std::string Version() const override;
};

} // namespace duckdb
8 changes: 8 additions & 0 deletions src/quack_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ std::string QuackExtension::Name() {
return "quack";
}

std::string QuackExtension::Version() const {
#ifdef EXT_VERSION_QUACK
return EXT_VERSION_QUACK;
#else
return "";
#endif
}

} // namespace duckdb

extern "C" {
Expand Down
Loading