Skip to content
Draft
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
9 changes: 4 additions & 5 deletions .github/workflows/benchmark_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ on:
release:
types: [published]
workflow_dispatch:
description: "Manually update benchmarks"

jobs:
benchmark_base_branch:
name: Continuous Benchmarking with Bencher
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/cache@v4
with:
path: .venv
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/benchmark_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
pull-requests: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/cache@v4
with:
path: .venv
Expand All @@ -27,8 +27,10 @@ jobs:
--project pyquil \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}' \
--branch-start-point '${{ github.base_ref }}' \
--branch-start-point-hash '${{ github.event.pull_request.base.sha }}' \
--start-point '${{ github.base_ref }}' \
--start-point-hash '${{ github.event.pull_request.base.sha }}' \
--start-point-clone-thresholds \
--start-point-reset \
--testbed ci-runner-linux \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
Expand Down
106 changes: 55 additions & 51 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,71 @@ on:
release:
types: [published]
workflow_dispatch:
description: "Manually publish release"

jobs:
build-publish:
name: Build and Publish
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: "Build"
run: |
poetry build --no-interaction
- id: publish
name: "Publish"
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish
export PYQUIL_TAG_VERSION=$(poetry version --short)
export PYQUIL_TAG_LATEST=$([[ "$PYQUIL_TAG_VERSION" =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]] && echo latest || echo)
export PYQUIL_TAG_RC=$([[ "$PYQUIL_TAG_VERSION" =~ ^[0-9]+[.][0-9]+[.][0-9]+-rc[.][0-9]+$ ]] && echo rc || echo)
echo "PYQUIL_TAG_VERSION=$PYQUIL_TAG_VERSION" >> "$GITHUB_OUTPUT"
echo "PYQUIL_TAG_LATEST=$PYQUIL_TAG_LATEST" >> "$GITHUB_OUTPUT"
echo "PYQUIL_TAG_RC=$PYQUIL_TAG_RC" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: "Build"
run: |
poetry build --no-interaction
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- id: version
name: "Get version info"
run: |
export PYQUIL_TAG_VERSION=$(poetry version --short)
export PYQUIL_TAG_LATEST=$([[ "$PYQUIL_TAG_VERSION" =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]] && echo latest || echo)
export PYQUIL_TAG_RC=$([[ "$PYQUIL_TAG_VERSION" =~ ^[0-9]+[.][0-9]+[.][0-9]+-rc[.][0-9]+$ ]] && echo rc || echo)
echo "PYQUIL_TAG_VERSION=$PYQUIL_TAG_VERSION" >> "$GITHUB_OUTPUT"
echo "PYQUIL_TAG_LATEST=$PYQUIL_TAG_LATEST" >> "$GITHUB_OUTPUT"
echo "PYQUIL_TAG_RC=$PYQUIL_TAG_RC" >> "$GITHUB_OUTPUT"
outputs:
PYQUIL_TAG_VERSION: ${{ steps.publish.outputs.PYQUIL_TAG_VERSION }}
PYQUIL_TAG_LATEST: ${{ steps.publish.outputs.PYQUIL_TAG_LATEST }}
PYQUIL_TAG_RC: ${{ steps.publish.outputs.PYQUIL_TAG_RC }}
PYQUIL_TAG_VERSION: ${{ steps.version.outputs.PYQUIL_TAG_VERSION }}
PYQUIL_TAG_LATEST: ${{ steps.version.outputs.PYQUIL_TAG_LATEST }}
PYQUIL_TAG_RC: ${{ steps.version.outputs.PYQUIL_TAG_RC }}

build-publish-grpc-web:
name: Build and Publish (pyquil-grpc-web)
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Patch package metadata for grpc-web
run: |
pip install toml
python scripts/ci_publish_grpc_web.py
- name: Poetry Build
run: |
poetry build --no-interaction
- name: Upload wheels as artifacts
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
- name: Mint token
id: mint
uses: tschm/token-mint-action@v1.0.3
- name: Publish the package with poetry
run: |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}'
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Patch package metadata for grpc-web
run: |
pip install toml
python scripts/ci_publish_grpc_web.py
- name: Poetry Build
run: |
poetry build --no-interaction
- name: Upload wheels as artifacts
uses: actions/upload-artifact@v6
with:
name: wheels
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

docker-publish:
name: Docker Publish
Expand All @@ -78,7 +82,7 @@ jobs:
# Determine the tags to publish based on the release tag
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ vars.DOCKER_IMAGE_NAME }}
Expand All @@ -88,9 +92,9 @@ jobs:
type=raw,value=${{ env.PYQUIL_TAG_RC }},enable=${{ env.PYQUIL_TAG_RC != '' }}
# Checkout is needed to use the path context: .
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Build and Test
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
load: true
Expand All @@ -102,12 +106,12 @@ jobs:
docker run --rm "${{ vars.DOCKER_IMAGE_NAME }}:test" python -c "from pyquil import get_qc"
# Build and publish the image
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
type:
description: Runs knope with the --dry-run flag to see what the next release would look like.
required: true
type: "choice"
default: prerelease
options:
- prerelease
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
type:
description: Bump versions and trigger a new release.
required: true
type: "choice"
default: prerelease
options:
- prerelease
Expand All @@ -20,7 +21,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
name: Build and test documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v4
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/cache@v4
with:
path: .venv
Expand All @@ -32,11 +32,11 @@ jobs:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v4
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/cache@v4
with:
path: .venv
Expand All @@ -51,11 +51,11 @@ jobs:
name: Check style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v4
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/cache@v4
with:
path: .venv
Expand All @@ -70,11 +70,11 @@ jobs:
name: Check types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v4
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: '3.10'
- uses: actions/cache@v4
with:
path: .venv
Expand All @@ -90,7 +90,7 @@ jobs:
name: Check dependencies for vulnerabilities
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
- name: Install OSV scanner
Expand All @@ -105,11 +105,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
Expand All @@ -133,11 +133,11 @@ jobs:
pull-requests: write # allows coverage bot to comment
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
Expand Down Expand Up @@ -165,9 +165,9 @@ jobs:
name: Check docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: '3.10'
- uses: actions/cache@v4
Expand Down Expand Up @@ -195,11 +195,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
Expand Down
Loading
Loading