-
-
Notifications
You must be signed in to change notification settings - Fork 1
137 lines (137 loc) · 3.68 KB
/
build.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
name: Build
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Build
run: ./gradlew build
- name: Build (1.8.8)
run: ./gradlew build -PUSE_SPIGOT_8=true
dokka:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Build
run: ./gradlew dokkaHtml
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dokka
path: |
./build/dokka/html
retention-days: 7
writerside:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v4
with:
instance: Writerside/hi
artifact: webHelpHI2-all.zip
docker-version: 2.1.1479-p3869
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: writerside
path: |
artifacts/webHelpHI2-all.zip
retention-days: 7
benchmark:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Run JMH
run: |
./gradlew jmh
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: JMH Benchmark
tool: 'jmh'
output-file-path: build/results/jmh/results.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
gh-pages-branch: benchmark
benchmark-data-dir-path: .
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@sya-ri'
summary-always: true
- name: Switch branch
run: git checkout benchmark
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: benchmark
path: |
index.html
data.js
retention-days: 7
deploy:
needs: [writerside, dokka, benchmark]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
permissions:
id-token: write
pages: write
steps:
- name: Download artifact (writerside)
uses: actions/download-artifact@v4
with:
name: writerside
- name: Create api-docs directory
run: mkdir dir/api-docs -p
- name: Download artifact (dokka)
uses: actions/download-artifact@v4
with:
name: dokka
path: dir/api-docs
- name: Unzip artifact
uses: montudor/action-zip@v1
with:
args: unzip -qq webHelpHI2-all.zip -d dir
- name: Download artifact (benchmark)
uses: actions/download-artifact@v4
with:
name: benchmark
path: dir/benchmark
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dir
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4