Skip to content

Commit abdea6d

Browse files
committed
Revert "set-swap-space"
This reverts commit 248ccca.
1 parent b3c589b commit abdea6d

File tree

4 files changed

+201
-69
lines changed

4 files changed

+201
-69
lines changed

.github/workflows/ci.yml

Lines changed: 165 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,112 +9,248 @@ name: Continuous Integration
99

1010
on:
1111
pull_request:
12-
branches: ['**']
12+
branches: ['**', '!update/**', '!pr/**']
1313
push:
14-
branches: ['**']
14+
branches: ['**', '!update/**', '!pr/**']
15+
tags: [v*]
1516

1617
env:
1718
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1819

20+
21+
concurrency:
22+
group: ${{ github.workflow }} @ ${{ github.ref }}
23+
cancel-in-progress: true
24+
1925
jobs:
2026
build:
2127
name: Build and Test
2228
strategy:
2329
matrix:
2430
os: [ubuntu-latest]
25-
scala: [2.12.17, 2.13.14, 3.3.3]
31+
scala: [2.12, 2.13, 3]
2632
java: [corretto@11]
33+
project: [rootJS, rootJVM, rootNative]
34+
include:
35+
- scala: 3
36+
java: corretto@11
37+
project: rootNative
38+
os: macos-latest
39+
exclude:
40+
- scala: 3
41+
project: rootJVM
42+
- scala: 3
43+
project: rootNative
44+
os: ubuntu-latest
2745
runs-on: ${{ matrix.os }}
46+
timeout-minutes: 60
2847
steps:
29-
- uses: pierotofy/set-swap-space@master
30-
with:
31-
swap-size-gb: 5
32-
3348
- name: Checkout current branch (full)
3449
uses: actions/checkout@v4
3550
with:
3651
fetch-depth: 0
3752

3853
- name: Setup Java (corretto@11)
54+
id: setup-java-corretto-11
3955
if: matrix.java == 'corretto@11'
4056
uses: actions/setup-java@v4
4157
with:
4258
distribution: corretto
4359
java-version: 11
4460
cache: sbt
4561

62+
- name: sbt update
63+
if: matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
64+
run: ./sbt +update
65+
4666
- name: Check that workflows are up to date
47-
run: ./sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
67+
run: ./sbt githubWorkflowCheck
68+
69+
- name: scalaJSLink
70+
if: matrix.project == 'rootJS'
71+
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
72+
73+
- name: nativeLink
74+
if: matrix.project == 'rootNative'
75+
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
76+
77+
- name: Test
78+
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
79+
80+
- name: Check binary compatibility
81+
if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest'
82+
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
4883

49-
- name: Build project
50-
run: ./sbt '++ ${{ matrix.scala }}' test
84+
- name: Generate API documentation
85+
if: matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest'
86+
run: ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
87+
88+
- name: Make target directories
89+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
90+
run: mkdir -p core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
5191

5292
- name: Compress target directories
53-
run: tar cf targets.tar target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js/target project/target
93+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
94+
run: tar cf targets.tar core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
5495

5596
- name: Upload target directories
97+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
5698
uses: actions/upload-artifact@v4
5799
with:
58-
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
100+
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
59101
path: targets.tar
60102

61103
publish:
62104
name: Publish Artifacts
63105
needs: [build]
64-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
106+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
65107
strategy:
66108
matrix:
67109
os: [ubuntu-latest]
68-
scala: [2.13.14]
69110
java: [corretto@11]
70111
runs-on: ${{ matrix.os }}
71112
steps:
72-
- uses: pierotofy/set-swap-space@master
73-
with:
74-
swap-size-gb: 5
75-
76113
- name: Checkout current branch (full)
77114
uses: actions/checkout@v4
78115
with:
79116
fetch-depth: 0
80117

81118
- name: Setup Java (corretto@11)
119+
id: setup-java-corretto-11
82120
if: matrix.java == 'corretto@11'
83121
uses: actions/setup-java@v4
84122
with:
85123
distribution: corretto
86124
java-version: 11
87125
cache: sbt
88126

