-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (46 loc) · 1.65 KB
/
kscript.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This is a CI workflow to execute the examples script using kscript. Notice that scripts depending on MATLAB/Simulink are ignored due to the licensing issues.
name: kscript examples
on:
push:
paths-ignore:
- 'README.md'
jobs:
kscript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Ensure the installation of Maven (for self-hosted runners)
run: |
sudo apt-get update && sudo apt-get install maven -y
- uses: actions/setup-java@v4
with:
java-version: '17'
java-package: jdk
distribution: 'temurin'
- name: Install LTSMin
run: |
wget https://github.com/Meijuh/ltsmin/releases/download/v3.1.0/ltsmin-v3.1.0-linux.tgz
tar xvf ltsmin-v3.1.0-linux.tgz
sudo cp -r v3.1.0/* /usr
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and install the top project and the core project with Maven
run: mvn install --also-make --projects core
- name: Install Kotlin 1.9.X with SDKMAN
uses: sdkman/sdkman-action@b1f9b696c79148b66d3d3a06f7ea801820318d0f
with:
candidate: kotlin
version: 1.9.24
- name: Install Kscript with SDKMAN
uses: sdkman/sdkman-action@b1f9b696c79148b66d3d3a06f7ea801820318d0f
with:
candidate: kscript
- name: Run the examples
run: |
cd example/kotlin
kscript ./mealy-nox.main.kts