Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of artifacts produced by Gradle instead of -dev scripts #92

Merged
merged 5 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lf/src/Passing.lf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
target C

main reactor {
reaction(startup) {= printf("Hello World.\n"); =}
reaction(startup) {=
printf("Hello World.\n");
=}
}
8 changes: 6 additions & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ export async function clone(ref: string, dir: string): Promise<void> {
await exec('git submodule update --init', {cwd: dir})
}

export async function build(dir: string): Promise<void> {
await exec('./gradlew assemble', {cwd: dir})
}

export async function gradleStop(dir: string): Promise<void> {
exec('./gradlew --stop', {cwd: dir})
await exec('./gradlew --stop', {cwd: dir})
}

export function configurePath(dir: string): void {
process.env.PATH = `${process.env.PATH}:${path.join(
path.resolve(dir),
'bin'
'build/install/lf-cli/bin'
)}`
}
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core'
import {configurePath, deleteIfExists, clone, gradleStop} from './build'
import {configurePath, deleteIfExists, clone, gradleStop, build} from './build'
import {skipDirs, checkCompile, checkFormat} from './check'

// eslint-disable-next-line no-shadow
Expand Down Expand Up @@ -34,6 +34,9 @@ export async function run(softError = false): Promise<string> {
await clone(ref, dir)
}

core.info(`Building using Gradle...`)
await build(dir)

configurePath(dir)

core.info('Checking all Lingua Franca files:')
Expand Down
Loading