test all libraries #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test all libraries | |
on: | |
schedule: | |
# 03:00 every Wednesday morning | |
- cron: '0 3 * * 3' | |
workflow_dispatch: {} | |
jobs: | |
test_libraries: | |
name: test library | |
strategy: | |
matrix: | |
os: ['ubuntu-22.04', 'macos-12', 'windows-2022', 'macos-13-xlarge'] | |
lib: ['tklog', 'tkassert', 'tkrng', 'tktokenswap', 'tkwsm'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install conan | |
uses: turtlebrowser/[email protected] | |
- name: Set up conan | |
shell: bash | |
run: | | |
conan profile detect | |
DEFAULT_PROFILE_PATH=`conan profile path default` | |
PROFILE_PATH=./conan-profiles/${{ matrix.os }} | |
diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true | |
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} | |
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 | |
- name: build ${{ matrix.lib }} | |
run: conan create libs/${{ matrix.lib }} --build=missing -o boost/*:header_only=True | |
- name: build ${{ matrix.lib }} tests | |
run: conan create libs/${{ matrix.lib }}/test --build=missing -o boost/*:header_only=True --format json > test-${{ matrix.lib }}.json | |
- name: run ${{ matrix.lib }} tests | |
shell: bash | |
run: | | |
PKGPATH=`./rootpath test-${{ matrix.lib }}.json test-${{ matrix.lib }}` | |
cd ${PKGPATH}/bin | |
./test-${{ matrix.lib }} |