Skip to content

persistent DuckDB connection to avoid Windows heap corruption #5

persistent DuckDB connection to avoid Windows heap corruption

persistent DuckDB connection to avoid Windows heap corruption #5

Workflow file for this run

name: Julia Fix CI
# Scoped to the julia_fix branch so it doesn't fire on every push.
# Workflow_dispatch lets you replay it manually after a force-push.
on:
push:
branches: [julia_fix]
pull_request:
branches: [julia_fix]
workflow_dispatch:
permissions:
contents: read
jobs:
build-lib:
name: libcozip (${{ matrix.name }})
strategy:
fail-fast: false
matrix:
include:
- name: linux-x86_64
runner: ubuntu-24.04
container: quay.io/pypa/manylinux_2_28_x86_64
lib_ext: so
shell: bash
- name: macos-universal
runner: macos-14
container: ''
lib_ext: dylib
shell: bash
cmake_extra: >-
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
- name: windows-x86_64
runner: windows-2022
container: ''
lib_ext: dll
shell: pwsh
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v4
# manylinux ships gcc/cmake but not ninja.
- if: startsWith(matrix.name, 'linux')
run: yum install -y ninja-build
- if: runner.os == 'macOS'
run: brew install ninja
- if: runner.os == 'Windows'
run: choco install ninja -y
# cl.exe + nmake on PATH for cmake.
- if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Configure
run: >
cmake -B build -S core -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=ON
${{ matrix.cmake_extra }}
- run: cmake --build build --config Release --parallel
- run: cmake --install build --config Release
# Julia's _resolve_lib_path expects the shared lib at the root of
# the artifact (COZIP_LIB_PATH points straight at it). No header
# or license needed for the test step.
- name: Stage lib (Unix)
if: runner.os != 'Windows'
run: |
mkdir -p staged
cp install/lib/cozip.${{ matrix.lib_ext }} staged/
- name: Stage lib (Windows)
if: runner.os == 'Windows'
run: |
New-Item -ItemType Directory -Force -Path staged | Out-Null
Copy-Item install\bin\cozip.dll staged\
- uses: actions/upload-artifact@v4
with:
name: libcozip-${{ matrix.name }}
path: staged/
if-no-files-found: error
build-julia-package:
name: Julia package (${{ matrix.name }})
needs: build-lib
strategy:
fail-fast: false
matrix:
include:
- name: linux-x86_64
runner: ubuntu-24.04
lib_ext: so
- name: macos-universal
runner: macos-14
lib_ext: dylib
- name: windows-x86_64
runner: windows-2022
lib_ext: dll
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- uses: actions/download-artifact@v4
with:
name: libcozip-${{ matrix.name }}
path: libcozip-bin/
# Override Artifacts.toml so the test uses the just-built lib,
# not whatever the last published release points at.
- name: Set COZIP_LIB_PATH (Unix)
if: runner.os != 'Windows'
run: echo "COZIP_LIB_PATH=$(pwd)/libcozip-bin/cozip.${{ matrix.lib_ext }}" >> "$GITHUB_ENV"
- name: Set COZIP_LIB_PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$p = Join-Path (Get-Location) "libcozip-bin\cozip.dll"
Add-Content -Path $env:GITHUB_ENV -Value "COZIP_LIB_PATH=$p"
- name: Test
run: julia --project=julia -e 'using Pkg; Pkg.instantiate(); Pkg.test()'