Skip to content

Commit

Permalink
Merge pull request #379 from lf-lang/lf-assert-fix
Browse files Browse the repository at this point in the history
Fix for Clang error
  • Loading branch information
lhstrh authored Mar 2, 2024
2 parents 31bf1ee + 7247ce6 commit 8757989
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 63 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/check-diff.yml

This file was deleted.

27 changes: 12 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,60 +30,57 @@ jobs:
build-trace-tools:
uses: ./.github/workflows/build-trace-tools.yml

check-diff:
uses: ./.github/workflows/check-diff.yml

fetch-lf:
uses: lf-lang/lingua-franca/.github/workflows/extract-ref.yml@master
with:
file: 'lingua-franca-ref.txt'

lf-default-arduino:
needs: [fetch-lf, check-diff]
needs: [fetch-lf]
uses: lf-lang/lingua-franca/.github/workflows/c-arduino-tests.yml@master
with:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
if: ${{ github.event_name == 'merge_group' || needs.check-diff.outputs.run_arduino == 'true' }}
if: ${{ github.event_name == 'merge_group' || github.ref == 'refs/heads/main' || contains( github.event.pull_request.labels.*.name, 'arduino') }}

lf-default-zephyr:
needs: [fetch-lf, check-diff]
needs: [fetch-lf]
uses: lf-lang/lingua-franca/.github/workflows/c-zephyr-tests.yml@master
with:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
if: ${{ github.event_name == 'merge_group' || needs.check-diff.outputs.run_zephyr == 'true' }}
if: ${{ github.event_name == 'merge_group' || github.ref == 'refs/heads/main' ||contains( github.event.pull_request.labels.*.name, 'zephyr') }}

lf-default:
needs: [fetch-lf, check-diff]
needs: [fetch-lf]
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
with:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
all-platforms: ${{ github.event_name == 'merge_group' || needs.check-diff.outputs.run_macos == 'true' || needs.check-diff.outputs.run_windows == 'true' }}
all-platforms: ${{ github.event_name == 'merge_group' || github.ref == 'refs/heads/main' || contains( github.event.pull_request.labels.*.name, 'mac') || contains( github.event.pull_request.labels.*.name, 'windows') }}

lf-python:
needs: [fetch-lf, check-diff]
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 }}
if: ${{ github.event_name == 'merge_group' || needs.check-diff.outputs.run_python == 'true' }}
if: ${{ github.event_name == 'merge_group' || github.ref == 'refs/heads/main' ||contains( github.event.pull_request.labels.*.name, 'python') }}

lf-gedf-np:
needs: [fetch-lf, check-diff]
needs: [fetch-lf]
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
with:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
scheduler: GEDF_NP
all-platforms: ${{ github.event_name == 'merge_group' || needs.check-diff.outputs.run_macos == 'true' || needs.check-diff.outputs.run_windows == 'true' }}
all-platforms: ${{ github.event_name == 'merge_group' || github.ref == 'refs/heads/main' || contains( github.event.pull_request.labels.*.name, 'mac') || contains( github.event.pull_request.labels.*.name, 'windows') }}

lf-adaptive:
needs: [fetch-lf, check-diff]
needs: [fetch-lf]
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
with:
runtime-ref: ${{ github.ref }}
compiler-ref: ${{ needs.fetch-lf.outputs.ref }}
scheduler: ADAPTIVE
all-platforms: ${{ github.event_name == 'merge_group' || needs.check-diff.outputs.run_macos == 'true' || needs.check-diff.outputs.run_windows == 'true' }}
all-platforms: ${{ github.event_name == 'merge_group' || github.ref == 'refs/heads/main' || contains( github.event.pull_request.labels.*.name, 'mac') || contains( github.event.pull_request.labels.*.name, 'windows') }}
4 changes: 2 additions & 2 deletions logging/api/logging_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@
#define LF_ASSERT(condition, format, ...) \
do { \
if (!(condition)) { \
lf_print_error_and_exit("`"format "`. Failed assertion in %s:%d(%s):(" #condition \
lf_print_error_and_exit("`" format "`. Failed assertion in %s:%d(%s):(" #condition \
") != true`", ##__VA_ARGS__, __FILE__, __LINE__, __func__); \
} \
} while(0)
#define LF_ASSERTN(condition, format, ...) \
do { \
if (condition) { \
lf_print_error_and_exit("`"format "`. Failed assertion in %s:%d(%s):(" #condition \
lf_print_error_and_exit("`" format "`. Failed assertion in %s:%d(%s):(" #condition \
") != false`", ##__VA_ARGS__, __FILE__, __LINE__, __func__); \
} \
} while(0)
Expand Down

0 comments on commit 8757989

Please sign in to comment.