74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
name: Python
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install PyYAML
|
|
- name: Build BLST
|
|
run: |
|
|
cd src
|
|
make blst
|
|
- name: Build CKZG
|
|
run: |
|
|
cd src
|
|
make
|
|
- name: Build Python bindings
|
|
run: |
|
|
cd bindings/python
|
|
make install
|
|
- name: Test
|
|
run: |
|
|
cd bindings/python
|
|
make test
|
|
|
|
test-sdist:
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install PyYAML
|
|
- name: Build sdist
|
|
run: python setup.py sdist
|
|
- name: Set up Visual Studio shell
|
|
if: runner.os == 'Windows'
|
|
uses: egor-tensin/vs-shell@v2
|
|
- name: Install via sdist
|
|
working-directory: dist
|
|
run: pip install ckzg-*.tar.gz
|
|
- name: Run tests
|
|
run: make -C bindings/python test
|