-
Notifications
You must be signed in to change notification settings - Fork 11
147 lines (118 loc) · 4.1 KB
/
gradle.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# 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
on:
push:
pull_request:
# Daily at midnight
schedule:
- cron: '0 0 * * *'
permissions:
checks: write
contents: write
env:
JAVA_VERSION: 17
jobs:
build-java:
name: Build Java
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
DEFAULT_BRANCH: ${{ github.base_ref || 'master' }}
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: current
dependency-graph: generate-and-submit
- name: Checkout Clava
uses: actions/checkout@v4
with:
path: clava
- name: Check if branch exists on lara-framework
id: Branch-lara-framework
run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l
- name: Check if branch exists on specs-java-libs
id: Branch-specs-java-libs
run: git ls-remote --heads https://github.com/specs-feup/specs-java-libs.git refs/heads/${{ env.BRANCH_NAME }} | wc -l
- name: Checkout lara-framework
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
path: lara-framework
#ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} Disabled until PR is merged
ref: "feature/lara-js"
- name: Checkout specs-java-libs
uses: actions/checkout@v4
with:
repository: specs-feup/specs-java-libs
path: specs-java-libs
ref: ${{ steps.Branch-specs-java-libs.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }}
- name: Build with Gradle
run: |
cd clava/ClavaWeaver
gradle installDist
- name: Upload ClavaWeaver artifacts
uses: actions/upload-artifact@v4
with:
name: java-binaries
path: clava/ClavaWeaver/build/install/ClavaWeaver
build-js:
name: Build JS
needs: build-java
strategy:
fail-fast: false
matrix:
node-version: ['latest']
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Checkout Clava
uses: actions/checkout@v4
with:
path: clava
- name: Check if branch exists on lara-framework
id: Branch-lara-framework
run: git ls-remote --heads https://github.com/specs-feup/lara-framework.git refs/heads/${{ env.BRANCH_NAME }} | wc -l
- name: Checkout lara-framework
uses: actions/checkout@v4
with:
repository: specs-feup/lara-framework
path: lara-framework
#ref: ${{ steps.Branch-lara-framework.outputs.stdout == '1' && env.BRANCH_NAME || env.DEFAULT_BRANCH }} Disabled until PR is merged
ref: "feature/lara-js"
- name: Setup js workspace
run: |
echo '{ "name": "SPeCS Workspace", "type": "module", "workspaces": [ "clava/Clava-JS", "lara-framework/Lara-JS" ] }' > package.json
npm install
- name: Build Lara-JS
run: |
cd lara-framework/Lara-JS
npm run build
- name: Build Clava-JS
run: |
cd clava/Clava-JS
npm run build
- name: Pull java-binaries
uses: actions/download-artifact@v4
with:
name: java-binaries
path: clava/Clava-JS/java-binaries
- name: Test JS
run: |
cd clava/Clava-JS
npm run test