Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Sep 26, 2023
1 parent ed352e8 commit b766452
Show file tree
Hide file tree
Showing 6 changed files with 10,699 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/sandbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on:
pull_request:
push:
branches:
- master

name: Sandbox
jobs:
check:
name: Sandbox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- id: get-release
name: get-latest-release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: lf-lang/lingua-franca
- name: Integration Test
run: |
# uninstalling java11 and installing java17
sudo apt remove openjdk-11-jre-headless
sudo apt remove temurin-11-jdk
sudo apt remove temurin-8-jdk
sudo apt install openjdk-17-jre-headless
# setting java17
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
# building lingo
cargo b --release
# installing lingua-franca tests
git clone https://github.com/lf-lang/lingua-franca.git ./lf-test
# installing lfc
curl -L0 https://github.com/lf-lang/lingua-franca/releases/download/v0.5.1/lf-cli-0.5.1-Linux-x86_64.tar.gz --output ./lf-release.tar.gz
tar -xvf ./lf-release.tar.gz
# copying Lingo.toml
cp test/Lingo-Cpp.toml ./lf-test/test/Lingo.toml
cd ./lf-test/test/Cpp
../../../target/release/lingo build --lfc ../../../lf-cli-0.5.1-Linux-x86_64/bin/lfc
shell: bash

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ sandbox/
build/
**/src-gen/
tmp/
lf-test
2 changes: 1 addition & 1 deletion src/backends/cmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn gen_cmake_files(app: &App, options: &BuildCommandOptions) -> BuildResult {
}

fn do_cmake_build(results: &mut BatchBuildResults, options: &BuildCommandOptions) {
super::lfc::LFC::do_parallel_lfc_codegen(options, results, false);
super::lfc::LFC::do_parallel_lfc_codegen(options, results, true);
if !options.compile_target_code {
return;
}
Expand Down
5 changes: 4 additions & 1 deletion src/backends/lfc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ impl<'a> LfcJsonArgs<'a> {
.unwrap()
.as_object_mut()
.unwrap();
properties.insert("no-compile".to_string(), self.no_compile.into());

if !self.no_compile {
properties.insert("no-compile".to_string(), serde_json::Value::Bool(true));
}
Ok(value)
}
}
Expand Down
11 changes: 11 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cargo b --release
git clone https://github.com/lf-lang/lingua-franca.git ./lf-test
curl -L0 https://github.com/lf-lang/lingua-franca/releases/download/v0.4.0/lf-cli-0.4.0.tar.gz --output ./lf-release.tar.gz
tar -xvf ./lf-release.tar.gz
#tar -xf ./lf-release.tar.gz
#sed -i 's/#!//bin//bash/#!//run//current-system//sw//bin//bash//' lf-cli-0.4.0/bin/lfc
cp test/Lingo-Cpp.toml ./lf-test/test/Cpp/Lingo.toml
cd ./lf-test/test/Cpp
ls ../../../
ls
../../../target/release/lingo build --lfc ../../../lf-cli-0.4.0/bin/lfc
Loading

0 comments on commit b766452

Please sign in to comment.