-
Notifications
You must be signed in to change notification settings - Fork 9
166 lines (160 loc) · 7.87 KB
/
main.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
name: CI
on: push
jobs:
master-check:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install @octokit/action
- run: node .github/actions/check-master.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
sanity-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-documentation-dependencies
- name: Build all code
uses: ./.github/actions/gradle
with:
arguments: sanityCheck --no-daemon
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: sanity-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: '0' # will fetch the entire history for auto-version plugin
- name: Deploy to snapshot
uses: ./.github/actions/gradle
with:
arguments: publishAllPublicationsToNokeeSnapshotRepository -Dintegration "-PnokeeSnapshotAccessKey=${{ secrets.NOKEE_SNAPSHOT_ACCESS_KEY }}" "-PnokeeSnapshotSecretKey=${{ secrets.NOKEE_SNAPSHOT_SECRET_KEY }}" "-PnokeeSnapshotUrl=${{ secrets.NOKEE_SNAPSHOT_URL }}"
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
quick-test:
needs: sanity-check
if: github.ref != 'refs/heads/master'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-build-dependencies
- name: Run all tests
uses: ./.github/actions/gradle
with:
arguments: quickTest
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
full-test:
needs: sanity-check
if: github.ref == 'refs/heads/master'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-build-dependencies
- name: Run all tests
uses: ./.github/actions/gradle
with:
arguments: fullTest
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
check-baked-documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-documentation-dependencies
- uses: ./.github/actions/install-build-dependencies
- name: Run all tests
uses: ./.github/actions/gradle
with:
arguments: :docs:bakedDocsTest --no-build-cache -PskipAllAsciinemaTasks "-PdocsNokeeDevAccessKey=${{ secrets.AWS_ACCESS_KEY }}" "-PdocsNokeeDevSecretKey=${{ secrets.AWS_SECRET_KEY }}"
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
check-documentations:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-documentation-dependencies
- uses: ./.github/actions/install-build-dependencies
- name: Run all tests
uses: ./.github/actions/gradle
with:
arguments: :docs:docsTest --no-build-cache -PskipAllAsciinemaTasks "-PdocsNokeeDevAccessKey=${{ secrets.AWS_ACCESS_KEY }}" "-PdocsNokeeDevSecretKey=${{ secrets.AWS_SECRET_KEY }}"
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
check-documentations-freebsd:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: nokeedev/actions/setup-vagrant@main
with:
install-vagrant-if: 'false'
install-virtualbox-if: 'false'
- uses: nokeedev/actions/vagrant-provision@main
with:
mem: 4096
name: freebsd-12.4
- uses: nokeedev/actions/vagrant-ssh@main
with:
name: freebsd-12.4
run: ./gradlew --continue --no-daemon :docs:docsTest --no-build-cache -PskipAllAsciinemaTasks "-Dgradle.enterprise.url=https://ge.nokee.dev/" "-Dgradle.enterprise.accessKey=${{ secrets.BUILD_SCAN_ACCESS_KEY }}" "-PdocsNokeeDevAccessKey=${{ secrets.AWS_ACCESS_KEY }}" "-PdocsNokeeDevSecretKey=${{ secrets.AWS_SECRET_KEY }}"
publish-head-milestone:
if: github.ref == 'refs/heads/master'
needs: [quick-test, full-test, check-documentations, check-baked-documentation]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: '0' # will fetch the entire history for auto-version plugin
- uses: ./.github/actions/install-documentation-dependencies
- name: Publish
uses: ./.github/actions/gradle
with:
arguments: publishAllPublicationsToNokeeReleaseRepository :docs:publishBakedPublicationToDocsNokeeDevRepository -Dmilestone --no-build-cache -PskipAllAsciinemaTasks "-PdocsNokeeDevAccessKey=${{ secrets.AWS_ACCESS_KEY }}" "-PdocsNokeeDevSecretKey=${{ secrets.AWS_SECRET_KEY }}"
build-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
build-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
build-scan-access-key: ${{ secrets.BUILD_SCAN_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}