Skip to content

Commit 2c8c695

Browse files
committed
improve precompilation for julia
1 parent 1e1619d commit 2c8c695

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
version: '1'
3030
- uses: julia-actions/cache@v2
3131
- uses: julia-actions/julia-buildpkg@v1
32+
with:
33+
precompile: true
3234
- uses: cardinalby/export-env-action@v1
3335
with:
3436
envFile: '_environment'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.jl.cov
55
*.jl.*.cov
66
*.jl.mem
7+
78
Manifest.toml
89

910
.vscode
@@ -25,3 +26,5 @@ pyenv/
2526
/index_files/
2627
/_site/
2728
/_output/
29+
*.html
30+
/site_libs/

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
JULIA:=julia
12
QUARTO:=quarto
23

34
include _environment
45

56
default: help
67

78
render:
9+
${JULIA} --project=@. -e 'import Pkg; Pkg.instantiate(); Pkg.resolve(); Pkg.precompile(); using QuantumToolbox, HierarchicalEOM;'
10+
${JULIA} --project=@. -e 'using QuantumToolbox, HierarchicalEOM;'
811
${QUARTO} render
912

1013
preview:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Jaynes Cummings Model"
3+
# subtitle: ""
4+
author: Alberto Mercurio
5+
6+
engine: julia
7+
---
8+
9+
```{julia}
10+
using QuantumToolbox
11+
12+
QuantumToolbox.versioninfo()
13+
```

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ The tutorials are built upon [Quarto](https://quarto.org).
1414

1515
After installing both [`Julia`](https://julialang.org/) and [Quarto](https://quarto.org), the steps to build the tutorials are:
1616

17+
> [!NOTE]
18+
> All the following commands should be run under the root folder of this repository: `/path/to/qutip-julia-tutorials/`
19+
1720
### First, render the files:
1821

1922
```shell
@@ -22,6 +25,8 @@ make render
2225
or
2326
```shell
2427
source _environment
28+
julia --project=@. -e 'import Pkg; Pkg.instantiate(); Pkg.resolve(); Pkg.precompile()'
29+
julia --project=@. -e 'using QuantumToolbox, HierarchicalEOM;'
2530
quarto render
2631
```
2732

index.qmd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@ using InteractiveUtils
1111
1212
versioninfo()
1313
```
14+
15+
```{julia}
16+
using QuantumToolbox
17+
18+
QuantumToolbox.versioninfo()
19+
```
20+
21+
```{julia}
22+
using HierarchicalEOM
23+
24+
HierarchicalEOM.versioninfo()
25+
```

0 commit comments

Comments
 (0)