From f90106c0e96617b8bcf9576dccf3371f2d4508f6 Mon Sep 17 00:00:00 2001 From: Astral Cai Date: Wed, 8 May 2024 14:34:08 -0400 Subject: [PATCH] Remove demo_diff_check workflow --- .github/workflows/demo_diff_check.yml | 193 -------------------------- 1 file changed, 193 deletions(-) delete mode 100644 .github/workflows/demo_diff_check.yml diff --git a/.github/workflows/demo_diff_check.yml b/.github/workflows/demo_diff_check.yml deleted file mode 100644 index 61d45aec3a..0000000000 --- a/.github/workflows/demo_diff_check.yml +++ /dev/null @@ -1,193 +0,0 @@ -name: Check the output of demos on the master and dev branches -on: - schedule: - - cron: '0 0 * * 0' - workflow_dispatch: - -jobs: - build-dev: - runs-on: ubuntu-latest - - steps: - - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.4.1 - with: - access_token: ${{ github.token }} - - - uses: actions/checkout@v2 - with: - ref: dev - - - name: Run Rigetti Quilc - run: docker run --rm -d -p 5555:5555 rigetti/quilc -R - - - name: Run Rigetti QVM - run: docker run --rm -d -p 5000:5000 rigetti/qvm -S - - - name: Set up Python Version - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - - name: Setup Python Environment - id: venv - run: | - if [ ! -d "venv" ]; then python3 -m venv venv; fi - echo "location=${{ github.workspace }}/venv" >> $GITHUB_OUTPUT - echo "${{ github.workspace }}/venv/bin" >> $GITHUB_PATH - - - name: Install Poetry - id: poetry - env: - POETRY_HOME: /tmp/poetry - run: | - curl -sSL https://install.python-poetry.org -o install-poetry.py - python3 install-poetry.py --version 1.7.1 - - $POETRY_HOME/bin/poetry config virtualenvs.create "false" - $POETRY_HOME/bin/poetry config virtualenvs.in-project "true" - - $POETRY_HOME/bin/poetry --version - - echo "bin=${{ env.POETRY_HOME }}/bin/poetry" >> $GITHUB_OUTPUT - - - name: Install Python Dependencies - run: | - source ${{ steps.venv.outputs.location }}/bin/activate - make POETRY_BIN="${{ steps.poetry.outputs.bin }}" UPGRADE_PL=1 environment - - # Adding this install outside of poetry as the dependencies conflict with existing other packages. - # TODO: This needs to be revisited. - ${{ steps.venv.outputs.location }}/bin/python3 -m pip install --no-deps mitiq==0.25.0 - - - name: Build tutorials - run: | - make download - make html - zip -r /tmp/qml_demos.zip demos - - - uses: actions/upload-artifact@v2 - with: - name: built-website-dev - path: | - /tmp/qml_demos.zip - _build/html - - build-master: - runs-on: ubuntu-latest - - steps: - - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.4.1 - with: - access_token: ${{ github.token }} - - - uses: actions/checkout@v2 - with: - ref: master - - - name: Run Rigetti Quilc - run: docker run --rm -d -p 5555:5555 rigetti/quilc -R - - - name: Run Rigetti QVM - run: docker run --rm -d -p 5000:5000 rigetti/qvm -S - - - name: Set up Python Version - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - - name: Setup Python Environment - id: venv - run: | - if [ ! -d "venv" ]; then python3 -m venv venv; fi - echo "location=${{ github.workspace }}/venv" >> $GITHUB_OUTPUT - echo "${{ github.workspace }}/venv/bin" >> $GITHUB_PATH - - - name: Install Poetry - id: poetry - env: - POETRY_HOME: /tmp/poetry - run: | - curl -sSL https://install.python-poetry.org -o install-poetry.py - python3 install-poetry.py --version 1.7.1 - - $POETRY_HOME/bin/poetry config virtualenvs.create "false" - $POETRY_HOME/bin/poetry config virtualenvs.in-project "true" - - $POETRY_HOME/bin/poetry --version - - echo "bin=${{ env.POETRY_HOME }}/bin/poetry" >> $GITHUB_OUTPUT - - - name: Install Python Dependencies - run: | - source ${{ steps.venv.outputs.location }}/bin/activate - make POETRY_BIN="${{ steps.poetry.outputs.bin }}" UPGRADE_PL=0 environment - - # Adding this install outside of poetry as the dependencies conflict with existing other packages. - # TODO: This needs to be revisited. - ${{ steps.venv.outputs.location }}/bin/python3 -m pip install --no-deps mitiq==0.25.0 - - - name: Build tutorials - run: | - make download - make html - zip -r /tmp/qml_demos.zip demos - - - uses: actions/upload-artifact@v2 - with: - name: built-website-master - path: | - /tmp/qml_demos.zip - _build/html - - check-diffs: - runs-on: ubuntu-latest - needs: [build-dev, build-master] - steps: - - uses: actions/checkout@v2 - with: - # We checkout a dedicated unprotected branch and store the output of - # the checker there - ref: demo_output_comparison - - - name: Create dev dir - run: mkdir /tmp/dev/ - - - uses: actions/download-artifact@v2 - with: - name: built-website-dev - path: /tmp/dev/ - - - name: Create master dir - run: mkdir /tmp/master/ - - - uses: actions/download-artifact@v2 - with: - name: built-website-master - path: /tmp/master/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - - name: Update the output file - run: | - git config user.name "QML demo checker Bot" - git config user.email "<>" - - pip install pytz - python .github/workflows/generate_diffs.py - mv demo_diffs.md demo_checker - git add demo_checker/demo_diffs.md - git commit -m "Update the demonstration differences found" - git push - - - uses: actions/upload-artifact@v2 - with: - name: demo_diffs - path: | - demo_checker/demo_diffs.md