-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (43 loc) · 1.7 KB
/
python-native.yml
File metadata and controls
43 lines (43 loc) · 1.7 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
name: Python Native
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: treeform/setup-nim-action@v6
- name: Checkout Pixie
uses: actions/checkout@v4
with:
repository: treeform/pixie
ref: pixie-binding-abi-fixes
path: pixie
- name: Move Pixie checkout beside Genny
run: rm -rf ../pixie && mv pixie ../pixie
- name: Install Pixie dependencies
run: cd .. && nimby install -g pixie/pixie.nimble
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build native extension
run: |
EXT_SUFFIX="$(python -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')"
nim c --mm:arc --app:lib -d:gennyPythonNative -o:tests/generated/test${EXT_SUFFIX} tests/test.nim
- name: Run native Python test
run: python tests/test_python_native.py
- name: Build Pixie native extension
run: |
EXT_SUFFIX="$(python -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')"
cd ../pixie
nim c --mm:arc --app:lib -d:gennyPythonNative --path:../genny/src --path:src -o:bindings/generated/pixie${EXT_SUFFIX} bindings/bindings.nim
- name: Run Pixie native Python test
run: PIXIE_ROOT=../pixie PIXIE_BINDINGS_DIR=../pixie/bindings/generated LD_LIBRARY_PATH=$PWD/../pixie/bindings/generated python tests/test_pixie_python_native.py
- name: Run non-gating benchmark
continue-on-error: true
run: python tests/bench_python_native.py
- name: Compare Pixie render goldens
run: nim r --mm:arc --path:../pixie/src tests/test_no_gold_diff.nim