Skip to content

Commit

Permalink
trying to make the setup reusable
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Oct 1, 2023
1 parent e5ddf49 commit 5e41ad3
Show file tree
Hide file tree
Showing 5 changed files with 1,153 additions and 48 deletions.
41 changes: 41 additions & 0 deletions .github/actions/environment/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build toolchain
description: Installs Dependencies and Compiles Lingo

inputs:

runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- 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 cli
export PATH="$HOME/.local/bin:$PATH"
# copying Lingo.toml
# cp test/Lingo-Cpp.toml ./lingua-franca/test/Lingo.toml
# cd ./lingua-franca/test/Cpp
# ../../../target/release/lingo build
shell: bash
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
pull_request:
push:
branches:
- main

name: Test Lingo
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Setuo
uses: ./.github/actions/environment
- name: Integration Test
run: |
# copying Lingo.toml
cp test/Lingo-Cpp.toml ./lingua-franca/test/Lingo.toml
cd ./lingua-franca/test/Cpp
../../../target/release/lingo build
shell: bash

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

This file was deleted.

4 changes: 2 additions & 2 deletions test/Lingo-Cpp.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "Tests"
name = "Cpp-Tests"
version = "0.1.0"
homepage = "https://lf-lang.org"
description = "All Lingua-Franca Unit Tests"
description = "All Cpp Lingua-Franca Unit Tests"

# shared properties of all binaries
[properties]
Expand Down
Loading

0 comments on commit 5e41ad3

Please sign in to comment.