forked from VeriFIT/mata
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (68 loc) · 2.26 KB
/
Copy pathpython-binding.yml
File metadata and controls
68 lines (68 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Python-Binding (build-&-test)
permissions: write-all
on:
push:
branches:
- master
- devel
pull_request:
branches:
- master
- devel
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Python environment
uses: ./.github/workflows/actions/setup-python
with:
python-version: ${{ matrix.python-version}}
- name: Install The Binding
run: |
make -C bindings/python install
- name: Run tests
run: |
make -C bindings/python test
- name: Install runner for jupyter notebooks
run: |
python3 -m pip install ipykernel
python3 -m ipykernel install --user
python3 -m pip install numpy
python3 -m pip install seaborn
python3 -m pip install papermill pandas
- name: Test the jupyter notebooks
run: |
papermill ./examples/notebooks/example-01-ws1s-formulae.ipynb out.ipynb
papermill ./examples/notebooks/example-02-redos-attacks.ipynb out.ipynb
papermill ./examples/notebooks/example-03-exploring-maze.ipynb out.ipynb
build-from-tar:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v6
with:
# fetch-depth: 0
# If PR, checkout the PR's repo (needed for PRs coming from forks).
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Python environment
uses: ./.github/workflows/actions/setup-python
with:
python-version: ${{ matrix.python-version}}
- name: Create tarball
run: |
make -C bindings/python pypi-release
- name: Install from tarball
run: |
pip3 install bindings/python/dist/*.tar.gz