Merge pull request #187 from diprism/requirements #677
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: CI | |
on: [push] | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: require haskell | |
uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: '9.2.4' | |
- name: checkout perpl | |
uses: actions/checkout@v2 | |
with: | |
repository: diprism/perpl | |
ref: 'testing' | |
path: ./perpl | |
- name: build perpl | |
run: make | |
working-directory: ./perpl | |
- name: prepare artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: perpl | |
path: | | |
./perpl/perplc | |
./perpl/tests | |
test-torch: | |
runs-on: ubuntu-latest | |
needs: prepare | |
strategy: | |
matrix: | |
pytorch-version: [ '1.9', '1.10', '1.11', '1.12', '1.13' ] | |
steps: | |
- run: echo "checking out branch ${{ github.ref }} on ${{ github.repository }}." | |
- name: checkout repository | |
uses: actions/checkout@v2 | |
- name: install python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: change PyTorch version to oldest supported | |
run: python -m pip install torch==${{ matrix.pytorch-version }} | |
- name: check types | |
run: make typecheck | |
- name: download perpl | |
uses: actions/download-artifact@v3 | |
with: | |
name: perpl | |
- name: perform unit testing | |
run: | | |
chmod u+x ./perplc | |
make test | |
test-python: | |
runs-on: ubuntu-latest | |
needs: prepare | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] | |
steps: | |
- run: echo "checking out branch ${{ github.ref }} on ${{ github.repository }}." | |
- name: checkout repository | |
uses: actions/checkout@v2 | |
- name: install python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: check types | |
run: make typecheck | |
- name: download perpl | |
uses: actions/download-artifact@v3 | |
with: | |
name: perpl | |
- name: perform unit testing | |
run: | | |
chmod u+x ./perplc | |
make test |