89-
- name: Download target directories (2.12.17)
127+
- name: sbt update
128+
if: matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
129+
run: ./sbt +update
130+
131+
- name: Download target directories (2.12, rootJS)
132+
uses: actions/download-artifact@v4
133+
with:
134+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
135+
136+
- name: Inflate target directories (2.12, rootJS)
137+
run: |
138+
tar xf targets.tar
139+
rm targets.tar
140+
141+
- name: Download target directories (2.12, rootJVM)
142+
uses: actions/download-artifact@v4
143+
with:
144+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
145+
146+
- name: Inflate target directories (2.12, rootJVM)
147+
run: |
148+
tar xf targets.tar
149+
rm targets.tar
150+
151+
- name: Download target directories (2.12, rootNative)
152+
uses: actions/download-artifact@v4
153+
with:
154+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
155+
156+
- name: Inflate target directories (2.12, rootNative)
157+
run: |
158+
tar xf targets.tar
159+
rm targets.tar
160+
161+
- name: Download target directories (2.13, rootJS)
90162
uses: actions/download-artifact@v4
91163
with:
92-
name: target-${{ matrix.os }}-2.12.17-${{ matrix.java }}
164+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
93165

94-
- name: Inflate target directories (2.12.17)
166+
- name: Inflate target directories (2.13, rootJS)
95167
run: |
96168
tar xf targets.tar
97169
rm targets.tar
98170
99-
- name: Download target directories (2.13.14)
171+
- name: Download target directories (2.13, rootJVM)
100172
uses: actions/download-artifact@v4
101173
with:
102-
name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }}
174+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
103175

104-
- name: Inflate target directories (2.13.14)
176+
- name: Inflate target directories (2.13, rootJVM)
105177
run: |
106178
tar xf targets.tar
107179
rm targets.tar
108180
109-
- name: Download target directories (3.3.3)
181+
- name: Download target directories (2.13, rootNative)
110182
uses: actions/download-artifact@v4
111183
with:
112-
name: target-${{ matrix.os }}-3.3.3-${{ matrix.java }}
184+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
113185

114-
- name: Inflate target directories (3.3.3)
186+
- name: Inflate target directories (2.13, rootNative)
115187
run: |
116188
tar xf targets.tar
117189
rm targets.tar
118190
119-
- name: Publish project
120-
run: ./sbt +publish
191+
- name: Download target directories (3, rootJS)
192+
uses: actions/download-artifact@v4
193+
with:
194+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
195+
196+
- name: Inflate target directories (3, rootJS)
197+
run: |
198+
tar xf targets.tar
199+
rm targets.tar
200+
201+
- name: Import signing key
202+
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
203+
env:
204+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
205+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
206+
run: echo $PGP_SECRET | base64 -d -i - | gpg --import
207+
208+
- name: Import signing key and strip passphrase
209+
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
210+
env:
211+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
212+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
213+
run: |
214+
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
215+
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
216+
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
217+
218+
- name: Publish
219+
env:
220+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
221+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
222+
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
223+
run: ./sbt tlCiRelease
224+
225+
dependency-submission:
226+
name: Submit Dependencies
227+
if: github.event_name != 'pull_request'
228+
strategy:
229+
matrix:
230+
os: [ubuntu-latest]
231+
java: [corretto@11]
232+
runs-on: ${{ matrix.os }}
233+
steps:
234+
- name: Checkout current branch (full)
235+
uses: actions/checkout@v4
236+
with:
237+
fetch-depth: 0
238+
239+
- name: Setup Java (corretto@11)
240+
id: setup-java-corretto-11
241+
if: matrix.java == 'corretto@11'
242+
uses: actions/setup-java@v4
243+
with:
244+
distribution: corretto
245+
java-version: 11
246+
cache: sbt
247+
248+
- name: sbt update
249+
if: matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
250+
run: ./sbt +update
251+
252+
- name: Submit Dependencies
253+
uses: scalacenter/sbt-dependency-submission@v2
254+
with:
255+
modules-ignore: rootjs_2.12 rootjs_2.13 rootjs_3 tests_sjs1_2.12 tests_sjs1_2.13 tests_sjs1_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3 demo_2.12 demo_2.13 demo_3 tests_2.12 tests_2.13 tests_3 demo_native0.5_2.12 demo_native0.5_2.13 demo_native0.5_3 tests_native0.5_2.12 tests_native0.5_2.13 tests_native0.5_3 demo_sjs1_2.12 demo_sjs1_2.13 demo_sjs1_3
256+
configs-ignore: test scala-tool scala-doc-tool test-internal

.github/workflows/clean.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- name: Delete artifacts
20-
shell: bash {0}
2120
run: |
2221
# Customize those three lines with your repository and credentials:
2322
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
@@ -26,7 +25,7 @@ jobs:
2625
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
2726
2827
# A temporary file which receives HTTP response headers.
29-
TMPFILE=$(mktemp)
28+
TMPFILE=/tmp/tmp.$$
3029
3130
# An associative array, key: artifact name, value: number of artifacts of that name.
3231
declare -A ARTCOUNT

0 commit comments

Comments
 (0)