Skip to content

Commit

Permalink
Merge pull request #1197 from CQCL/release/1.23.0
Browse files Browse the repository at this point in the history
Release/1.23.0
  • Loading branch information
cqc-alec authored Jan 9, 2024
2 parents 39453bf + 0594427 commit 8cac679
Show file tree
Hide file tree
Showing 88 changed files with 2,310 additions and 2,746 deletions.
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Description

Please summarise the changes.

# Related issues

Please mention any github issues addressed by this PR.

# Checklist

- [ ] I have performed a self-review of my code.
- [ ] I have commented hard-to-understand parts of my code.
- [ ] I have made corresponding changes to the public API documentation.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have updated the changelog with any user-facing changes.
2 changes: 1 addition & 1 deletion .github/workflows/build-with-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/install-nix-action@v24
- name: Build and test tket
run: nix flake check -L
16 changes: 8 additions & 8 deletions .github/workflows/build-without-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
- name: Install symengine
run: |
cd ${TMP_DIR}
wget https://github.com/symengine/symengine/releases/download/v0.11.1/symengine-0.11.1.tar.gz
tar xzvf symengine-0.11.1.tar.gz
cd symengine-0.11.1/
wget https://github.com/symengine/symengine/releases/download/v0.11.2/symengine-0.11.2.tar.gz
tar xzvf symengine-0.11.2.tar.gz
cd symengine-0.11.2/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF ..
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Install nlohmann_json
run: |
cd ${TMP_DIR}
wget https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
wget https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
tar xvf json.tar.xz
cd json/
mkdir build
Expand All @@ -74,9 +74,9 @@ jobs:
- name: Install catch2
run: |
cd ${TMP_DIR}
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.3.2.tar.gz
tar xzvf v3.3.2.tar.gz
cd Catch2-3.3.2/
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.5.0.tar.gz
tar xzvf v3.5.0.tar.gz
cd Catch2-3.5.0/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
cmake --build . -j2
cmake --install .
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pytket
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
tket_package_exists: ${{ steps.tket_package_exists.outputs.tket_package_exists }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: dorny/[email protected]
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
run: sudo apt update
- name: Select Python 3.10
# otherwise turtlebrowser/[email protected] fails on macos-12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install conan
Expand Down Expand Up @@ -260,17 +260,17 @@ jobs:
conan create recipes/pybind11_json/all --version 0.2.13
- name: Set up Python (pull request)
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Set up Python (push)
if: github.event_name == 'push'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python (schedule)
if: github.event_name == 'schedule'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build pytket
Expand Down Expand Up @@ -302,13 +302,13 @@ jobs:
./.github/workflows/build-docs
- name: Upload artefact
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pytket_docs
path: pytket/docs/build/html/
- name: Upload pytket coverage artefact
if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pytket_test_coverage
path: pytket/tests/htmlcov
Expand All @@ -330,7 +330,7 @@ jobs:
- uses: actions/checkout@v4
- name: Select Python 3.10
# otherwise turtlebrowser/[email protected] fails on macos-12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install conan
Expand Down Expand Up @@ -370,12 +370,12 @@ jobs:
run: brew install [email protected]
- name: Set up Python (push)
if: github.event_name == 'push'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python (schedule)
if: github.event_name == 'schedule'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build pytket
Expand Down Expand Up @@ -459,17 +459,19 @@ jobs:
key: tket-dynamic-visual-studio-windows-2022-${{ steps.current_time.outputs.formattedTime }}
restore-keys: |
tket-dynamic-visual-studio-windows-2022
- name: get ccache version
id: ccache-ver
- name: get ccache path
id: ccache-path
shell: bash
run: |
ccache_ver=$(choco list -e ccache | grep "ccache" | grep -ioE '[0-9]+\.[0-9]+\.[0-9]+')
echo "Found ccache version ${ccache_ver}"
echo "ccache_ver=${ccache_ver}" >> $GITHUB_OUTPUT
ccache --shimgen-noop > ccache-info.txt || true
a=$(cat ccache-info.txt | grep executable)
# strip off the initial " path to executable: "
b=${a:22}
echo "ccache_path=${b}" >> $GITHUB_OUTPUT
- name: Build tket
if: needs.check_changes.outputs.tket_changed == 'true'
run: |
$env:TKET_VSGEN_CCACHE_EXE = 'C:\\ProgramData\\chocolatey\\lib\\ccache\\tools\\ccache-${{ steps.ccache-ver.outputs.ccache_ver }}-windows-x86_64\\ccache.exe'
$env:TKET_VSGEN_CCACHE_EXE = '${{ steps.ccache-path.outputs.ccache_path }}'
conan build tket --user tket --channel stable -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True
conan export-pkg tket --user tket --channel stable -o boost/*:header_only=True -o tklog/*:shared=True -o tket/*:shared=True -tf `"`"
- name: Install tket
Expand All @@ -484,17 +486,17 @@ jobs:
conan create recipes/pybind11_json/all --version 0.2.13
- name: Set up Python (3.9)
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Set up Python (3.10)
if: github.event_name == 'push'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python (3.11)
if: github.event_name == 'schedule'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build pytket
Expand Down Expand Up @@ -532,7 +534,7 @@ jobs:
with:
ref: gh-pages
- name: Download artefact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: pytket_test_coverage
path: htmlcov/
Expand All @@ -553,12 +555,12 @@ jobs:
check_pytket_coverage:
name: Check pytket line and branch coverage
needs: build_test_pytket_ubuntu
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Download artefact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: pytket_test_coverage
path: pytket-test-coverage/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
[IO.File]::WriteAllText($f, $normalized_file)
}
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install conan
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- uses: actions/checkout@v4
- name: set up container
run: |
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux2014_x86_64:latest /bin/bash
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux_2_28_x86_64:latest /bin/bash
docker cp ./libs/${{ matrix.lib }} linux_build:/
docker cp ./libver linux_build:/
docker cp ./.github/workflows/linuxbuildlib linux_build:/
Expand All @@ -123,6 +123,6 @@ jobs:
UPLOAD_PACKAGE=${UPLOAD_PACKAGE}
JFROG_ARTIFACTORY_TOKEN_3=${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }}
JFROG_ARTIFACTORY_USER_3=${{ secrets.JFROG_ARTIFACTORY_USER_3 }}
CONAN_PROFILE=linux-x86_64-gcc10-libstdc++
CONAN_PROFILE=linux-x86_64-gcc12
EOF
docker exec --env-file env-vars linux_build /bin/bash -c "/linuxbuildlib"
4 changes: 2 additions & 2 deletions .github/workflows/compare-pytket-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def compare(old_cov_file, new_cov_file):
print(f"Branch coverage: {new_branch_rate}")
print()

if new_line_rate < old_line_rate:
if new_line_rate + 0.01 < old_line_rate:
sys.exit("Line coverage has decreased!")
if new_branch_rate < old_branch_rate:
if new_branch_rate + 0.01 < old_branch_rate:
sys.exit("Branch coverage has decreased!")


Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
gcovr --print-summary --html --html-details -r ./tket --exclude-lines-by-pattern '.*\bTKET_ASSERT\(.*\);' --object-directory ${PWD}/build/tket/build/Debug/CMakeFiles/tket.dir/src -o test-coverage/index.html --decisions > test-coverage/summary.txt
cat test-coverage/summary.txt
- name: Upload artefact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test_coverage
path: test-coverage/
Expand All @@ -95,7 +95,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download artefact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test_coverage
path: test-coverage/
Expand All @@ -121,7 +121,7 @@ jobs:
with:
ref: gh-pages
- name: Download artefact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test_coverage
path: test-coverage/
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
with:
ref: gh-pages
- name: Download artefact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test_coverage
path: test-coverage/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Build Doxygen docs
run: cd tket && doxygen
- name: Upload artefact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tket_docs
path: tket/doc/html/
Expand All @@ -30,7 +30,7 @@ jobs:
with:
ref: gh-pages
- name: Download artefact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: tket_docs
path: api/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install black and pylint
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Select Python 3.10
# otherwise turtlebrowser/[email protected] fails on macos-12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down Expand Up @@ -58,13 +58,13 @@ jobs:

- name: Set up container
run: |
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux2014_x86_64:latest /bin/bash
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux_2_28_x86_64:latest /bin/bash
docker cp . linux_build:/tket/
- name: Install and upload packages
run: |
docker start linux_build
docker exec -e JFROG_ARTIFACTORY_TOKEN_3="${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }}" -e JFROG_ARTIFACTORY_USER_3="${{ secrets.JFROG_ARTIFACTORY_USER_3 }}" -e CONAN_PROFILE=linux-x86_64-gcc10-libstdc++ linux_build /bin/bash -c "/tket/.github/workflows/linuxbuildpackages"
docker exec -e JFROG_ARTIFACTORY_TOKEN_3="${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }}" -e JFROG_ARTIFACTORY_USER_3="${{ secrets.JFROG_ARTIFACTORY_USER_3 }}" -e CONAN_PROFILE=linux-x86_64-gcc12 linux_build /bin/bash -c "/tket/.github/workflows/linuxbuildpackages"
build_manylinux_aarch64:
name: Build on manylinux (aarch64)
Expand All @@ -77,14 +77,14 @@ jobs:
run: |
export DOCKER_HOST=unix://${HOME}/.docker/run/docker.sock
docker rm --force -v linux_build
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux2014_aarch64:latest /bin/bash
docker create --name linux_build -i -v /:/host quay.io/pypa/manylinux_2_28_aarch64:latest /bin/bash
docker cp . linux_build:/tket/
- name: Install and upload packages
run: |
export DOCKER_HOST=unix://${HOME}/.docker/run/docker.sock
docker start linux_build
docker exec -e JFROG_ARTIFACTORY_TOKEN_3="${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }}" -e JFROG_ARTIFACTORY_USER_3="${{ secrets.JFROG_ARTIFACTORY_USER_3 }}" -e CONAN_PROFILE=linux-armv8-gcc10-libstdc++ linux_build /bin/bash -c "/tket/.github/workflows/linuxbuildpackages"
docker exec -e JFROG_ARTIFACTORY_TOKEN_3="${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }}" -e JFROG_ARTIFACTORY_USER_3="${{ secrets.JFROG_ARTIFACTORY_USER_3 }}" -e CONAN_PROFILE=linux-armv8-gcc12 linux_build /bin/bash -c "/tket/.github/workflows/linuxbuildpackages"
- name: Remove container
if: always()
Expand Down
Loading

0 comments on commit 8cac679

Please sign in to comment.