Skip to content

Commit

Permalink
[WIP] Issue-181 | Prepare for summer school release (#182)
Browse files Browse the repository at this point in the history
* Issue-181 | CD: release to PyPi on tag
* Issue-181 | Documentation: fix tutorials
* Issue-181 | CD: deploy docs
* Issue 181 | Workflows: use cibuildwheel for package distributions
* Issue 181 | Requirements specifications
* Issue 181 | Requirements specs fix
* Docs: contribution guidelines
* Docs: installation and beginner guide
  • Loading branch information
IceKhan13 authored Jun 27, 2022
1 parent e01f0eb commit 547589e
Show file tree
Hide file tree
Showing 25 changed files with 886 additions and 3,606 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021, 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

name: Deploy Docs

on:
workflow_dispatch:

jobs:
docs_publish:
if: ${{ startsWith(github.ref, 'refs/heads/stable') && contains('["manoelmarques","mtreinish","dsvandet","awcross1","quantumjim","grace-harper-ibm","IceKhan13"]', github.actor) }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/actions/install-machine-learning
- name: Install Dependencies
run: |
pip install jupyter sphinx_rtd_theme qiskit-terra[visualization] 'torchvision<0.10.0'
sudo apt-get install -y pandoc graphviz
shell: bash
- name: Build and publish
env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
QISKIT_PARALLEL: False
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
run: |
echo "earliest_version: 0.1.0" >> releasenotes/config.yaml
tools/ignore_untagged_notes.sh
make html
tools/deploy_documentation.sh
shell: bash
109 changes: 109 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

name: Release to PyPi

on:
workflow_dispatch:

jobs:
publish_to_pypi:
name: Build and push QEC wheels
strategy:
matrix:
os: ["macOS-latest", "ubuntu-latest", "windows-2019"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.2.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Publish Wheels
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
run : |
pip install -U twine
twine upload wheelhouse/*
publish_to_pypi_aarch64:
name: Build and push QEC wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.2.2 twine
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel"
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
publish_to_pypi-arm64-macos:
name: Build and push QEC wheels onarm64 macos
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macOS-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install deps
run: python -m pip install -U cibuildwheel==2.2.2 twine
- name: Build Wheels
env:
CIBW_ARCHS_MACOS: arm64
run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
6 changes: 1 addition & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Set up tox env
run: |
python -m pip install --upgrade pip
pip install tox
pver=${{ matrix.python-version }}
tox_env="-epy${pver/./}"
echo tox_env
echo TOX_ENV=$tox_env >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Test using tox envs
run: |
tox ${{ env.TOX_ENV }}
Expand Down
Loading

0 comments on commit 547589e

Please sign in to comment.