Skip to content

Commit 018a6e0

Browse files
committed
Experiments with the native build
1 parent 1e0d169 commit 018a6e0

File tree

3 files changed

+7
-322
lines changed

3 files changed

+7
-322
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 262 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
# This file was automatically generated by sbt-github-actions using the
2-
# githubWorkflowGenerate task. You should add and commit this file to
3-
# your git repository. It goes without saying that you shouldn't edit
4-
# this file by hand! Instead, if you wish to make changes, you should
5-
# change your sbt build configuration to revise the workflow description
6-
# to meet your needs, then regenerate this file.
7-
8-
name: Continuous Integration
1+
name: Testing native build
92

103
on:
114
pull_request:
@@ -14,275 +7,26 @@ on:
147
branches: ['**', '!update/**', '!pr/**']
158
tags: [v*]
169

17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
20-
2110
concurrency:
2211
group: ${{ github.workflow }} @ ${{ github.ref }}
2312
cancel-in-progress: true
2413

2514
jobs:
2615
build:
2716
name: Test
28-
strategy:
29-
matrix:
30-
os: [ubuntu-22.04]
31-
scala: [2.13, 3]
32-
java: [temurin@17]
33-
project: [rootJS, rootJVM, rootNative]
34-
runs-on: ${{ matrix.os }}
17+
runs-on: ubuntu-22.04
3518
timeout-minutes: 60
3619
steps:
3720
- name: Checkout current branch (full)
3821
uses: actions/checkout@v4
3922
with:
4023
fetch-depth: 0
4124

42-
- name: Setup sbt
43-
uses: sbt/setup-sbt@v1
44-
45-
- name: Setup Java (temurin@17)
46-
id: setup-java-temurin-17
47-
if: matrix.java == 'temurin@17'
48-
uses: actions/setup-java@v4
49-
with:
50-
distribution: temurin
51-
java-version: 17
52-
cache: sbt
53-
54-
- name: sbt update
55-
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
56-
run: sbt +update
57-
58-
- name: Check that workflows are up to date
59-
run: sbt githubWorkflowCheck
60-
61-
- name: Check headers and formatting
62-
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04'
63-
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
64-
65-
- name: scalaJSLink
66-
if: matrix.project == 'rootJS'
67-
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
68-
69-
- name: nativeLink
70-
if: matrix.project == 'rootNative'
71-
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
72-
73-
- name: Test
74-
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
75-
76-
- name: Check binary compatibility
77-
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04'
78-
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
79-
80-
- name: Generate API documentation
81-
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04'
82-
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
83-
84-
- name: Make target directories
85-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
86-
run: mkdir -p toolkit/js/target toolkit-test/jvm/target toolkit-test/native/target toolkit/native/target toolkit-test/js/target toolkit/jvm/target project/target
87-
88-
- name: Compress target directories
89-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
90-
run: tar cf targets.tar toolkit/js/target toolkit-test/jvm/target toolkit-test/native/target toolkit/native/target toolkit-test/js/target toolkit/jvm/target project/target
91-
92-
- name: Upload target directories
93-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
94-
uses: actions/upload-artifact@v4
95-
with:
96-
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
97-
path: targets.tar
98-
99-
publish:
100-
name: Publish Artifacts
101-
needs: [build]
102-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
103-
strategy:
104-
matrix:
105-
os: [ubuntu-22.04]
106-
java: [temurin@17]
107-
runs-on: ${{ matrix.os }}
108-
steps:
109-
- name: Checkout current branch (full)
110-
uses: actions/checkout@v4
111-
with:
112-
fetch-depth: 0
25+
- name: Show clang version
26+
run: clang --version
11327

11428
- name: Setup sbt
11529
uses: sbt/setup-sbt@v1
11630

