Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into c-enclaves
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Apr 17, 2024
2 parents 17b3e73 + 8a9a23d commit b0e627a
Show file tree
Hide file tree
Showing 213 changed files with 21,036 additions and 22,123 deletions.
9 changes: 9 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
BasedOnStyle: LLVM
Language: Cpp
IndentWidth: 2
BreakConstructorInitializersBeforeComma: 'true'
PointerAlignment: Left
IncludeBlocks: Preserve
SortIncludes: false
ColumnLimit: 120
11 changes: 11 additions & 0 deletions .github/scripts/check-diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

changes() {
git diff --name-only HEAD $(git merge-base HEAD origin/main)
}

if changes | grep "$1" | grep -q -v "^.*md\|txt$"; then
echo "changed_$2=1" >> $GITHUB_OUTPUT
else
echo "changed_$2=0" >> $GITHUB_OUTPUT
fi
32 changes: 24 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ on:
branches:
- main
pull_request:
# Also allow running this workflow manually from the Actions tab.
types: [synchronize, opened, reopened, ready_for_review, converted_to_draft]
workflow_dispatch:
merge_group:

concurrency:
group: ci-${{ github.ref }}-${{ github.event_path }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
check-labels:
uses: lf-lang/lingua-franca/.github/workflows/check-labels.yml@master
if: ${{ github.event_name == 'pull_request' }}

unit-tests-single:
uses: ./.github/workflows/unit-tests.yml
with:
Expand All @@ -30,47 +39,54 @@ jobs:
with:
file: 'lingua-franca-ref.txt'


lf-default-arduino:
needs: fetch-lf
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.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'arduino') }}

lf-default-zephyr:
needs: fetch-lf
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.pull_request.draft ||contains( github.event.pull_request.labels.*.name, 'zephyr') }}

lf-default:
needs: fetch-lf
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.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'mac') || contains( github.event.pull_request.labels.*.name, 'windows') }}

lf-python:
needs: fetch-lf
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.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'python') }}

lf-gedf-np:
needs: fetch-lf
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.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'mac') || contains( github.event.pull_request.labels.*.name, 'windows') }}
if: ${{ !github.event.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'schedulers') }}

lf-adaptive:
needs: fetch-lf
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.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'mac') || contains( github.event.pull_request.labels.*.name, 'windows') }}
if: ${{ !github.event.pull_request.draft || contains( github.event.pull_request.labels.*.name, 'schedulers') }}
16 changes: 16 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: clang-format-review

# You can be more specific, but it currently only works on pull requests
on: [pull_request]

jobs:
clang-format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install clang-tidy
run: |
sudo apt-get update
sudo apt-get install -y clang-tidy
- name: Analyze
run: make format-check
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
/docs/_build
/docs/api
**/.vscode/
/build/
**/build/
**/.DS_Store
/core/federated/RTI/build/
/cmake-build-debug/

# Generated trace files
*.lft
util/tracing/trace_to_chrome
util/tracing/trace_to_chrome.o
util/tracing/trace_to_csv
util/tracing/trace_to_csv.o
util/tracing/trace_to_influxdb
util/tracing/trace_to_influxdb.o
util/tracing/trace_util.o
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ if(DEFINED LF_SINGLE_THREADED)
add_compile_definitions(LF_SINGLE_THREADED=1)
endif()

# Warnings as errors
add_compile_options(-Werror)

set(Test test)
set(Lib lib)
set(CoreLib core)
set(CoreLibPath core)
set(CoreLib reactor-c)
set(PlatformLib platform)

include_directories(${CMAKE_SOURCE_DIR}/include)
Expand All @@ -40,6 +44,6 @@ include_directories(${CMAKE_SOURCE_DIR}/include/api)
enable_testing()
add_subdirectory(${Test})
add_subdirectory(${Lib})
add_subdirectory(${CoreLib})
add_subdirectory(${CoreLibPath})

include(test/Tests.cmake)
Loading

0 comments on commit b0e627a

Please sign in to comment.