-
-
Notifications
You must be signed in to change notification settings - Fork 11
155 lines (146 loc) · 4.28 KB
/
Copy pathci.yml
File metadata and controls
155 lines (146 loc) · 4.28 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
name: CI
env:
FORCE_COLOR: '1'
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- "*"
permissions:
id-token: write
pages: write
contents: read
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
test:
name: test on ${{ matrix.platform }}
strategy:
matrix:
platform: [ 'jvm', 'js' ]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- uses: coursier/cache-action@v6.4
- name: Compile ${{ matrix.platform }}
run: ./mill scautable.${{ matrix.platform }}.compile
- name: test ${{ matrix.platform }}
run: ./mill scautable.test.${{ matrix.platform }}
- name: Publish ${{ matrix.platform }} artifacts
run: ./mill -i scautable.${{ matrix.platform }}.publishArtifacts
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: always()
with:
fail_on_failure: false
include_passed: false
detailed_summary: true
annotate_only: true
require_tests: false
report_paths: 'out/**/test-report.xml'
publish:
if: github.repository == 'Quafadas/scautable' && contains(github.ref, 'refs/tags/')
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-java@main
with:
distribution: 'temurin'
java-version: 21
- name: Publish to Maven Central
run: ./mill mill.javalib.SonatypeCentralPublishModule/
env:
MILL_PGP_PASSPHRASE: ${{ secrets.MILL_PGP_PASSPHRASE }}
MILL_PGP_SECRET_BASE64: ${{ secrets.MILL_PGP_SECRET_BASE64 }}
MILL_SONATYPE_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
MILL_SONATYPE_USERNAME: ${{ secrets.PUBLISH_USER }}
# Check that we can _generate_ the docs, but don't run upload / pages actions to actually deploy them for pull requests.
site_pr_check:
if: github.event_name == 'pull_request'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- run: ./mill site.siteGen
# Check that we can _generate_ the docs, but don't run upload / pages actions to actually deploy them for pull requests.
examples_benchmarks_pr_check:
if: github.event_name == 'pull_request'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- run: ./mill examples.compile
- run: ./mill benchmark.compile
site:
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- uses: actions/checkout@main
with:
fetch-depth: 0
fetch-tags: true
- run: ./mill site.siteGen
- name: Setup Pages
uses: actions/configure-pages@main
- uses: actions/upload-artifact@main
with:
name: page
path: out/site/laika/generateSite.dest
if-no-files-found: error
deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: site
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@main
with:
name: page
path: .
- uses: actions/configure-pages@main
- uses: actions/upload-pages-artifact@main
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main