Skip to content

Commit

Permalink
Merge branch 'master' into target-property-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
byeonggiljun authored Jun 21, 2024
2 parents b728aef + ff32521 commit b8c55e6
Show file tree
Hide file tree
Showing 146 changed files with 4,256 additions and 1,780 deletions.
43 changes: 43 additions & 0 deletions .github/actions/setup-flexpret/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Install FlexPRET and dependencies (Linux only)
description: Install FlexPRET and dependencies (Linux only)
runs:
using: "composite"
steps:
- name: Setup
run: |
# Clone the FlexPRET repository
git clone --recurse-submodules https://github.com/pretis/flexpret
# This rest is copied directly from FlexPRET's `azure-pipelines.yml`
# Ubuntu 20.04 only has Verilator 4.028 but we neeed a more modern version
# so we do not use 'sudo apt-get install -y -qq verilator' here.
wget -q https://github.com/sifive/verilator/releases/download/4.036-0sifive2/verilator_4.036-0sifive2_amd64.deb -O verilator.deb
sudo dpkg -i verilator.deb
# Install riscv compiler
wget https://github.com/stnolting/riscv-gcc-prebuilt/releases/download/rv32i-4.0.0/riscv32-unknown-elf.gcc-12.1.0.tar.gz
sudo mkdir /opt/riscv
sudo tar -xzf riscv32-unknown-elf.gcc-12.1.0.tar.gz -C /opt/riscv/
rm riscv32-unknown-elf.gcc-12.1.0.tar.gz
# Update submodules
git submodule update --init --recursive
# Save location of RISC-V compiler to reuse later
echo "FP_RISCV_COMPILER=/opt/riscv" >> "$GITHUB_ENV"
shell: bash
- name: Build FlexPRET and install to SDK
run: |
# Step into cloned directory
cd flexpret
# Save pwd to environment variable so we can find `env.bash` in later steps
echo "FP_DIR=$(pwd)" >> "$GITHUB_ENV"
# Source environment
source env.bash
# Build FlexPRET's high memory configuration and install it to SDK
cd $FP_PATH && cmake -DFP_CONFIG=highmem -B build && cd build && make all install
shell: bash
30 changes: 30 additions & 0 deletions .github/workflows/all-embedded.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Tests for embedded platforms
name: CI (embedded platforms)

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types: [synchronize, opened, reopened, ready_for_review, converted_to_draft]
merge_group:

env:
# 2020.11
vcpkgGitRef: 0bf3923f9fab4001c00f0f429682a0853b5749e0

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

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

c-embedded:
uses: ./.github/workflows/c-embedded.yml
needs: check-diff
if: ${{ needs.check-diff.outputs.run_c == 'true' }}

# Add more languages if supported
25 changes: 25 additions & 0 deletions .github/workflows/c-embedded.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: C embedded

on:
workflow_dispatch:
workflow_call:


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

jobs:
# Run the C Arduino integration tests.
arduino:
uses: ./.github/workflows/c-arduino-tests.yml
with:
all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}

# Run the C Zephyr integration tests.
zephyr:
uses: ./.github/workflows/c-zephyr-tests.yml

# Run the C FlexPRET integration tests.
flexpret:
uses: ./.github/workflows/c-flexpret-tests.yml
58 changes: 58 additions & 0 deletions .github/workflows/c-flexpret-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: C FlexPRET tests

on:
workflow_call:
inputs:
compiler-ref:
required: false
type: string
runtime-ref:
required: false
type: string
use-cpp:
required: false
type: boolean
default: false
scheduler:
required: false
type: string
all-platforms:
required: false
default: true
type: boolean

