clebsch gordan submodule - implementation of TorchScript interface #374
Workflow file for this run
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: Python tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
# Check all PR | |
concurrency: | |
group: python-tests-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
container: ${{ matrix.container }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
python-version: "3.8" | |
- os: ubuntu-20.04 | |
python-version: "3.12" | |
- os: macos-11 | |
python-version: "3.12" | |
- os: windows-2019 | |
python-version: "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: setup rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
echo "tox_version=$(python -c 'import tox; print(tox.__version__)')" >> $GITHUB_ENV | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
with: | |
version: "v0.5.4" | |
- name: Setup sccache environnement variables | |
run: | | |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
- name: cache tox environments | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: tox-${{ env.tox_version }}-${{ matrix.os }}-${{ hashFiles('tox.ini') }} | |
- name: run tox | |
run: tox | |
env: | |
# Use the CPU only version of torch when building/running the code | |
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu | |
# second set of jobs checking that (non-test) code still compiles/run as expected | |
prevent-bitrot: | |
runs-on: ${{ matrix.os }} | |
name: Python ${{ matrix.python-version }} / check build | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.12'] | |
os: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: setup rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-gnu | |
- name: install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
echo "tox_version=$(python -c 'import tox; print(tox.__version__)')" >> $GITHUB_ENV | |
- name: cache tox environments | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: tox-${{ env.tox_version }}-${{ matrix.os }}-${{ hashFiles('tox.ini') }} | |
- name: python build tests | |
run: tox -e build-python | |
env: | |
# Use the CPU only version of torch when building/running the code | |
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu |