diff --git a/.github/workflows/check-diff.yml b/.github/workflows/check-diff.yml deleted file mode 100644 index ecb22827d..000000000 --- a/.github/workflows/check-diff.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Check diff from main - -on: - workflow_call: - outputs: - run_arduino: - description: 'Return true if Arduino tests should be run' - value: ${{ jobs.check.outputs.run_arduino == 'true' }} - run_macos: - description: 'Return true if macOS tests should be run' - value: ${{ jobs.check.outputs.run_macos == 'true' }} - run_python: - description: 'Return true if Python tests should be run' - value: ${{ jobs.check.outputs.run_python == 'true' }} - run_windows: - description: 'Return true if Windows tests should be run' - value: ${{ jobs.check.outputs.run_windows == 'true' }} - run_zephyr: - description: 'Return true if Zephyr tests should be run' - value: ${{ jobs.check.outputs.run_zephyr == 'true' }} - -jobs: - check: - runs-on: ubuntu-latest - outputs: - run_arduino: ${{ steps.do.outputs.changed_arduino == 1 || github.ref == 'refs/heads/main' }} - run_macos: ${{ steps.do.outputs.changed_macos == 1 || github.ref == 'refs/heads/main' }} - run_python: ${{ steps.do.outputs.changed_python == 1 || github.ref == 'refs/heads/main' }} - run_windows: ${{ steps.do.outputs.changed_windows == 1 || github.ref == 'refs/heads/main' }} - run_zephyr: ${{ steps.do.outputs.changed_zephyr == 1 || github.ref == 'refs/heads/main' }} - - steps: - - name: Check out reactor-c repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - id: do - name: Check which targets have changes - run: | - ./check-diff.sh "arduino" arduino - ./check-diff.sh "macos|unix" macos - ./check-diff.sh "python" python - ./check-diff.sh "windows" windows - ./check-diff.sh "zephyr" zephyr - shell: bash - working-directory: .github/scripts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c2f14ebb..fa8a5f752 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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') }} diff --git a/logging/api/logging_macros.h b/logging/api/logging_macros.h index b29754b7c..0864cdea7 100644 --- a/logging/api/logging_macros.h +++ b/logging/api/logging_macros.h @@ -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)