Skip to content

Commit

Permalink
Merge pull request #303 from lf-lang/python-ci
Browse files Browse the repository at this point in the history
Run Python tests in CI and revert #293
  • Loading branch information
lhstrh authored Nov 8, 2023
2 parents a6dfded + 261b405 commit d82cf9d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ jobs:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}

lf-python:
needs: fetch-lf
uses: lf-lang/lingua-franca/.github/workflows/py-tests.yml@master
with:
reactor-c-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}

lf-gedf-np:
needs: fetch-lf
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
Expand Down
2 changes: 1 addition & 1 deletion lingua-franca-ref.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
decentralized-small-delay-bugfix
master
4 changes: 2 additions & 2 deletions python/lib/pythontarget.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void destroy_action_capsule(PyObject* capsule) {
PyObject* convert_C_port_to_py(void* port, int width) {
// Create the port struct in Python
PyObject* cap =
(PyObject*)PyObject_New(generic_port_capsule_struct, &py_port_capsule_t);
(PyObject*)PyObject_GC_New(generic_port_capsule_struct, &py_port_capsule_t);
if (cap == NULL) {
lf_print_error_and_exit("Failed to convert port.");
}
Expand Down Expand Up @@ -506,7 +506,7 @@ PyObject* convert_C_action_to_py(void* action) {
trigger_t* trigger = ((lf_action_base_t*)action)->trigger;

// Create the action struct in Python
PyObject* cap = (PyObject*)PyObject_New(generic_action_capsule_struct, &py_action_capsule_t);
PyObject* cap = (PyObject*)PyObject_GC_New(generic_action_capsule_struct, &py_action_capsule_t);
if (cap == NULL) {
lf_print_error_and_exit("Failed to convert action.");
}
Expand Down

0 comments on commit d82cf9d

Please sign in to comment.