-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (86 loc) · 2.89 KB
/
main.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant
name: Java CI - Main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Daily at midnight
schedule:
- cron: '0 0 * * *'
permissions:
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Because of scheduled runs, by default run on default branch
with:
ref: main
path: workspace/coral
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Check out specs-java-libs repo
uses: actions/checkout@v4
with:
repository: specs-feup/specs-java-libs
path: workspace/specs-java-libs
- name: Check out lara-framework repo
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
ref: master
path: workspace/lara-framework
- name: Check out Clava repo
uses: actions/checkout@v4
with:
repository: specs-feup/clava
ref: master
path: workspace/clava
- name: Check out clava-flow in the compatible version
uses: actions/checkout@v4
with:
repository: specs-feup/clava-flow
#ref: a504de47349e525c778ccb34c14836a0cb9af7ae
path: workspace/clava-flow
- name: Create package.json
working-directory: workspace
run: |
touch package.json
echo '{"name": "myPackage", "type": "module", "workspaces": ["clava/Clava-JS", "lara-framework/Lara-JS", "coral", "clava-flow"]}' >> package.json
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install node libraries
working-directory: workspace
run: |
npm i
npm run build -w lara-framework/Lara-JS
npm run build -w clava/Clava-JS
npm run build -w clava-flow
npm run build -w coral
npm i
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
# Setting up gradle multi-project would be helpful
- name: InstallDist Clava
working-directory: workspace/clava/ClavaWeaver
run: gradle installDist
- name: Put java binary in Clava-JS
working-directory: workspace
run: |
mkdir clava/Clava-JS/java-binaries
cp -r ./clava/ClavaWeaver/build/install/ClavaWeaver ./clava/Clava-JS/java-binaries
- name: Run CORAL tests
working-directory: workspace/coral
run: |
npm run test
if [ -f out/.failed ]; then exit 1; fi