Skip to content

Commit

Permalink
Full reimplementation using CxxWrap instead of Cxx.
Browse files Browse the repository at this point in the history
This dramatic change was required to work with Julia releases. Previous code could not work with releases > 1.3. Contrary to Cxx, which was providing dynamic access to the full C++ API, CxxWrap requires writing C++ wrapping code for each type and function/method to bind. Wrapper code has been written, thanks to automatic code generation, for a number of ROOT C++ classes and their methods. More work is needed to cover the full C++ API.

The code is essentially the one from the ex002-ROOT example of wrapit (release 1.3.1) packages. Mechanism to allow installation from the package manager, including installation of the ROOT C++ libraries was added. The ROOT C++ libraries are currently not available as a _jll package due to difficulties encountered with the cross-compilation required by the Julia binary distribution system.
  • Loading branch information
grasph committed Jun 2, 2024
1 parent a7d72d6 commit 4041abb
Show file tree
Hide file tree
Showing 59 changed files with 17,886 additions and 236 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
36 changes: 36 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#This file is kept almost identical to test-macos
#We use two files in order to get two distinct badges for Linux and macOS.
name: Linux
on:
- push
- pull_request

defaults:
run:
shell: bash

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- 'nightly'
os:
- ubuntu-latest
# - macOS-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
36 changes: 36 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#This file is kept almost identical to test-macos
#We use two files in order to get two distinct badges for Linux and macOS.
name: macOS
on:
- push
- pull_request

defaults:
run:
shell: bash

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- 'nightly'
os:
# - ubuntu-latest
- macOS-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,15 @@
*.jl.mem
.ipynb_checkpoints
.vscode
Manifest.toml
build.log
Manifest.toml
deps/build.log
deps/deps.jl
test/demo_ROOT.png
test/demo_ROOT_out.root
test/demo_TGraph.png
test/demo_fit_with_jl_func.png
test/demo_fit_with_jl_func_2.png
test/test1.root
test/test2.root
test/test3.root
21 changes: 17 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
name = "ROOT"
uuid = "1706fdcc-8426-44f1-a283-5be479e9517c"
version = "0.3.0-DEV"
version = "0.3.0"
authors = ["Philippe Gras CEA/IRFU"]

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Cxx = "a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4"

[extras]
UnROOT = "3cd96dde-e98d-4713-81e9-a4a1b0235ce9"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
julia = "1.3"
julia = "1.6"
CxxWrap = "0.14"

[targets]
test = ["Test", "UnROOT"]
Loading

0 comments on commit 4041abb

Please sign in to comment.