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
5 changes: 0 additions & 5 deletions .coverage/.gitignore

This file was deleted.

139 changes: 99 additions & 40 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,68 +14,125 @@ on:
pull_request:
branches:
- master
# Keep a warm `julia-actions/cache` entry on the default branch
schedule:
- cron: '0 4 * * 1,4'
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
permissions:
contents: read
env:
GKSwstype: 100
JULIA_PKG_PRECOMPILE_AUTO: false
ENVCHECK_URL: https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/refs/heads/master/scripts/envcheck.jl
jobs:
test:
name: Test ${{ matrix.title }}
runs-on: ${{ matrix.os }}
name: Test (Julia ${{ matrix.version }})
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: write # for julia-actions/cache to delete the caches it created
contents: read
strategy:
fail-fast: false
matrix:
include:
- title: 'Linux - Latest'
os: ubuntu-latest
version: '1'
version:
- '1'
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v3
- name: "Instantiate test environment"
run: |
wget https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/scripts/installorg.jl
julia --project=test installorg.jl --no-precompile
- name: "Run tests"
shell: julia --color=yes --project=test --code-coverage="@" --depwarn="yes" --check-bounds="yes" {0}
- name: "Check for unreleased sibling packages"
run: |
include(joinpath(pwd(), "test", "runtests.jl"))
- name: "Run upstream GRAPE tests"
shell: julia --color=yes --project=test --code-coverage="@" --depwarn="yes" --check-bounds="yes" {0}
run: |
import GRAPE
include(pkgdir(GRAPE, "test", "runtests.jl"))
curl -fsSL -o "$RUNNER_TEMP/envcheck.jl" "$ENVCHECK_URL"
julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" warn-sources test
- uses: julia-actions/julia-runtest@v1
- name: "Check for held-back dependencies"
run: julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" held-back test
- uses: julia-actions/julia-processcoverage@v1
- name: "Summarize coverage"
run: julia --project=test -e 'using QuantumControlTestUtils; show_coverage();'
shell: julia --startup-file=no {0}
run: |
import Pkg
Pkg.activate(; temp = true)
Pkg.add(["CoverageTools", "LocalCoverage"])
import CoverageTools
import LocalCoverage
coverage = CoverageTools.LCOV.readfile("lcov.info")
show(stdout, LocalCoverage.eval_coverage_metrics(coverage, pwd()))
- uses: codecov/codecov-action@v7
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
testoldest:
name: Test (oldest Julia, lowest compat bounds)
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: write # for julia-actions/cache to delete the caches it created
contents: read
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: 'min'
- uses: julia-actions/cache@v3
- name: "Check for unreleased sibling packages"
run: |
curl -fsSL -o "$RUNNER_TEMP/envcheck.jl" "$ENVCHECK_URL"
julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" warn-sources test
- name: "Resolve lowest compatible versions"
uses: julia-actions/julia-downgrade-compat@v2
with:
projects: ".,test"
mode: "alldeps"
julia_version: "min" # must match the Julia version of the job
- name: "Instantiate test environment"
# Julia 1.10 ignores `[sources]`, so they are applied explicitly. The
# downgrade also floors the test-only dependencies (including sibling
# packages) to versions that may not be compatible with the package;
# pinning the dependencies of the package to their lowest versions
# re-resolves the remaining test dependencies.
run: |
cp test/Manifest.toml test/Manifest.lowest.toml
julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" apply-sources test
julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" pin-lowest test test/Manifest.lowest.toml
- name: "Run tests"
run: julia --color=yes --project=test --depwarn=yes --check-bounds=yes -e 'include("test/runtests.jl")'
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: write # for julia-actions/cache to delete the caches it created
contents: write # for Documenter to deploy to the `gh-pages` branch
statuses: write
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/cache@v3
- run: |
# Install Python dependencies
set -x
/usr/bin/python3 -m pip install zip-files
- name: Instantiate Pkg
- name: "Check for unreleased sibling packages"
run: |
wget https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/scripts/installorg.jl
julia --project=docs installorg.jl
- name: Make documentations
curl -fsSL -o "$RUNNER_TEMP/envcheck.jl" "$ENVCHECK_URL"
julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" warn-sources docs
- name: "Instantiate build environment"
run: julia --project=docs -e 'using Pkg; Pkg.instantiate()'
- name: "Build documentation"
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- name: "Install Python dependencies"
run: |
set -x
/usr/bin/python3 -m pip install zip-files
- name: Zip the HTML documentation
run: zip-folder --debug --auto-root --outfile "docs.zip" docs/build
- uses: actions/upload-artifact@v7
Expand All @@ -90,15 +147,20 @@ jobs:
codestyle:
name: Codestyle
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
actions: write # for julia-actions/cache to delete the caches it created
contents: read
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/cache@v3
- name: Get typos settings
run: wget https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/typos.toml
- name: Spell Check
uses: crate-ci/typos@master
uses: crate-ci/typos@v1.50.0
- name: Version Check
shell: julia {0}
run: |
Expand All @@ -117,7 +179,9 @@ jobs:
@error "Invalid version $VERSION on release branch"
exit(1)
end
elseif (ENV["GITHUB_REF_TYPE"] == "branch") && (BRANCH != "master")
elseif ENV["GITHUB_REF_TYPE"] == "branch"
# Any branch other than a release branch (master included) must
# carry a dev suffix; release versions live only on release-* branches.
if ("dev" in VERSION.prerelease) || ("dev" in VERSION.build)
println("Version $VERSION OK with dev-suffix on $BRANCH")
else
Expand All @@ -128,17 +192,12 @@ jobs:
println("Version $VERSION OK on $BRANCH")
end
exit(0)
- name: Changelog Check
run: julia test/check_changelog.jl
- name: Get codestyle settings
run: wget https://raw.githubusercontent.com/JuliaQuantumControl/JuliaQuantumControl/master/.JuliaFormatter.toml
- name: Install JuliaFormatter and format
shell: julia {0}
- name: "Check [sources]"
run: |
using Pkg
Pkg.add(PackageSpec(name="JuliaFormatter", version="2.3.0"))
using JuliaFormatter
format(".", verbose=true)
curl -fsSL -o "$RUNNER_TEMP/envcheck.jl" "$ENVCHECK_URL"
julia --startup-file=no "$RUNNER_TEMP/envcheck.jl" lint
- name: "Apply code style and check changelog"
run: make codestyle
- name: Format Check
shell: julia {0}
run: |
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/GRAPE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-FileCopyrightText: © 2022 Michael Goerz <mail@michaelgoerz.net>
#
# SPDX-License-Identifier: MIT OR CC0-1.0

