Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ jobs:
os: windows-latest
arch: x64
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
# Additional tests on Julia v1.7
- version: '^1.7.0-0'
os: ubuntu-latest
arch: x64
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
- version: '^1.7.0-0'
os: macOS-latest
arch: x64
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
- version: '^1.7.0-0'
os: windows-latest
arch: x64
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
steps:
- uses: actions/checkout@v2
- name: Set p4est release to run tests against
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ functions of the underlying p4est library. You can force the build script to
re-generate the bindings by setting the environment variable
`JULIA_P4EST_GENERATE_BINDINGS` to a non-empty string.

*Note: Currently, `P4est.jl` can only be used with pre-generated bindings on
Julia v1.7. See [issue #39](https://github.com/trixi-framework/P4est.jl/issues/39)
for further discussions.*

In addition, when `JULIA_P4EST_GENERATE_BINDINGS` is non-empty you can also
configure P4est.jl to use a custom build of p4est. For this, set the following
environment variables and build P4est.jl again afterwards:
Expand Down
2 changes: 0 additions & 2 deletions deps/Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[deps]
CBindingGen = "308a6e0c-0495-45e1-b1ab-67fb455a0d77"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
P4est_jll = "6b5a15aa-cf52-5330-8376-5e5d90283449"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[compat]
CBindingGen = "0.4"
MPI = "0.15, 0.16"
P4est_jll = "~2.3.1"
12 changes: 11 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using CBindingGen
using Libdl
using MPI
import Pkg.TOML
Expand Down Expand Up @@ -80,6 +79,17 @@ if isempty(config["p4est_generate_bindings"])
const pre_generated_bindings_filename = joinpath(artifact"libp4est", "libp4est.jl")
cp(pre_generated_bindings_filename, bindings_filename, force=true)
else
# Install CBindingGen locally and undo the modifications of Project.toml afterwards.
# This allows us to work around limitations of CBindingGen.jl on Julia v1.7
# while still being able to use the pre-generated bindings (but only them).
using Pkg
project_file = joinpath(@__DIR__, "Project.toml")
project_backup = joinpath(@__DIR__, "Project.toml.backup")
cp(project_file, project_backup)
Pkg.add(PackageSpec("CBindingGen", Base.UUID("308a6e0c-0495-45e1-b1ab-67fb455a0d77"), v"0.4.5"))
using CBindingGen
mv(project_backup, project_file, force=true)

# Step 2: Choose p4est library according to the settings
p4est_library = ""
if !isempty(config["p4est_library"])
Expand Down