-
-
Notifications
You must be signed in to change notification settings - Fork 1
162 lines (143 loc) · 4.57 KB
/
scala.yml
File metadata and controls
162 lines (143 loc) · 4.57 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Scala Build
on:
workflow_dispatch:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]
paths-ignore:
- 'doc/src/main/hugo/**'
- '.github/workflows/gh-pages.yml'
jobs:
scala-build:
timeout-minutes: 60
permissions:
contents: read
packages: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RIDDLC_PATH: riddlc/native/target/scala-3.4.3/riddlc
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: [JVM, Native, JS]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set Up JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: temurin
cache: sbt
- name: Set Up SBT
uses: sbt/setup-sbt@v1
- name: Coursier Caching
uses: coursier/cache-action@v6
- name: Cache SBT Build Outputs
uses: actions/cache@v4
with:
path: |
**/target/scala-3.4.3
!**/target/scala-3.4.3/src_managed
!**/target/scala-3.4.3/resource_managed
key: ${{ runner.os }}-sbt-build-${{ matrix.platform }}-${{ hashFiles('**/*.sbt', 'project/**') }}
restore-keys: |
${{ runner.os }}-sbt-build-${{ matrix.platform }}-
${{ runner.os }}-sbt-build-
- name: Install LLVM and Clang (Native only)
if: matrix.platform == 'Native'
run: |
sudo apt-get update && sudo apt-get install -y clang llvm
echo CLANG: `which clang`
echo LD64.LLD: `which ld64.lld`
echo LLD: `which lld`
clang --version
- name: Install curl dev dependencies (Native only)
if: matrix.platform == 'Native'
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libidn2-dev
- name: Build And Test ${{ matrix.platform }} Versions
run: |
sbt clean c${{ matrix.platform }} t${{ matrix.platform }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
**/target/test-reports/*.xml
- name: Publish JVM RIDDL Libs & Test sbt-riddl plugin
if: matrix.platform == 'JVM'
env:
RIDDLC_PATH: riddlc/jvm/target/universal/stage/bin/riddlc
run: |
sbt \
utils/publishLocal \
language/publishLocal \
passes/publishLocal \
diagrams/publishLocal \
commands/publishLocal \
riddlLib/publishLocal \
riddlc/stage \
sbt-riddl/scripted
- name: Package Release Artifacts
if: matrix.platform == 'JVM'
run: |
sbt packageArtifacts
- name: Collect Release Artifacts
if: matrix.platform == 'JVM'
uses: actions/upload-artifact@v4
with:
name: collect-release-artifacts-jvm
retention-days: 30
path: |
riddlc/jvm/target/universal/riddlc.zip
riddlLib/jvm/target/universal/riddlLib.zip
- name: Collect Release Artifacts (Native)
if: matrix.platform == 'Native'
uses: actions/upload-artifact@v4
with:
name: collect-release-artifacts-native
retention-days: 30
path: |
riddlc/native/target/scala-3.4.3/riddlc
riddlLib/native/target/scala-3.4.3/libriddl-lib.a
- name: Collect Release Artifacts (JS)
if: matrix.platform == 'JS'
uses: actions/upload-artifact@v4
with:
name: collect-release-artifacts-js
retention-days: 30
path: |
riddlLib/js/target/scala-3.4.3/riddl-lib-opt/main.js
- name: Cleanup Before Caching
shell: bash
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
dependency-check:
timeout-minutes: 15
permissions:
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run Dependency Check
uses: dependency-check/Dependency-Check_Action@main
with:
project: 'riddl'
path: '.'
format: 'SARIF'
args: >
--enableRetired
--enableExperimental
- name: Upload Dependency Check Results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: reports/dependency-check-report.sarif