Skip to content

Commit

Permalink
adding github ci and fixed couple of bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Nov 13, 2023
1 parent 484e18a commit 39ad982
Show file tree
Hide file tree
Showing 25 changed files with 2,277 additions and 1,628 deletions.
37 changes: 37 additions & 0 deletions .github/actions/environment/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build toolchain
description: Installs Dependencies and Compiles Lingo

runs:
using: "composite"
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Integration Test
run: |
# setting java17
ls -alh /usr/lib/jvm/
# export JAVA_HOME=/usr/lib/jvm/java-17-temurin-amd64
# building lingo
cargo b --release
# installing lingua-franca tests
git clone https://github.com/lf-lang/lingua-franca.git ./lingua-franca
# installing lfc
curl -Ls https://install.lf-lang.org | bash -s nightly cli
export PATH="$HOME/.local/bin:$PATH"
# going into lfc repo and checking out the vers
cd ./lingua-franca
git reset nightly
cd ..
shell: bash
57 changes: 57 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
pull_request:
push:
branches:
- main

name: Test Lingo
jobs:
cpp-test:
name: CPP Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/environment
- name: Integration Test Cpp
run: |
# copying Lingo.toml
cp test/Lingo-Cpp.toml ./lingua-franca/test/Lingo.toml
cd ./lingua-franca/test/
../../target/release/lingo build
shell: bash
typescript-test:
name: TypeScript Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/environment
- name: Integration Test TypeScript
run: |
# copying Lingo.toml
cp test/Lingo-TypeScript.toml ./lingua-franca/test/Lingo.toml
cd ./lingua-franca/test/
../../target/release/lingo build
shell: bash
lfc-test:
name: LFC Fallback Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/environment
- name: Integration Test TypeScript
run: |
# copying Lingo.toml
cp test/Lingo-LFC.toml ./lingua-franca/test/Lingo.toml
cd ./lingua-franca/test/
../../target/release/lingo build
shell: bash

52 changes: 0 additions & 52 deletions .github/workflows/sandbox.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ sandbox/
build/
**/src-gen/
tmp/
lf-test
lingua-franca
Loading

0 comments on commit 39ad982

Please sign in to comment.