Skip to content

Commit

Permalink
Merge pull request #287 from CQCL/release/1.0.0
Browse files Browse the repository at this point in the history
Release/1.0.0
  • Loading branch information
cqc-alec authored Mar 14, 2022
2 parents 7e7e908 + 8fde27d commit ea97df1
Show file tree
Hide file tree
Showing 344 changed files with 37,700 additions and 8,031 deletions.
436 changes: 436 additions & 0 deletions .github/disabled-workflows/build_and_test_v2.yml

Large diffs are not rendered by default.

437 changes: 437 additions & 0 deletions .github/disabled-workflows/build_and_test_v2_nightly.yml

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions .github/disabled-workflows/coverage_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: Analyse tket C++ test coverage v2

on:
pull_request:
branches:
- develop2
push:
branches:
- develop2

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

changes:
runs-on: ubuntu-20.04
outputs:
tket: ${{ steps.filter.outputs.tket }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
tket:
- 'tket/**'
generate_coverage:
name: Generate coverage report
needs: changes
if: needs.changes.outputs.tket == 'true'
runs-on: ubuntu-20.04
env:
CC: gcc-10
CXX: g++-10
CONAN_REVISIONS_ENABLED: 1
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Get current time
uses: srfrnk/[email protected]
id: current_time
with:
format: YYYYMMDDHHmmss
- name: Cache ccache data
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-tket-ccache-${{ steps.current_time.outputs.formattedTime }}
restore-keys: |
${{ runner.os }}-tket-ccache-
- name: Install conan
id: conan
run: |
pip install conan
conan_cmd=/home/runner/.local/bin/conan
${conan_cmd} profile new tket --detect
${conan_cmd} profile update settings.compiler.libcxx=libstdc++11 tket
${conan_cmd} profile update options.tket:shared=True tket
${conan_cmd} profile update settings.build_type=Debug tket
echo "CONAN_CMD=${conan_cmd}" >> $GITHUB_ENV
- name: add remote
run: ${CONAN_CMD} remote add tket-conan https://tket.jfrog.io/artifactory/api/conan/tket-conan
- name: Install ninja and ccache
run: |
sudo apt-get update
sudo apt-get install ninja-build ccache
- name: Build tket
run: |
${CONAN_CMD} install recipes/tket --install-folder=build/tket --profile=tket -o tket:profile_coverage=True
${CONAN_CMD} build recipes/tket --configure --build-folder=build/tket --source-folder=tket/src
${CONAN_CMD} build recipes/tket --build --build-folder=build/tket
${CONAN_CMD} export-pkg recipes/tket -f --build-folder=build/tket --source-folder=tket/src
- name: Build tket tests
run: |
${CONAN_CMD} install recipes/tket-tests --install-folder=build/tket-tests --profile=tket -o tket-tests:with_coverage=True
${CONAN_CMD} build recipes/tket-tests --configure --build-folder=build/tket-tests --source-folder=tket/tests
${CONAN_CMD} build recipes/tket-tests --build --build-folder=build/tket-tests
- name: Install runtime test requirements
run: |
sudo apt-get install texlive texlive-latex-extra latexmk
mkdir -p ~/texmf/tex/latex
wget http://mirrors.ctan.org/graphics/pgf/contrib/quantikz/tikzlibraryquantikz.code.tex -P ~/texmf/tex/latex
- name: Run tket tests
run: ./build/tket-tests/bin/test_tket
- name: Install gcovr
run: pip install gcovr
- name: Build coverage report
run: |
mkdir test-coverage
gcovr --print-summary --html --html-details -r ./tket/src/ --exclude-lines-by-pattern '.*\bTKET_ASSERT\(.*\);' --object-directory ${PWD}/build/tket/ -o test-coverage/index.html > test-coverage/summary.txt
- name: Upload artefact
uses: actions/upload-artifact@v2
with:
name: test_coverage
path: test-coverage/

publish_coverage:
name: Publish coverage
needs: generate_coverage
concurrency: gh_pages
if: github.event_name == 'push' && needs.changes.outputs.tket == 'true'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages
- name: Download artefact
uses: actions/download-artifact@v2
with:
name: test_coverage
path: test-coverage/
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "«$GITHUB_WORKFLOW» github action"
- name: Remove old report
run: git rm -r docs/tket-v2/test-coverage
- name: Add report to repository
run: |
mv test-coverage/ docs/tket-v2/
git add -f docs/tket-v2/test-coverage
git commit --allow-empty -m "Add generated coverage report."
- name: Publish report
run: git push origin gh-pages:gh-pages

check_coverage:
name: Check coverage
needs: generate_coverage
if: github.event_name == 'pull_request' && needs.changes.outputs.tket == 'true'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Download artefact
uses: actions/download-artifact@v2
with:
name: test_coverage
path: test-coverage/
- name: Compare with latest report from develop
run: |
wget https://cqcl.github.io/tket/tket-v2/test-coverage/summary.txt
./.github/workflows/compare-coverage summary.txt test-coverage/summary.txt
26 changes: 26 additions & 0 deletions .github/disabled-workflows/docs_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build tket C++ documentation v2

on:
push:
branches:
- develop2
paths:
- 'tket/src/**'

jobs:
build_docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Install Doxygen
run: sudo apt update && sudo apt install -y doxygen graphviz
- name: Build Doxygen docs
run: cd tket && doxygen
- name: Upload artefact
uses: actions/upload-artifact@v2
with:
name: tket_docs
path: tket/doc/html/
76 changes: 76 additions & 0 deletions .github/disabled-workflows/valgrind_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: valgrind check v2
on:
pull_request:
branches:
- develop2

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-20.04
outputs:
tket: ${{ steps.filter.outputs.tket }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
tket:
- 'tket/**'
check:
runs-on: ubuntu-20.04
needs: changes
if: needs.changes.outputs.tket == 'true'
env:
CC: gcc-10
CXX: g++-10
CONAN_REVISIONS_ENABLED: 1
steps:
- uses: actions/checkout@v2
- name: cache ccache data
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-tket-ccache-${{ steps.current_time.outputs.formattedTime }}
restore-keys: |
${{ runner.os }}-tket-ccache-
- name: apt update
run: sudo apt update
- name: Install conan
id: conan
run: |
pip install conan
conan profile new tket --detect
conan profile update settings.compiler.libcxx=libstdc++11 tket
conan profile update options.tket:shared=True tket
- name: set option to run full test suite
if: github.event_name == 'schedule'
run: conan profile update options.tket-tests:full=True tket
- name: add remote
run: conan remote add tket-conan https://tket.jfrog.io/artifactory/api/conan/tket-conan
- name: install tex components
run: |
sudo apt install texlive texlive-latex-extra latexmk
mkdir -p ~/texmf/tex/latex
wget http://mirrors.ctan.org/graphics/pgf/contrib/quantikz/tikzlibraryquantikz.code.tex -P ~/texmf/tex/latex
- name: install valgrind
run: sudo apt install valgrind
- name: install ninja and ccache
run: sudo apt-get install ninja-build ccache
- name: build tket
run: |
conan install recipes/tket --install-folder=build/tket --profile=tket
conan build recipes/tket --configure --build-folder=build/tket --source-folder=tket/src
conan build recipes/tket --build --build-folder=build/tket
conan export-pkg recipes/tket -f --build-folder=build/tket --source-folder=tket/src
- name: build tket tests
run: |
conan install recipes/tket-tests --install-folder=build/tket-tests --profile=tket
conan build recipes/tket-tests --configure --build-folder=build/tket-tests --source-folder=tket/tests
conan build recipes/tket-tests --build --build-folder=build/tket-tests
- name: run tests under valgrind
run: valgrind --error-exitcode=1 ./build/tket-tests/bin/test_tket
82 changes: 82 additions & 0 deletions .github/disabled-workflows/valgrind_v2_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: valgrind check v2 nightly
on:
schedule:
# 03:00 every Monday morning
- cron: '0 3 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-20.04
outputs:
tket: ${{ steps.filter.outputs.tket }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
ref: develop2
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
tket:
- 'tket/**'
check:
runs-on: ubuntu-20.04
needs: changes
if: needs.changes.outputs.tket == 'true'
env:
CC: gcc-10
CXX: g++-10
CONAN_REVISIONS_ENABLED: 1
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
ref: develop2
- name: cache ccache data
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-tket-ccache-${{ steps.current_time.outputs.formattedTime }}
restore-keys: |
${{ runner.os }}-tket-ccache-
- name: apt update
run: sudo apt update
- name: Install conan
id: conan
run: |
pip install conan
conan profile new tket --detect
conan profile update settings.compiler.libcxx=libstdc++11 tket
conan profile update options.tket:shared=True tket
- name: set option to run full test suite
if: github.event_name == 'schedule'
run: conan profile update options.tket-tests:full=True tket
- name: add remote
run: conan remote add tket-conan https://tket.jfrog.io/artifactory/api/conan/tket-conan
- name: install tex components
run: |
sudo apt install texlive texlive-latex-extra latexmk
mkdir -p ~/texmf/tex/latex
wget http://mirrors.ctan.org/graphics/pgf/contrib/quantikz/tikzlibraryquantikz.code.tex -P ~/texmf/tex/latex
- name: install valgrind
run: sudo apt install valgrind
- name: install ninja and ccache
run: sudo apt-get install ninja-build ccache
- name: build tket
run: |
conan install recipes/tket --install-folder=build/tket --profile=tket
conan build recipes/tket --configure --build-folder=build/tket --source-folder=tket/src
conan build recipes/tket --build --build-folder=build/tket
conan export-pkg recipes/tket -f --build-folder=build/tket --source-folder=tket/src
- name: build tket tests
run: |
conan install recipes/tket-tests --install-folder=build/tket-tests --profile=tket
conan build recipes/tket-tests --configure --build-folder=build/tket-tests --source-folder=tket/tests
conan build recipes/tket-tests --build --build-folder=build/tket-tests
- name: run tests under valgrind
run: valgrind --error-exitcode=1 ./build/tket-tests/bin/test_tket
Loading

0 comments on commit ea97df1

Please sign in to comment.