-
Notifications
You must be signed in to change notification settings - Fork 0
189 lines (169 loc) · 4.83 KB
/
kt.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: Kotlin CI
on:
push:
branches: [ main ]
paths: [ kt/**, .github/workflows/kt.yml ]
pull_request:
branches: [ main ]
paths: [ kt/**, .github/workflows/kt.yml ]
workflow_dispatch:
jobs:
get-inputs:
uses: ephemient/aoc2024/.github/workflows/get-inputs.yml@main
secrets:
SESSION: ${{ secrets.SESSION }}
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- uses: gradle/actions/dependency-submission@v4
with:
build-root-directory: kt
dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: true
- run: ./gradlew build distZip
working-directory: kt
- uses: actions/upload-artifact@v4
with:
name: aoc2024-exe
path: kt/aoc2024-exe/build/distributions/*.zip
- uses: actions/upload-artifact@v4
with:
name: aoc2024-kexe
path: |
kt/aoc2024-exe/build/bin/*/debugExecutable/*.kexe
kt/aoc2024-exe/build/bin/*/releaseExecutable/*.kexe
- uses: actions/upload-artifact@v4
with:
name: aoc2024-wasmJs
path: kt/build/js/packages/aoc2024-aoc2024-exe-wasm-js/kotlin/*
- uses: actions/upload-artifact@v4
with:
name: aoc2024-wasmWasi
path: kt/aoc2024-exe/build/compileSync/wasmWasi/main/productionExecutable/optimized/*
- uses: actions/upload-artifact@v4
with:
name: aoc2024-js
path: kt/build/js/packages/aoc2024-aoc2024-exe/kotlin/*
graalvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: 21
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew --no-configuration-cache nativeTest nativeCompile
working-directory: kt
- uses: actions/upload-artifact@v4
with:
name: aoc2024-graalvm
path: kt/graalvm/build/native/nativeCompile/*
run-jvm:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v4
with:
name: aoc2024-exe
- run: unzip aoc2024-exe.zip
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: aoc2024-exe/bin/aoc2024-exe
env:
AOC2024_DATADIR: inputs
run-graalvm:
needs: [ get-inputs, graalvm ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v4
with:
name: aoc2024-graalvm
- run: chmod +x aoc2024-native
- run: ./aoc2024-native
env:
AOC2024_DATADIR: inputs
run-native:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v4
with:
name: aoc2024-kexe
- run: chmod +x linuxX64/*/aoc2024-exe.kexe
- run: linuxX64/releaseExecutable/aoc2024-exe.kexe
env:
AOC2024_DATADIR: inputs
run-wasmJs:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v4
with:
name: aoc2024-wasmJs
- uses: actions/setup-node@v4
with:
node-version: 22.0.0
- run: node aoc2024-aoc2024-exe-wasm-js.mjs
env:
AOC2024_DATADIR: inputs
run-wasmWasi:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v4
with:
name: aoc2024-wasmWasi
- uses: actions/setup-node@v4
with:
node-version: 22.0.0
- run: node aoc2024-aoc2024-exe-wasm-wasi.mjs
env:
AOC2024_DATADIR: inputs
run-js:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: inputs
path: inputs
- uses: actions/download-artifact@v4
with:
name: aoc2024-js
- uses: actions/setup-node@v4
with:
node-version: 22.0.0
- run: node aoc2024-aoc2024-exe.js
env:
AOC2024_DATADIR: inputs