Skip to content

Commit 71d34f9

Browse files
authored
CI on Julia v1.7 (#37)
* CI on Julia v1.7 * remove CBindingGen from deps/Project.toml and use a wrokaround * enable Julia v1.6 tests again * mention restriction on Julia v1.7 * allow failures of new Julia v1.7 jobs * add new workflow for Julia v1.7 * Revert "allow failures of new Julia v1.7 jobs" This reverts commit dacc3ed. * remove v1.7 tests from standard ci * remove finish step for v1.7 CI * fix aaf65ce * remove extra CI on Julia v1.7 and add working setups to standard CI
1 parent dce3abe commit 71d34f9

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ jobs:
6060
os: windows-latest
6161
arch: x64
6262
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
63+
# Additional tests on Julia v1.7
64+
- version: '^1.7.0-0'
65+
os: ubuntu-latest
66+
arch: x64
67+
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
68+
- version: '^1.7.0-0'
69+
os: macOS-latest
70+
arch: x64
71+
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
72+
- version: '^1.7.0-0'
73+
os: windows-latest
74+
arch: x64
75+
p4est_test: P4EST_JLL_NON_MPI_PRE_GENERATED_BINDINGS
6376
steps:
6477
- uses: actions/checkout@v2
6578
- name: Set p4est release to run tests against

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ functions of the underlying p4est library. You can force the build script to
3434
re-generate the bindings by setting the environment variable
3535
`JULIA_P4EST_GENERATE_BINDINGS` to a non-empty string.
3636

37+
*Note: Currently, `P4est.jl` can only be used with pre-generated bindings on
38+
Julia v1.7. See [issue #39](https://github.com/trixi-framework/P4est.jl/issues/39)
39+
for further discussions.*
40+
3741
In addition, when `JULIA_P4EST_GENERATE_BINDINGS` is non-empty you can also
3842
configure P4est.jl to use a custom build of p4est. For this, set the following
3943
environment variables and build P4est.jl again afterwards:

deps/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
[deps]
2-
CBindingGen = "308a6e0c-0495-45e1-b1ab-67fb455a0d77"
32
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
43
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
54
P4est_jll = "6b5a15aa-cf52-5330-8376-5e5d90283449"
65
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
76

87
[compat]
9-
CBindingGen = "0.4"
108
MPI = "0.15, 0.16"
119
P4est_jll = "~2.3.1"

deps/build.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using CBindingGen
21
using Libdl
32
using MPI
43
import Pkg.TOML
@@ -80,6 +79,17 @@ if isempty(config["p4est_generate_bindings"])
8079
const pre_generated_bindings_filename = joinpath(artifact"libp4est", "libp4est.jl")
8180
cp(pre_generated_bindings_filename, bindings_filename, force=true)
8281
else
82+
# Install CBindingGen locally and undo the modifications of Project.toml afterwards.
83+
# This allows us to work around limitations of CBindingGen.jl on Julia v1.7
84+
# while still being able to use the pre-generated bindings (but only them).
85+
using Pkg
86+
project_file = joinpath(@__DIR__, "Project.toml")
87+
project_backup = joinpath(@__DIR__, "Project.toml.backup")
88+
cp(project_file, project_backup)
89+
Pkg.add(PackageSpec("CBindingGen", Base.UUID("308a6e0c-0495-45e1-b1ab-67fb455a0d77"), v"0.4.5"))
90+
using CBindingGen
91+
mv(project_backup, project_file, force=true)
92+
8393
# Step 2: Choose p4est library according to the settings
8494
p4est_library = ""
8595
if !isempty(config["p4est_library"])

0 commit comments

Comments
 (0)