From d601ab56d77fab2ac904df00e5e21b6671aa07ec Mon Sep 17 00:00:00 2001 From: CalMacCQ <93673602+CalMacCQ@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:39:00 +0100 Subject: [PATCH] update build and test [projectq] --- .github/workflows/build_and_test.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 249732b..2a50009 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -28,6 +28,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: '0' + submodules: true - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* - name: Set up Python 3.10 if: github.event_name == 'push' || github.event_name == 'schedule' @@ -71,12 +72,15 @@ jobs: - name: Install docs dependencies if: (matrix.os == 'ubuntu-22.04') && (github.event_name == 'pull_request' || github.event_name == 'schedule' ) run: | - pip install -r .github/workflows/docs/requirements.txt + cd docs + bash ./install.sh + for w in `find wheelhouse/ -type f -name "*.whl"` ; do poetry install $w ; done - name: Build docs if: (matrix.os == 'ubuntu-22.04') && (github.event_name == 'pull_request' || github.event_name == 'schedule' ) timeout-minutes: 20 run: | - ./.github/workflows/docs/check-build-docs + cd docs + poetry run bash ./build-docs.sh publish_to_pypi: @@ -113,24 +117,27 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: '0' - - name: Set up Python 3.10 + submodules: true + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' - name: Download all wheels uses: actions/download-artifact@v4 with: path: wheelhouse - name: Install pip, wheel run: pip install -U pip wheel + - name: Install poetry + run: pip install poetry - name: Install extension - run: for w in `find wheelhouse/ -type f -name "*.whl"` ; do pip install $w ; done + run: for w in `find wheelhouse/ -type f -name "*.whl"` ; do poetry install $w ; done - name: Install docs dependencies run: | - pip install -r .github/workflows/docs/requirements.txt + cd docs + bash ./install.sh - name: Build docs timeout-minutes: 20 run: | - cd .github/workflows/docs - mkdir extensions - ./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions/api + cd docs + poetry run bash ./build-docs.sh