diff --git a/.azure/wheels.yml b/.azure/wheels.yml index 63604a40382c..533d7f010ad3 100644 --- a/.azure/wheels.yml +++ b/.azure/wheels.yml @@ -28,13 +28,3 @@ jobs: pip install cibuildwheel==2.11.2 pip install -U twine cibuildwheel --output-dir wheelhouse . - - - task: PublishBuildArtifacts@1 - inputs: {pathtoPublish: 'wheelhouse'} - condition: succeededOrFailed() - - - bash: | - twine upload wheelhouse/* - env: - TWINE_USERNAME: "qiskit" - TWINE_PASSWORD: $(TWINE_PASSWORD) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 3dd7961146ac..e180c6feaa73 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,9 +1,9 @@ --- name: Wheel Builds on: - push: - tags: - - '*' + pull_request: + branches: ['main'] + jobs: build_wheels_s390x: name: Build wheels on s390x @@ -35,11 +35,6 @@ jobs: path: ./wheelhouse/*.whl - name: Install twine run: python -m pip install twine - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: qiskit build_wheels_ppc64le: name: Build wheels on ppc64le runs-on: ${{ matrix.os }} @@ -70,11 +65,6 @@ jobs: path: ./wheelhouse/*.whl - name: Install twine run: python -m pip install twine - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: qiskit build_wheels_aarch64: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -104,8 +94,3 @@ jobs: path: ./wheelhouse/*.whl - name: Install twine run: python -m pip install twine - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: qiskit diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 038cc23eb8c0..12a4c363cf0c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -95,116 +95,7 @@ parameters: # need to examine `variables['Build.SourceBranch']` to determine whether it's a # branch or a tag. stages: - # Nightly cron job. - - ${{ if eq(variables['Build.Reason'], 'Schedule') }}: - - stage: "Nightly" - displayName: "Nightly complete matrix tests" - jobs: - - ${{ each version in parameters.supportedPythonVersions }}: - - template: ".azure/test-linux.yml" - parameters: - pythonVersion: ${{ version }} - testQPY: false - testImages: false - - - template: ".azure/test-macos.yml" - parameters: - pythonVersion: ${{ version }} - - - template: ".azure/test-windows.yml" - parameters: - pythonVersion: ${{ version }} - - - stage: "Nightly_Failure" - displayName: "Comment on nightly failure" - dependsOn: "Nightly" - condition: failed() - pool: {vmImage: 'ubuntu-latest'} - jobs: - - job: "Comment" - steps: - - task: GitHubComment@0 - inputs: - gitHubConnection: Qiskit - repositoryName: ${{ variables['Build.Repository.Name'] }} - id: 7864 - comment: Nightly test job failed at commit $(Build.SourceVersion). View the logs at $(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId). - - # Full PR suite. - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - # The preliminary stage should be small in both total runtime (including - # provisioning) and resources required. About half of PR commits result in - # a CI failure, and over 90% of these are in linting, documention or a test - # failure that would affect _any_ OS or Python version. The goal in the - # first stage is to catch the vast majority of failures with minimal cost. - - stage: "Lint_Docs_Prelim_Tests" - displayName: "Preliminary tests" - jobs: - - template: ".azure/lint-linux.yml" - parameters: - pythonVersion: ${{ parameters.minimumPythonVersion }} - - - template: ".azure/docs-linux.yml" - parameters: - pythonVersion: ${{ parameters.documentationPythonVersion }} - - - template: ".azure/test-linux.yml" - parameters: - pythonVersion: ${{ parameters.minimumPythonVersion }} - testQPY: false - testImages: false - rustVersion: ${{ parameters.minimumRustVersion }} - - # The rest of the PR pipeline is to test the oldest and newest supported - # versions of Python, along with the integration tests (via the tutorials). - # It's very rare for a failure to be specific to an intermediate version of - # Python, so we just catch those in the cron-job pipeline to reduce the - # amount of resources used. - - stage: "Tutorials_and_Tests" - displayName: "Main tests" - dependsOn: "Lint_Docs_Prelim_Tests" - jobs: - - template: ".azure/tutorials-linux.yml" - parameters: - pythonVersion: ${{ parameters.tutorialsPythonVersion }} - - - template: ".azure/test-linux.yml" - parameters: - pythonVersion: ${{ parameters.maximumPythonVersion }} - testQPY: true - testImages: true - installFromSdist: true - - - template: ".azure/test-macos.yml" - parameters: - pythonVersion: ${{ parameters.minimumPythonVersion }} - - - template: ".azure/test-macos.yml" - parameters: - pythonVersion: ${{ parameters.maximumPythonVersion }} - - - template: ".azure/test-windows.yml" - parameters: - pythonVersion: ${{ parameters.minimumPythonVersion }} - - - template: ".azure/test-windows.yml" - parameters: - pythonVersion: ${{ parameters.maximumPythonVersion }} - - # Push to main or the stable branches. The triggering branches are set in the - # triggers at the top of this file. - - ${{ if and(eq(variables['Build.Reason'], 'IndividualCI'), startsWith(variables['Build.SourceBranch'], 'refs/heads/')) }}: - - stage: "Push" - jobs: - - template: ".azure/test-linux.yml" - parameters: - pythonVersion: ${{ parameters.branchPushPythonVersion }} - testQPY: true - testImages: true - - # Push to a tag. The triggering tags are set in the triggers at the top of - # this file. - - ${{ if and(eq(variables['Build.Reason'], 'IndividualCI'), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) }}: - stage: "Deploy" jobs: - template: ".azure/wheels.yml" @@ -242,22 +133,3 @@ stages: inputs: versionSpec: ${{ version }} architecture: x64 - - - job: 'sdist' - pool: {vmImage: 'ubuntu-latest'} - steps: - - task: UsePythonVersion@0 - - bash: | - set -e - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools_rust - python setup.py sdist - - task: PublishBuildArtifacts@1 - inputs: {pathtoPublish: 'dist'} - condition: succeededOrFailed() - - bash: | - python -m pip install --upgrade twine - twine upload dist/* - env: - TWINE_USERNAME: "qiskit" - TWINE_PASSWORD: $(TWINE_PASSWORD)