Skip to content

change: Use new parametrization scheme for gates #167

change: Use new parametrization scheme for gates

change: Use new parametrization scheme for gates #167

Workflow file for this run

name: CI
# Run on main, any tag or any pull request
on:
pull_request:
branches:
- main
push:
branches:
- main
tags: '*'
concurrency:
# cancel in progress builds for pull requests
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startswith(github.ref, 'refs/pull/') }}
jobs:
os-test:
runs-on: ${{ matrix.os }}
# don't run on draft PRs
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# allow windows to fail
continue-on-error: ${{ matrix.os == 'windows-latest' }}
strategy:
fail-fast: true
max-parallel: 2
matrix:
group:
- Braket-unit
- PyBraket-unit
os: [windows-latest, macOS-latest]
arch: ['x64']
steps:
- uses: actions/checkout@v1
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: 1.9
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- name: "Dev PyBraket package on Windows"
if: ${{ matrix.os == 'windows-latest' }}
run: |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), \"PyBraket\"))'
# must escape for windows
- name: "Dev PyBraket package on OSX"
if: ${{ matrix.os == 'macOS-latest' }}
run: |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))'
- name: "Run tests"
uses: julia-actions/julia-runtest@v1
env:
GROUP: ${{ matrix.group }}
BRAKET_CI: true
JULIA_CONDAPKG_VERBOSITY: 2
version-test:
runs-on: ubuntu-latest
# don't run on draft PRs
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# allow failures on nightly or beta Julia
continue-on-error: ${{ matrix.version == 'nightly'}}
strategy:
fail-fast: true
max-parallel: 2
matrix:
group:
- Braket-unit
- PyBraket-unit
version: ['1.6', '1.7', '1.8', '1.9', 'nightly']
arch: ['x64']
steps:
- uses: actions/checkout@v1
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- name: "Dev PyBraket package"
run: |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))'
- name: "Run tests"
uses: julia-actions/julia-runtest@v1
env:
JULIA_CONDAPKG_VERBOSITY: 2
BRAKET_CI: true
GROUP: ${{ matrix.group }}
- name: "Process coverage"
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,PyBraket/src
- name: "Upload coverage"
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
examples:
name: Example notebooks
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
needs: [os-test, version-test]
strategy:
fail-fast: true
matrix:
group:
- Examples-unit
version: ['1.9']
arch: ['x64']
steps:
- uses: actions/checkout@v1
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- name: "Dev PyBraket package"
run: |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))'
- name: "Run tests"
uses: julia-actions/julia-runtest@v1
env:
JULIA_CONDAPKG_VERBOSITY: 2
BRAKET_CI: true
GROUP: ${{ matrix.group }}
- name: "Process coverage"
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,PyBraket/src
- name: "Upload coverage"
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
needs: [os-test, version-test]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
include("docs/make.jl")'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}