Skip to content

Commit 4a63f05

Browse files
authored
Merge branch 'main' into dev/Metal
2 parents 3cc4b9f + 1b48458 commit 4a63f05

File tree

119 files changed

+8915
-2685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+8915
-2685
lines changed

.buildkite/CUDA_Ext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ steps:
44
setup:
55
version:
66
- "1.10" # oldest
7-
#- "1" # latest
7+
- "1" # latest
88
plugins:
99
- JuliaCI/julia#v1:
1010
version: "{{matrix.version}}"

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
- "src/**"
1010
- "ext/QuantumToolboxCUDAExt.jl"
1111
- "test/runtests.jl"
12-
- "test/ext-test/cuda_ext.jl"
12+
- "test/ext-test/gpu/**"
1313
- "Project.toml"
1414
target: ".buildkite/CUDA_Ext.yml"
1515
- staticfloat/forerunner: # Metal.jl tests

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ body:
1616
label: Code to Reproduce the Bug
1717
description: Please provide a minimal working example. Paste your code directly (It will be automatically formatted, so there's no need for backticks)
1818
placeholder: "using QuantumToolbox\nprint(qeye(2))"
19-
render: shell
19+
render: julia
2020
- type: textarea
2121
id: bug-output
2222
attributes:
@@ -37,7 +37,7 @@ body:
3737
attributes:
3838
label: Your Environment
3939
description: Please use `QuantumToolbox.about()` or `QuantumToolbox.versioninfo()` to get the information about your environment and paste it here (automatically formatted)
40-
placeholder: "Julia Ver. ***\nQuantumToolbox Ver. ***\nLinearSolve Ver. ***\nOrdinaryDiffEqCore Ver. ***\nOS : ***\nWORD_SIZE: ***\nLIBM : ***\nLLVM : ***\nBLAS : ***"
40+
placeholder: "Julia Ver. ***\nQuantumToolbox Ver. ***\nSciMLOperators Ver. ***\nLinearSolve Ver. ***\nOrdinaryDiffEqCore Ver. ***\nOS : ***\nWORD_SIZE: ***\nLIBM : ***\nLLVM : ***\nBLAS : ***"
4141
render: shell
4242
validations:
4343
required: true

.github/pull_request_template.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
## Checklist
22
Thank you for contributing to `QuantumToolbox.jl`! Please make sure you have finished the following tasks before opening the PR.
33

4-
- [ ] Please read [Contributor Covenant Code of Conduct](https://github.com/qutip/QuantumToolbox.jl/blob/main/CODE_OF_CONDUCT.md)
5-
- [ ] Any code changes were done in a way that does not break public API
6-
- [ ] Appropriate tests were added.
7-
- [ ] Any code changes should be formatted by running: `julia -e 'using JuliaFormatter; format(".")'`
8-
- [ ] All documentation (in `docs/` folder) related to code changes were updated.
4+
- [ ] Please read [Contributing to QuantumToolbox.jl](https://qutip.org/QuantumToolbox.jl/stable/resources/contributing).
5+
- [ ] Any code changes were done in a way that does not break public API.
6+
- [ ] Appropriate tests were added and tested locally by running: `make test`.
7+
- [ ] Any code changes should be `julia` formatted by running: `make format`.
8+
- [ ] All documents (in `docs/` folder) related to code changes were updated and able to build locally by running: `make docs`.
9+
- [ ] (If necessary) the `CHANGELOG.md` should be updated (regarding to the code changes) and built by running: `make changelog`.
910

1011
Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a [Draft Pull Request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to let the others know this on-going work.
1112

1213
## Description
1314
Describe the proposed change here.
1415

1516
## Related issues or PRs
16-
Please mention the related issues or PRs here. If the PR fixes an issue, use the keyword close/closes/closed/fix/fixes/fixed/resolve/resolves/resolved followed by the issue id, e.g. fix #1234
17+
Please mention the related issues or PRs here. If the PR fixes an issue, use the keyword close/closes/closed/fix/fixes/fixed/resolve/resolves/resolved followed by the issue id, e.g. fix #[id]
1718

18-
## Additional context
19+
## Additional context

.github/workflows/Benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
Pkg.instantiate();
5050
include("runbenchmarks.jl")'
5151
52+
# this will update benchmarks/data.js in gh-pages branch
5253
- name: Parse & Upload Benchmark Results
5354
uses: benchmark-action/github-action-benchmark@v1
5455
with:
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Runtests (Julia nightly)
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- '.github/workflows/CI-Julia-nightly.yml'
9+
- 'src/**'
10+
- 'ext/**'
11+
- 'test/runtests.jl'
12+
- 'test/core-test/**'
13+
- 'Project.toml'
14+
pull_request:
15+
branches:
16+
- 'main'
17+
paths:
18+
- '.github/workflows/CI-Julia-nightly.yml'
19+
- 'src/**'
20+
- 'ext/**'
21+
- 'test/runtests.jl'
22+
- 'test/core-test/**'
23+
- 'Project.toml'
24+
types:
25+
- opened
26+
- reopened
27+
- synchronize
28+
- ready_for_review
29+
30+
jobs:
31+
test:
32+
name: ${{ matrix.os }} - ${{ matrix.arch }} ( ${{ matrix.group }} )
33+
runs-on: ${{ matrix.os }}
34+
permissions: # needed to allow julia-actions/cache to delete old caches that it has created
35+
actions: write
36+
contents: read
37+
if: ${{ !github.event.pull_request.draft }}
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
version:
42+
- 'nightly'
43+
os:
44+
- 'ubuntu-latest'
45+
arch:
46+
- 'x64'
47+
group:
48+
- 'Core'
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: julia-actions/setup-julia@v2
53+
with:
54+
version: ${{ matrix.version }}
55+
arch: ${{ matrix.arch }}
56+
- uses: julia-actions/cache@v2
57+
- uses: julia-actions/julia-buildpkg@v1
58+
- uses: julia-actions/julia-runtest@v1
59+
env:
60+
GROUP: ${{ matrix.group }}

.github/workflows/CI.yml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'ext/**'
1111
- 'test/runtests.jl'
1212
- 'test/core-test/**'
13+
- 'test/ext-test/cairomakie/**'
1314
- 'Project.toml'
1415
pull_request:
1516
branches:
@@ -20,6 +21,7 @@ on:
2021
- 'ext/**'
2122
- 'test/runtests.jl'
2223
- 'test/core-test/**'
24+
- 'test/ext-test/cairomakie/**'
2325
- 'Project.toml'
2426
types:
2527
- opened
@@ -29,8 +31,8 @@ on:
2931

3032
jobs:
3133
test:
32-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} ( ${{ matrix.group }} )
33-
runs-on: ${{ matrix.os }}
34+
name: Julia ${{ matrix.version }} - ${{ matrix.node.os }} - ${{ matrix.node.arch }} ( ${{ matrix.group }} )
35+
runs-on: ${{ matrix.node.os }}
3436
permissions: # needed to allow julia-actions/cache to delete old caches that it has created
3537
actions: write
3638
contents: read
@@ -41,53 +43,48 @@ jobs:
4143
# for core tests (latest and oldest supported versions)
4244
version:
4345
- '1.10' # oldest
44-
# - '1' # latest
45-
os:
46-
- ubuntu-latest
47-
- windows-latest
48-
arch:
49-
- x64
46+
- '1' # latest
47+
node:
48+
- os: 'ubuntu-latest'
49+
arch: 'x64'
50+
- os: 'windows-latest'
51+
arch: 'x64'
52+
- os: 'macOS-latest'
53+
arch: 'arm64'
5054
group:
51-
- Core
55+
- 'Core'
5256

5357
include:
54-
# for core tests on macOS (M-series chip)
55-
- version: '1.10' # oldest
56-
os: 'macOS-latest'
57-
arch: 'x64'
58-
group: 'Core'
59-
# - version: '1' # latest
60-
# os: 'macOS-latest'
61-
# arch: 'arm64'
62-
# group: 'Core'
63-
6458
# for core tests (intermediate versions)
6559
# - version: '1.x'
66-
# os: 'ubuntu-latest'
67-
# arch: 'x64'
60+
# node:
61+
# os: 'ubuntu-latest'
62+
# arch: 'x64'
6863
# group: 'Core'
6964

70-
# for code quality tests
65+
# for extension tests
7166
- version: '1'
72-
os: 'ubuntu-latest'
73-
arch: 'x64'
74-
group: 'Code-Quality'
67+
node:
68+
os: 'ubuntu-latest'
69+
arch: 'x64'
70+
group: 'CairoMakie_Ext'
7571

7672
steps:
7773
- uses: actions/checkout@v4
7874
- uses: julia-actions/setup-julia@v2
7975
with:
8076
version: ${{ matrix.version }}
81-
arch: ${{ matrix.arch }}
77+
arch: ${{ matrix.node.arch }}
8278
- uses: julia-actions/cache@v2
8379
- uses: julia-actions/julia-buildpkg@v1
8480
- uses: julia-actions/julia-runtest@v1
8581
env:
8682
GROUP: ${{ matrix.group }}
83+
JULIA_NUM_THREADS: auto
8784
- uses: julia-actions/julia-processcoverage@v1
8885
with:
8986
directories: src,ext
90-
- uses: codecov/codecov-action@v4
87+
- uses: codecov/codecov-action@v5
9188
env:
9289
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9390
with:
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Enforces the update of the file CHANGELOG.md on every pull request
2+
# Can be skipped with the `Skip ChangeLog` label
3+
name: ChangeLog Update Check
4+
on:
5+
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
7+
8+
jobs:
9+
changelog:
10+
runs-on: ubuntu-latest
11+
if: ${{ !github.event.pull_request.draft }}
12+
steps:
13+
# check whether CHANGELOG.md is updated
14+
- uses: dangoslen/changelog-enforcer@v3
15+
with:
16+
skipLabels: 'Skip ChangeLog'
17+
18+
# check whether the format of CHANGELOG.md is correct
19+
- uses: actions/checkout@v4
20+
- uses: julia-actions/setup-julia@v2
21+
with:
22+
version: '1'
23+
- name: Install and Run Changelog
24+
run: |
25+
julia -e 'import Pkg; Pkg.add("Changelog")'
26+
julia -e 'using Changelog; Changelog.generate(Changelog.CommonMark(), "CHANGELOG.md"; repo = "qutip/QuantumToolbox.jl")'
27+
28+
- name: CHANGELOG Format Check
29+
run: |
30+
julia -e '
31+
output = Cmd(`git diff --name-only`) |> read |> String
32+
if output == ""
33+
exit(0)
34+
else
35+
@error "The format of CHANGELOG.md is not correct !!!"
36+
write(stdout, "Please format it by running the following command:\n")
37+
write(stdout, "make changelog")
38+
exit(1)
39+
end'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Cleanup Preview Documentation
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
cleanup-preview-doc:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout gh-pages branch
12+
uses: actions/checkout@v4
13+
with:
14+
ref: gh-pages
15+
- name: Delete preview and history + push changes
16+
run: |
17+
if [ -d "previews/PR$PRNUM" ]; then
18+
git config user.name "Documenter.jl"
19+
git config user.email "[email protected]"
20+
git rm -rf "previews/PR$PRNUM"
21+
git commit -m "delete preview"
22+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
23+
git push --force origin gh-pages-new:gh-pages
24+
fi
25+
env:
26+
PRNUM: ${{ github.event.number }}

.github/workflows/Code-Quality.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- '.github/workflows/Code-Quality.yml'
9+
- 'src/**'
10+
- 'ext/**'
11+
- 'test/runtests.jl'
12+
- 'test/core-test/**'
13+
- 'Project.toml'
14+
pull_request:
15+
branches:
16+
- 'main'
17+
paths:
18+
- '.github/workflows/Code-Quality.yml'
19+
- 'src/**'
20+
- 'ext/**'
21+
- 'test/runtests.jl'
22+
- 'test/core-test/**'
23+
- 'Project.toml'
24+
types:
25+
- opened
26+
- reopened
27+
- synchronize
28+
- ready_for_review
29+
30+
jobs:
31+
test:
32+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
33+
runs-on: ${{ matrix.os }}
34+
permissions: # needed to allow julia-actions/cache to delete old caches that it has created
35+
actions: write
36+
contents: read
37+
if: ${{ !github.event.pull_request.draft }}
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
version:
42+
- 'lts'
43+
os:
44+
- 'ubuntu-latest'
45+
arch:
46+
- 'x64'
47+
group:
48+
- 'Code-Quality'
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: julia-actions/setup-julia@v2
53+
with:
54+
version: ${{ matrix.version }}
55+
arch: ${{ matrix.arch }}
56+
- uses: julia-actions/cache@v2
57+
- uses: julia-actions/julia-buildpkg@v1
58+
- uses: julia-actions/julia-runtest@v1
59+
env:
60+
GROUP: ${{ matrix.group }}

0 commit comments

Comments
 (0)