1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
|
name: LinuxRelease
on:
workflow_call:
inputs:
override_git_describe:
type: string
git_ref:
type: string
skip_tests:
type: string
workflow_dispatch:
inputs:
override_git_describe:
description: 'Version tag to override git describe'
type: string
git_ref:
description: 'Git ref'
type: string
skip_tests:
description: 'Pass "true" to skip tests'
type: string
push:
branches-ignore:
- 'main'
- 'feature'
- 'v*.*-*'
paths-ignore:
- '**.md'
- 'test/configs/**'
- 'tools/**'
- '!tools/shell/**'
- '.github/patches/duckdb-wasm/**'
- '.github/workflows/**'
- '!.github/workflows/LinuxRelease.yml'
merge_group:
pull_request:
types: [opened, reopened, ready_for_review, converted_to_draft]
paths-ignore:
- '**.md'
- 'test/configs/**'
- 'tools/**'
- '!tools/shell/**'
- '.github/patches/duckdb-wasm/**'
- '.github/workflows/**'
- '!.github/workflows/LinuxRelease.yml'
concurrency:
group: linuxrelease-${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}-${{ inputs.override_git_describe }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
OVERRIDE_GIT_DESCRIBE: ${{ inputs.override_git_describe }}
jobs:
check-draft:
# We run all other jobs on PRs only if they are not draft PR
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-24.04
steps:
- name: Preliminary checks on CI
run: echo "Event name is ${{ github.event_name }}"
linux-release-cli:
needs:
- check-draft
strategy:
fail-fast: false
matrix:
config: [ { runner: ubuntu-latest, arch: amd64, image: x86_64}, {runner: ubuntu-24.04-arm, arch: arm64, image: aarch64}]
name: Linux CLI (${{ matrix.config.arch }})
runs-on: ${{ matrix.config.runner }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}
- uses: ./.github/actions/cleanup_runner
- name: Install pytest
run: |
python3 -m pip install pytest
- name: Build
shell: bash
run: |
export PWD=`pwd`
docker run \
-v$PWD:$PWD \
-e GEN=ninja \
-e CC='ccache gcc' \
-e CXX='ccache g++' \
-e CCACHE_DIR=$PWD/.ccache \
-e OVERRIDE_GIT_DESCRIBE=$OVERRIDE_GIT_DESCRIBE \
-e EXTENSION_CONFIGS="$PWD/.github/config/bundled_extensions.cmake" \
-e ENABLE_EXTENSION_AUTOLOADING=1 \
-e ENABLE_EXTENSION_AUTOINSTALL=1 \
-e BUILD_BENCHMARK=1 \
-e FORCE_WARN_UNUSED=1 \
quay.io/pypa/manylinux_2_28_${{ matrix.config.image }} \
bash -c "
set -e
cat /etc/os-release
dnf install -y \
ccache \
ninja-build \
perl-IPC-Cmd
git config --global --add safe.directory $PWD
make -C $PWD
"
- name: Print platform
shell: bash
run: ./build/release/duckdb -c "PRAGMA platform;"
- name: Deploy
shell: bash
env:
AWS_ENDPOINT_URL: ${{ secrets.S3_DUCKDB_STAGING_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
python3 scripts/amalgamation.py
zip -j duckdb_cli-linux-${{ matrix.config.arch }}.zip build/release/duckdb
gzip -9 -k -n -c build/release/duckdb > duckdb_cli-linux-${{ matrix.config.arch }}.gz
zip -j libduckdb-linux-${{ matrix.config.arch }}.zip build/release/src/libduckdb*.* src/amalgamation/duckdb.hpp src/include/duckdb.h
./scripts/upload-assets-to-staging.sh github_release libduckdb-linux-${{ matrix.config.arch }}.zip duckdb_cli-linux-${{ matrix.config.arch }}.zip duckdb_cli-linux-${{ matrix.config.arch }}.gz
- uses: actions/upload-artifact@v4
with:
name: duckdb-binaries-linux-${{ matrix.config.arch }}
path: |
libduckdb-linux-${{ matrix.config.arch }}.zip
duckdb_cli-linux-${{ matrix.config.arch }}.zip
duckdb_cli-linux-${{ matrix.config.arch }}.gz
- name: Test
shell: bash
if: ${{ inputs.skip_tests != 'true' }}
run: |
python3 scripts/run_tests_one_by_one.py build/release/test/unittest "*" --time_execution
- name: Release specific tests
shell: bash
run: |
./build/release/test/unittest --select-tag release
- name: Tools Tests
shell: bash
run: |
python3 -m pytest tools/shell/tests --shell-binary build/release/duckdb
- name: Examples
shell: bash
run: |
build/release/benchmark/benchmark_runner benchmark/micro/update/update_with_join.benchmark
build/release/duckdb -c "COPY (SELECT 42) TO '/dev/stdout' (FORMAT PARQUET)" | cat
linux-musl-release-cli:
needs:
- check-draft
strategy:
fail-fast: false
matrix:
config: [ { runner: ubuntu-latest, arch: amd64}, {runner: ubuntu-24.04-arm, arch: arm64}]
name: Linux CLI (${{ matrix.config.arch }}-musl)
runs-on: ${{ matrix.config.runner }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}
- uses: ./.github/actions/cleanup_runner
- name: Build
shell: bash
run: |
export PWD=`pwd`
docker run \
-v$PWD:$PWD \
-e GEN=ninja \
-e CC='ccache gcc' \
-e CXX='ccache g++' \
-e CCACHE_DIR=$PWD/.ccache \
-e OVERRIDE_GIT_DESCRIBE=$OVERRIDE_GIT_DESCRIBE \
-e EXTENSION_CONFIGS="$PWD/.github/config/bundled_extensions.cmake" \
-e ENABLE_EXTENSION_AUTOLOADING=1 \
-e ENABLE_EXTENSION_AUTOINSTALL=1 \
-e BUILD_BENCHMARK=1 \
-e FORCE_WARN_UNUSED=1 \
alpine:3.22 \
sh -c "
set -e
cat /etc/os-release
apk add \
ccache \
cmake \
g++ \
git \
make \
samurai
git config --global --add safe.directory $PWD
make -C $PWD
"
- name: Deploy
shell: bash
env:
AWS_ENDPOINT_URL: ${{ secrets.S3_DUCKDB_STAGING_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
python3 scripts/amalgamation.py
zip -j duckdb_cli-linux-${{ matrix.config.arch }}-musl.zip build/release/duckdb
gzip -9 -k -n -c build/release/duckdb > duckdb_cli-linux-${{ matrix.config.arch }}-musl.gz
zip -j libduckdb-linux-${{ matrix.config.arch }}-musl.zip build/release/src/libduckdb*.* src/amalgamation/duckdb.hpp src/include/duckdb.h
./scripts/upload-assets-to-staging.sh github_release libduckdb-linux-${{ matrix.config.arch }}-musl.zip duckdb_cli-linux-${{ matrix.config.arch }}-musl.zip duckdb_cli-linux-${{ matrix.config.arch }}-musl.gz
- uses: actions/upload-artifact@v4
with:
name: duckdb-binaries-linux-${{ matrix.config.arch }}-musl
path: |
libduckdb-linux-${{ matrix.config.arch }}-musl.zip
duckdb_cli-linux-${{ matrix.config.arch }}-musl.zip
duckdb_cli-linux-${{ matrix.config.arch }}-musl.gz
- name: Test
shell: bash
if: ${{ inputs.skip_tests != 'true' }}
run: |
export PWD=`pwd`
docker run \
-v$PWD:$PWD \
alpine:3.22 \
sh -c "
set -e
cat /etc/os-release
apk add \
python3 \
py3-pytest
cd $PWD
echo Tests
python3 scripts/run_tests_one_by_one.py build/release/test/unittest \"*\" --time_execution
echo Release specific tests
./build/release/test/unittest --select-tag release
echo Tools Tests
python3 -m pytest tools/shell/tests --shell-binary build/release/duckdb
echo Examples
build/release/benchmark/benchmark_runner benchmark/micro/update/update_with_join.benchmark
build/release/duckdb -c \"COPY (SELECT 42) TO '/dev/stdout' (FORMAT PARQUET)\" | cat
"
upload-libduckdb-src:
name: Upload libduckdb-src.zip
needs: linux-release-cli
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}
- name: Deploy
shell: bash
env:
AWS_ENDPOINT_URL: ${{ secrets.S3_DUCKDB_STAGING_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
python3 scripts/amalgamation.py
zip -j libduckdb-src.zip src/amalgamation/duckdb.hpp src/amalgamation/duckdb.cpp src/include/duckdb.h src/include/duckdb_extension.h
./scripts/upload-assets-to-staging.sh github_release libduckdb-src.zip
symbol-leakage:
name: Symbol Leakage
runs-on: ubuntu-22.04
needs: linux-release-cli
if: ${{ inputs.skip_tests != 'true' }}
env:
GEN: ninja
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Ninja
shell: bash
run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build
- uses: ./.github/actions/ccache-action
- name: Build
shell: bash
run: make
- name: Symbol Leakage Test
shell: bash
run: python3 scripts/exported_symbols_check.py build/release/src/libduckdb*.so
- name: Banned Symbol Check
shell: bash
run: python3 scripts/banned_symbols_check.py --directory build/release/src
|