117-
- name: Setup Java (temurin@17)
118-
id: setup-java-temurin-17
119-
if: matrix.java == 'temurin@17'
120-
uses: actions/setup-java@v4
121-
with:
122-
distribution: temurin
123-
java-version: 17
124-
cache: sbt
125-
126-
- name: sbt update
127-
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
128-
run: sbt +update
129-
130-
- name: Download target directories (2.13, rootJS)
131-
uses: actions/download-artifact@v4
132-
with:
133-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
134-
135-
- name: Inflate target directories (2.13, rootJS)
136-
run: |
137-
tar xf targets.tar
138-
rm targets.tar
139-
140-
- name: Download target directories (2.13, rootJVM)
141-
uses: actions/download-artifact@v4
142-
with:
143-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
144-
145-
- name: Inflate target directories (2.13, rootJVM)
146-
run: |
147-
tar xf targets.tar
148-
rm targets.tar
149-
150-
- name: Download target directories (2.13, rootNative)
151-
uses: actions/download-artifact@v4
152-
with:
153-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
154-
155-
- name: Inflate target directories (2.13, rootNative)
156-
run: |
157-
tar xf targets.tar
158-
rm targets.tar
159-
160-
- name: Download target directories (3, rootJS)
161-
uses: actions/download-artifact@v4
162-
with:
163-
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
164-
165-
- name: Inflate target directories (3, rootJS)
166-
run: |
167-
tar xf targets.tar
168-
rm targets.tar
169-
170-
- name: Download target directories (3, rootJVM)
171-
uses: actions/download-artifact@v4
172-
with:
173-
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
174-
175-
- name: Inflate target directories (3, rootJVM)
176-
run: |
177-
tar xf targets.tar
178-
rm targets.tar
179-
180-
- name: Download target directories (3, rootNative)
181-
uses: actions/download-artifact@v4
182-
with:
183-
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
184-
185-
- name: Inflate target directories (3, rootNative)
186-
run: |
187-
tar xf targets.tar
188-
rm targets.tar
189-
190-
- name: Import signing key
191-
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
192-
env:
193-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
194-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
195-
run: echo $PGP_SECRET | base64 -d -i - | gpg --import
196-
197-
- name: Import signing key and strip passphrase
198-
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
199-
env:
200-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
201-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
202-
run: |
203-
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
204-
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
205-
(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)
206-
207-
- name: Publish
208-
env:
209-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
210-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
211-
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
212-
run: sbt tlCiRelease
213-
214-
dependency-submission:
215-
name: Submit Dependencies
216-
if: github.event.repository.fork == false && github.event_name != 'pull_request'
217-
strategy:
218-
matrix:
219-
os: [ubuntu-22.04]
220-
java: [temurin@17]
221-
runs-on: ${{ matrix.os }}
222-
steps:
223-
- name: Checkout current branch (full)
224-
uses: actions/checkout@v4
225-
with:
226-
fetch-depth: 0
227-
228-
- name: Setup sbt
229-
uses: sbt/setup-sbt@v1
230-
231-
- name: Setup Java (temurin@17)
232-
id: setup-java-temurin-17
233-
if: matrix.java == 'temurin@17'
234-
uses: actions/setup-java@v4
235-
with:
236-
distribution: temurin
237-
java-version: 17
238-
cache: sbt
239-
240-
- name: sbt update
241-
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
242-
run: sbt +update
243-
244-
- name: Submit Dependencies
245-
uses: scalacenter/sbt-dependency-submission@v2
246-
with:
247-
modules-ignore: rootjs_2.13 rootjs_3 docs_3 tests_sjs1_2.13 tests_sjs1_3 rootjvm_2.13 rootjvm_3 rootnative_2.13 rootnative_3 tests_2.13 tests_3 tests_native0.4_2.13 tests_native0.4_3
248-
configs-ignore: test scala-tool scala-doc-tool test-internal
249-
250-
site:
251-
name: Generate Site
252-
strategy:
253-
matrix:
254-
os: [ubuntu-22.04]
255-
java: [temurin@17]
256-
runs-on: ${{ matrix.os }}
257-
steps:
258-
- name: Checkout current branch (full)
259-
uses: actions/checkout@v4
260-
with:
261-
fetch-depth: 0
262-
263-
- name: Setup sbt
264-
uses: sbt/setup-sbt@v1
265-
266-
- name: Setup Java (temurin@17)
267-
id: setup-java-temurin-17
268-
if: matrix.java == 'temurin@17'
269-
uses: actions/setup-java@v4
270-
with:
271-
distribution: temurin
272-
java-version: 17
273-
cache: sbt
274-
275-
- name: sbt update
276-
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
277-
run: sbt +update
278-
279-
- name: Generate site
280-
run: sbt docs/tlSite
281-
282-
- name: Publish site
283-
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
284-
uses: peaceiris/actions-gh-pages@v4.0.0
285-
with:
286-
github_token: ${{ secrets.GITHUB_TOKEN }}
287-
publish_dir: site/target/docs/site
288-
keep_files: true
31+
- name: Test
32+
run: sbt 'project rootNative' '++ 3' test

.github/workflows/clean.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
5353
libraryDependencies ++= Seq(
5454
"org.typelevel" %%% "munit-cats-effect" % "2.0.0" % Test,
5555
"co.fs2" %%% "fs2-io" % "3.11.0" % Test,
56-
"org.virtuslab.scala-cli" %% "cli" % "1.7.1" cross (CrossVersion.for2_13Use3)
56+
"org.virtuslab.scala-cli" %% "cli" % "1.5.4" cross (CrossVersion.for2_13Use3)
5757
),
5858
buildInfoKeys += scalaBinaryVersion,
5959
buildInfoKeys += "nativeVersion" -> nativeVersion,

0 commit comments

Comments
 (0)