-
-
Notifications
You must be signed in to change notification settings - Fork 10
126 lines (108 loc) · 3.24 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
name: build
on:
pull_request:
branches: ['*']
push:
branches: ['*']
tags: ["v[0-9]+*"]
jobs:
tests:
name: Unit tests (scala ${{ matrix.scala }}, scala.js ${{ matrix.scalajs }}, jvm ${{ matrix.java }})
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04]
java: [8, 11]
scala: [2.12.15, 2.13.8, 3.1.1]
scalajs: [1.10.0]
command: ["ci-test"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v11
with:
java-version: "adopt@1.${{ matrix.java }}"
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: sbt ++${{ matrix.scala }} ${{ matrix.command }}
run: |
./.github/scripts/build.sh
env:
SCALA_VERSION: ${{ matrix.scala }}
SCALAJS_VERSION: ${{ matrix.scalaJS }}
SBT_COMMAND: ${{ matrix.command }}
doc-tests:
name: Docs tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v11
with:
java-version: "[email protected]"
- name: sbt ci-doc
run: |
sbt -J-Xmx6144m ci-doc
env:
SCALA_VERSION: ${{ matrix.scala }}
SCALAJS_VERSION: ${{ matrix.scalaJS }}
SBT_COMMAND: ${{ matrix.command }}
all_tests:
name: All Tests
needs: [ tests, doc-tests ]
runs-on: ubuntu-20.04
steps:
- name: Ack
run: |
echo "All done."
#-----------------------------------------------------------------------------------
# Publishing tasks
#-----------------------------------------------------------------------------------
publish_sonatype:
name: Publish to Sonatype
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [ all_tests ]
strategy:
fail-fast: true
max-parallel: 1
matrix:
command: [ci-release]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-scala@v11
with:
java-version: "[email protected]"
- name: Install GnuPG2
run: |
./.github/scripts/setup-pgp
- name: .github/scripts/release
run: |
.github/scripts/release
env:
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PUBLISH_STABLE_VERSION: true
publish_microsite:
name: Publish Website
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [ publish_sonatype ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-scala@v11
with:
java-version: "[email protected]"
- name: Set up Ruby 2.7 (for microsite)
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.x
- name: Install microsite dependencies
run: |
bundle install --system --gemfile=site/Gemfile
- name: Publish Website
run: sbt +clean site/publishMicrosite
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}