Linux CI Python #2
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: "Linux CI Python" | |
on: | |
push: | |
branches: [ master, xacc-devel ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
# once every weekend | |
- cron: '0 3 * * 6' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Linux CI" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Declares the repository safe and not under dubious ownership. | |
- name: Add repository to git safe directories | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Create Build Environment | |
run: cmake -E make_directory build | |
- name: Install dependencies | |
run: sudo apt-get -y update && sudo apt-get install -y --no-install-recommends ninja-build libssl-dev libcurl4-openssl-dev python3 libpython3-dev python3-pip libblas-dev liblapack-dev | |
- name: Install optional Python Packages | |
run: python3 -m pip install numpy pyscf cma | |
- name: Configure | |
working-directory: build/ | |
run: cmake -GNinja $GITHUB_WORKSPACE | |
- name: Build | |
working-directory: build/ | |
run: cmake --build . --target install | |
- name: Test | |
working-directory: python/tests | |
run: export PYTHONPATH=$PYTHONPATH:~/.xacc && python3 -m unittest discover -s . -p '*_testing.py' |