-
Notifications
You must be signed in to change notification settings - Fork 9
36 lines (36 loc) · 1.45 KB
/
cpp.yml
File metadata and controls
36 lines (36 loc) · 1.45 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
name: CPP
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
- name: Build test DLL
run: nim c --mm:arc --app:lib -d:gennyCpp -o:tests/generated/libtest.so tests/test.nim
- name: Compile C++ test
run: g++ -o tests/test_cpp tests/test_cpp.cpp -I tests/generated -L tests/generated -l:libtest.so -Wl,-rpath,'$ORIGIN/generated'
- name: Run C++ test
run: ./tests/test_cpp
- name: Build Pixie bindings
run: cd ../pixie && nim c --mm:arc --app:lib -d:gennyCpp --path:../genny/src --path:src -o:bindings/generated/libpixie.so bindings/bindings.nim
- name: Compile Pixie C++ test
run: g++ -o tests/test_pixie_cpp tests/test_pixie_cpp.cpp -I ../pixie/bindings/generated -L ../pixie/bindings/generated -l:libpixie.so -Wl,-rpath,'$ORIGIN/../../pixie/bindings/generated'
- name: Run Pixie C++ test
run: ./tests/test_pixie_cpp
- name: Compare Pixie render goldens
run: nim r --mm:arc --path:../pixie/src tests/test_no_gold_diff.nim