# Run the tests of the downstream GRAPE package (master branch) against the
# current QuantumGradientGenerators. This is informational: a failure indicates
# that GRAPE must be adapted, which does not necessarily block changes in
# QuantumGradientGenerators.
name: Test downstream GRAPE
on:
push:
branches:
- master
- dev
- 'release-*'
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
permissions:
contents: read
env:
GKSwstype: 100
jobs:
test-grape:
name: Test GRAPE
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
permissions:
actions: write # for julia-actions/cache to delete the caches it created
contents: read
steps:
- uses: actions/checkout@v7
with:
path: QuantumGradientGenerators.jl
- uses: actions/checkout@v7
with:
repository: JuliaQuantumControl/GRAPE.jl
path: GRAPE.jl
- uses: julia-actions/setup-julia@v3
with:
# Requires Julia >= 1.13: `Pkg.develop` fails on earlier versions if
# the GRAPE test environment has a URL `[sources]` entry for
# QuantumGradientGenerators
version: '1'
- uses: julia-actions/cache@v3
- name: "Instantiate GRAPE test environment with the current QuantumGradientGenerators"
working-directory: GRAPE.jl
shell: julia --color=yes --project=test {0}
run: |
import Pkg
Pkg.develop(path = joinpath("..", "QuantumGradientGenerators.jl"))
Pkg.instantiate()
Pkg.status()
- name: "Run GRAPE tests"
working-directory: GRAPE.jl
run: julia --color=yes --project=test --depwarn=yes --check-bounds=yes -e 'include("test/runtests.jl")'
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

*.jl.*.cov
*.jl.cov
*.jl.*.mem
*.jl.mem
/lcov.info
Manifest.toml
/docs/build/
/coverage/
/gh-pages/
/.JuliaFormatter.toml
/lcov.info
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Also see the [GitHub Releases](https://github.com/JuliaQuantumControl/QuantumGra

* Fixed: `eachindex` is now defined for a `GradVector` that supports the vector interface. This is required for propagation with ExponentialUtilities ≥ 1.34
* Changed: The minimum supported Julia version is now 1.10 (LTS)
* Fixed: The lower compat bound for `QuantumControl` is now 0.11.4. Earlier versions of `QuantumControl` allow `QuantumPropagators` < 0.9, which lacks `supports_matrix_interface`

## [v0.1.9] — 2026-06-20

Expand Down
Loading
Loading