forked from graalvm/graal-languages-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (69 loc) · 2.44 KB
/
graalpy-spring-boot-guide.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
name: Test GraalPy Spring Boot Guide
on:
push:
paths:
- 'graalpy/graalpy-spring-boot-guide/**'
- '.github/workflows/graalpy-spring-boot-guide.yml'
pull_request:
paths:
- 'graalpy/graalpy-spring-boot-guide/**'
- '.github/workflows/graalpy-spring-boot-guide.yml'
workflow_dispatch:
permissions:
contents: read
env:
NATIVE_IMAGE_OPTIONS: '-J-Xmx16g'
jobs:
run:
name: 'graalpy-spring-boot-guide'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '23.0.1'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Build, test, and run 'graalpy-spring-boot-guide' using Maven
run: |
cd graalpy/graalpy-spring-boot-guide
git clean -fdx
./mvnw --no-transfer-progress clean test -Dspring.mvc.async.request-timeout=60000
./mvnw --no-transfer-progress spring-boot:run &
sbpid="$!"
sleep 30
curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/
kill $sbpid
- name: Build, test, and run 'graalpy-spring-boot-guide' using Gradle
run: |
cd graalpy/graalpy-spring-boot-guide
git clean -fdx
./gradlew test -Dspring.mvc.async.request-timeout=60000
./gradlew bootRun &
sbpid="$!"
sleep 30
curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/
kill $sbpid
- name: Build and run native 'graalpy-spring-boot-guide' using Maven
run: |
cd graalpy/graalpy-spring-boot-guide
git clean -fdx
./mvnw --no-transfer-progress clean -DskipTests -Pnative native:compile
./target/graalpy-springboot &
sbpid="$!"
sleep 20
curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/
kill $sbpid
- name: Build and run native 'graalpy-spring-boot-guide' using Gradle
run: |
cd graalpy/graalpy-spring-boot-guide
git clean -fdx
./gradlew nativeCompile
./build/native/nativeCompile/demo &
sbpid="$!"
sleep 20
curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/
kill $sbpid