Skip to content

Commit

Permalink
Merge branch 'master' into nz-pledgeinsize
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 authored Sep 8, 2024
2 parents 11cff42 + 6b4280e commit 9f89a86
Show file tree
Hide file tree
Showing 9 changed files with 1,453 additions and 698 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Downstream
on:
push:
branches: [master]
tags: [v*]
pull_request:

jobs:
test:
name: ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- "Arrow"
- "JLD2"
- "HDF5"
- "Parquet2"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1
arch: x64
- uses: julia-actions/julia-buildpkg@latest
- name: Load this and run the downstream tests
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.update()
Pkg.activate(;temp=true)
# force it to use this PR's version of the package
Pkg.develop([
PackageSpec(path="."),
PackageSpec(name="${{ matrix.package }}"),
])
Pkg.update()
Pkg.test("${{ matrix.package }}")
15 changes: 13 additions & 2 deletions gen/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,25 @@ using Clang.Generators
using Zstd_jll


if !@isdefined(ZSTD_STATIC_LINKING_ONLY)
const ZSTD_STATIC_LINKING_ONLY = false
end

cd(@__DIR__)

include_dir = joinpath(Zstd_jll.artifact_dir, "include") |> normpath
options = load_options(joinpath(@__DIR__, "generator.toml"))
if ZSTD_STATIC_LINKING_ONLY
@warn "Static linking only functions will be included"
options["general"]["output_file_path"] = "../test/LibZstd_clang_static.jl"
options["general"]["module_name"] = "LibZstdStatic"
end

args = get_default_args()
push!(args, "-I$include_dir")
push!(args, "-DZSTD_STATIC_LINKING_ONLY")
if ZSTD_STATIC_LINKING_ONLY
push!(args, "-DZSTD_STATIC_LINKING_ONLY")
end

headers = [joinpath(include_dir, header) for header in readdir(include_dir) if endswith(header, ".h")]

Expand Down Expand Up @@ -78,4 +89,4 @@ end
rewrite!(ctx.dag)

# print
build!(ctx, BUILDSTAGE_PRINTING_ONLY)
build!(ctx, BUILDSTAGE_PRINTING_ONLY)
2 changes: 2 additions & 0 deletions gen/static_generator.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const ZSTD_STATIC_LINKING_ONLY=true
include("generator.jl")
Loading

0 comments on commit 9f89a86

Please sign in to comment.