jobs:
flexpret-tests:
runs-on: ubuntu-latest
steps:
- name: Check out lingua-franca repository
uses: actions/checkout@v3
with:
repository: lf-lang/lingua-franca
submodules: true
ref: ${{ inputs.compiler-ref }}
fetch-depth: 0
- name: Prepare build environment
uses: ./.github/actions/prepare-build-env
- name: Setup and build FlexPRET
uses: ./.github/actions/setup-flexpret
- name: Check out specific ref of reactor-c
uses: actions/checkout@v3
with:
repository: lf-lang/reactor-c
path: core/src/main/resources/lib/c/reactor-c
ref: ${{ inputs.runtime-ref }}
if: ${{ inputs.runtime-ref }}
- name: Run FlexPRET smoke tests
run: |
cd "$FP_DIR" && source env.bash && cd -
export RISCV_TOOL_PATH_PREFIX=$FP_RISCV_COMPILER
./gradlew core:integrationTest \
--tests org.lflang.tests.runtime.CFlexPRETTest.* \
core:integrationTestCodeCoverageReport
rm -rf test/C/src-gen
- name: Report to CodeCov
uses: ./.github/actions/report-code-coverage
with:
files: core/build/reports/jacoco/integrationTestCodeCoverageReport/integrationTestCodeCoverageReport.xml
if: ${{ github.repository == 'lf-lang/lingua-franca' }}
10 changes: 4 additions & 6 deletions .github/workflows/lsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
- name: Uninstall packages Ubuntu
run: sudo apt-get remove clang-*
if: ${{ runner.os == 'Linux' }}
- name: Uninstall packages MacOS
run: brew uninstall --ignore-dependencies gcc
if: ${{ runner.os == 'macOS' }}
- name: Uninstall packages Windows
shell: pwsh
run: |
Expand All @@ -51,10 +48,11 @@ jobs:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('core/src/main/resources/lib/ts/package.json') }}
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: nightly
toolchain: stable
components: clippy
rustflags: "" # don't use -D warnings
- name: Install Dependencies Ubuntu
run: |
sudo apt-get install libprotobuf-dev protobuf-compiler libprotobuf-c-dev protobuf-c-compiler
Expand All @@ -67,7 +65,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
- name: Run language server Python tests without PyLint
run: ./gradlew core:integrationTest --tests org.lflang.tests.lsp.LspTests.pythonValidationTestSyntaxOnly core:integrationTestCodeCoverageReport
- name: Install pylint
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/only-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ jobs:
with:
target: "C"

# Run the C Arduino integration tests.
arduino:
uses: ./.github/workflows/c-arduino-tests.yml
with:
all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}

# Run the C Zephyr integration tests.
zephyr:
uses: ./.github/workflows/c-zephyr-tests.yml

# Run the CCpp integration tests.
ccpp:
uses: ./.github/workflows/c-tests.yml
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/rs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,22 @@ jobs:
if: inputs.runtime-ref
- name: Setup Rust
id: rustup
uses: ATiltedTree/setup-rust@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: ${{ matrix.rust }}
toolchain: ${{ matrix.rust }}
components: clippy
rustflags: "" # don't use -D warnings
continue-on-error: true
- name: Delete rustup cache
run: rm -r ~/.rustup
if: ${{ steps.rustup.outcome }} != "success"
- name: Setup Rust (again)
if: ${{ steps.rustup.outcome }} != "success"
uses: ATiltedTree/setup-rust@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: ${{ matrix.rust }}
toolchain: ${{ matrix.rust }}
components: clippy
rustflags: "" # don't use -D warnings
- name: Run Rust tests
run: ./gradlew targetTest -Ptarget=Rust
- name: Report to CodeCov
Expand Down
16 changes: 16 additions & 0 deletions .run/LanguageDiagramServer.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="LanguageDiagramServer" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="org.lflang.diagram.lsp.LanguageDiagramServer" />
<module name="org.lflang.lsp.main" />
<option name="VM_PARAMETERS" value="-Dport=7670 -Djava.awt.headless=true" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.lflang.diagram.lsp.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
Loading

0 comments on commit b8c55e6

Please sign in to comment.