Skip to content

Commit 115125e

Browse files
authored
cleanup the build and remove all the old stuff (#24449)
This is the second step in the build changes. We previously introduced new projects for all the new artifacts. Now we remove all of the old ones (except scaladoc). This step is just removing, making the build easier to understand and avoid duplication will be in the upcoming PR (third step).
2 parents 8fd3005 + 7228cbb commit 115125e

File tree

9 files changed

+119
-1235
lines changed

9 files changed

+119
-1235
lines changed

.github/workflows/ci.yaml

Lines changed: 41 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -51,99 +51,6 @@ env:
5151
# text on stderr and so can break tests which check the output of a program).
5252

5353
jobs:
54-
test:
55-
runs-on: [self-hosted, Linux]
56-
container:
57-
image: lampepfl/dotty:2024-10-18
58-
options: --cpu-shares 4096
59-
volumes:
60-
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
61-
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
62-
- ${{ github.workspace }}/../../cache/general:/root/.cache
63-
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
64-
|| github.event_name == 'push'
65-
|| github.event_name == 'merge_group'
66-
|| (
67-
github.event_name == 'pull_request'
68-
&& !contains(github.event.pull_request.body, '[skip ci]')
69-
&& !contains(github.event.pull_request.body, '[skip test]')
70-
)
71-
|| (
72-
github.event_name == 'workflow_dispatch'
73-
&& github.repository == 'scala/scala3'
74-
)"
75-
76-
steps:
77-
- name: Set JDK 17 as default
78-
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH
79-
80-
- name: Reset existing repo
81-
run: |
82-
git config --global --add safe.directory $GITHUB_WORKSPACE
83-
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
84-
85-
- name: Checkout cleanup script
86-
uses: actions/checkout@v5
87-
88-
- name: Cleanup
89-
run: .github/workflows/cleanup.sh
90-
91-
- name: Git Checkout
92-
uses: actions/checkout@v5
93-
94-
- name: Add SBT proxy repositories
95-
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
96-
97-
- name: Cmd Tests
98-
run: |
99-
./project/scripts/buildScalaBinary
100-
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/publishLocal ;scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test"
101-
./project/scripts/cmdTests
102-
./project/scripts/bootstrappedOnlyCmdTests
103-
104-
test_windows_fast:
105-
runs-on: [self-hosted, Windows]
106-
if: "(
107-
github.event_name == 'push'
108-
&& github.ref != 'refs/heads/main'
109-
)
110-
|| github.event_name == 'merge_group'
111-
|| (
112-
github.event_name == 'pull_request'
113-
&& !contains(github.event.pull_request.body, '[skip ci]')
114-
&& !contains(github.event.pull_request.body, '[skip test_windows_fast]')
115-
)"
116-
117-
steps:
118-
- name: Reset existing repo
119-
shell: cmd
120-
run: |
121-
git config --global --add safe.directory $GITHUB_WORKSPACE
122-
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
123-
124-
- name: Git Checkout
125-
uses: actions/checkout@v5
126-
127-
- name: Test
128-
run: sbt ";scala3-bootstrapped/compile"
129-
shell: cmd
130-
131-
- name: build binary
132-
run: sbt "dist-win-x86_64/Universal/stage" & bash -version
133-
shell: cmd
134-
135-
- name: cygwin tests
136-
run: '"C:\Program Files\cygwin64\bin\bash" ./project/scripts/winCmdTests'
137-
shell: cmd
138-
139-
- name: msys tests
140-
run: '"C:\Program Files\Git\bin\bash" ./project/scripts/winCmdTests'
141-
shell: cmd
142-
143-
- name: win tests
144-
run: './project/scripts/winCmdTests.bat'
145-
shell: cmd
146-
14754
test_windows_full:
14855
runs-on: [self-hosted, Windows]
14956
if: "github.event_name == 'schedule' && github.repository == 'scala/scala3'
@@ -179,7 +86,6 @@ jobs:
17986
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
18087
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
18188
- ${{ github.workspace }}/../../cache/general:/root/.cache
182-
needs: [test, build-sdk-package, build-msi-package]
18389
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
18490

18591
env:
@@ -297,44 +203,44 @@ jobs:
297203
- name: Publish Release
298204
run: ./project/scripts/sbtPublish ";project scala3-bootstrapped-new ;publishSigned ;sonaUpload"
299205

300-
build-msi-package:
301-
uses: ./.github/workflows/build-msi.yml
302-
if :
303-
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]')) ||
304-
(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/'))
305-
306-
test-msi-package:
307-
uses: ./.github/workflows/test-msi.yml
308-
needs: [build-msi-package]
309-
with:
310-
# Ensure that version starts with prefix 3.
311-
# In the future it can be adapted to compare with git tag or version set in the project/Build.scala
312-
version: "3."
313-
java-version: 17
314-
315-
build-sdk-package:
316-
uses: ./.github/workflows/build-sdk.yml
317-
if:
318-
(github.event_name == 'pull_request' && !contains(github.event.pull_request.body, '[skip ci]')) ||
319-
(github.event_name == 'workflow_dispatch' && github.repository == 'scala/scala3') ||
320-
(github.event_name == 'schedule' && github.repository == 'scala/scala3') ||
321-
github.event_name == 'push' ||
322-
github.event_name == 'merge_group'
323-
with:
324-
java-version: 17
325-
326-
build-chocolatey-package:
327-
uses: ./.github/workflows/build-chocolatey.yml
328-
needs: [ build-sdk-package ]
329-
with:
330-
version: 3.6.0-SNAPSHOT # Fake version, used only for choco tests
331-
url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.win-x86_64-id }}/zip
332-
digest : ${{ needs.build-sdk-package.outputs.win-x86_64-digest }}
333-
334-
test-chocolatey-package:
335-
uses: ./.github/workflows/test-chocolatey.yml
336-
with:
337-
version : 3.6.0-SNAPSHOT # Fake version, used only for choco tests
338-
java-version: 17
339-
if: github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_chocolatey]')
340-
needs: [ build-chocolatey-package ]
206+
#build-msi-package:
207+
# uses: ./.github/workflows/build-msi.yml
208+
# if :
209+
# (github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]')) ||
210+
# (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/'))
211+
212+
#test-msi-package:
213+
# uses: ./.github/workflows/test-msi.yml
214+
# needs: [build-msi-package]
215+
# with:
216+
# # Ensure that version starts with prefix 3.
217+
# # In the future it can be adapted to compare with git tag or version set in the project/Build.scala
218+
# version: "3."
219+
# java-version: 17
220+
221+
#build-sdk-package:
222+
# uses: ./.github/workflows/build-sdk.yml
223+
# if:
224+
# (github.event_name == 'pull_request' && !contains(github.event.pull_request.body, '[skip ci]')) ||
225+
# (github.event_name == 'workflow_dispatch' && github.repository == 'scala/scala3') ||
226+
# (github.event_name == 'schedule' && github.repository == 'scala/scala3') ||
227+
# github.event_name == 'push' ||
228+
# github.event_name == 'merge_group'
229+
# with:
230+
# java-version: 17
231+
232+
#build-chocolatey-package:
233+
# uses: ./.github/workflows/build-chocolatey.yml
234+
# needs: [ build-sdk-package ]
235+
# with:
236+
# version: 3.6.0-SNAPSHOT # Fake version, used only for choco tests
237+
# url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.win-x86_64-id }}/zip
238+
# digest : ${{ needs.build-sdk-package.outputs.win-x86_64-digest }}
239+
240+
#test-chocolatey-package:
241+
# uses: ./.github/workflows/test-chocolatey.yml
242+
# with:
243+
# version : 3.6.0-SNAPSHOT # Fake version, used only for choco tests
244+
# java-version: 17
245+
# if: github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_chocolatey]')
246+
# needs: [ build-chocolatey-package ]

.github/workflows/scaladoc.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
- name: Compile and test scala3doc-js
4242
run: ./project/scripts/sbt scaladoc-js-main/test
4343

44-
- name: Compile and test
45-
run: |
46-
./project/scripts/sbt scaladoc/test
47-
./project/scripts/sbt dist/Universal/stage
48-
./project/scripts/cmdScaladocTests
44+
#- name: Compile and test
45+
# run: |
46+
# ./project/scripts/sbt scaladoc/test
47+
# ./project/scripts/sbt dist/Universal/stage
48+
# ./project/scripts/cmdScaladocTests
4949

5050
- name: Locally publish self
5151
run: ./project/scripts/sbt scaladoc/publishLocal

.github/workflows/test-launchers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test CLI Launchers on all the platforms
22
on:
3-
pull_request:
3+
#pull_request:
44
workflow_dispatch:
55

66
env:

build.sbt

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,46 @@
1-
val scala3 = Build.scala3
1+
// Aggregate projects
22
val `scala3-nonbootstrapped` = Build.`scala3-nonbootstrapped`
3-
val `scala3-bootstrapped` = Build.`scala3-bootstrapped`
43
val `scala3-bootstrapped-new` = Build.`scala3-bootstrapped-new`
4+
55
val `scala3-interfaces` = Build.`scala3-interfaces`
6-
val `scala3-compiler` = Build.`scala3-compiler`
6+
7+
// Compiler projects
78
val `scala3-compiler-nonbootstrapped` = Build.`scala3-compiler-nonbootstrapped`
89
val `scala3-compiler-bootstrapped-new` = Build.`scala3-compiler-bootstrapped-new`
9-
val `scala3-compiler-bootstrapped` = Build.`scala3-compiler-bootstrapped`
10+
1011
val `scala3-repl` = Build.`scala3-repl`
11-
val `scala-library-sjs` = Build.`scala-library-sjs`
12-
val `scala3-library-sjs` = Build.`scala3-library-sjs`
12+
13+
// The Standard Library
1314
val `scala-library-nonbootstrapped` = Build.`scala-library-nonbootstrapped`
1415
val `scala3-library-nonbootstrapped` = Build.`scala3-library-nonbootstrapped`
1516
val `scala-library-bootstrapped` = Build.`scala-library-bootstrapped`
1617
val `scala3-library-bootstrapped-new` = Build.`scala3-library-bootstrapped-new`
17-
val `scala3-library` = Build.`scala3-library`
18-
val `scala3-library-bootstrapped` = Build.`scala3-library-bootstrapped`
19-
val `scala3-library-bootstrappedJS` = Build.`scala3-library-bootstrappedJS`
20-
val `scala3-sbt-bridge` = Build.`scala3-sbt-bridge`
18+
val `scala-library-sjs` = Build.`scala-library-sjs`
19+
val `scala3-library-sjs` = Build.`scala3-library-sjs`
20+
2121
val `scala3-sbt-bridge-bootstrapped` = Build.`scala3-sbt-bridge-bootstrapped`
2222
val `scala3-sbt-bridge-nonbootstrapped` = Build.`scala3-sbt-bridge-nonbootstrapped`
23-
val `scala3-sbt-bridge-tests` = Build.`scala3-sbt-bridge-tests`
24-
val `scala3-staging` = Build.`scala3-staging`
2523
val `scala3-staging-new` = Build.`scala3-staging-new`
26-
val `scala3-tasty-inspector` = Build.`scala3-tasty-inspector`
2724
val `scala3-tasty-inspector-new` = Build.`scala3-tasty-inspector-new`
2825
val `scala3-language-server` = Build.`scala3-language-server`
29-
val `scala3-bench` = Build.`scala3-bench`
30-
val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped`
31-
val `scala3-bench-micro` = Build.`scala3-bench-micro`
32-
val `tasty-core` = Build.`tasty-core`
26+
//val `scala3-bench` = Build.`scala3-bench`
27+
//val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped`
28+
//val `scala3-bench-micro` = Build.`scala3-bench-micro`
29+
//val `scala3-bench-run` = Build.`scala3-bench-run`
3330
val `tasty-core-nonbootstrapped` = Build.`tasty-core-nonbootstrapped`
3431
val `tasty-core-bootstrapped-new` = Build.`tasty-core-bootstrapped-new`
35-
val `tasty-core-bootstrapped` = Build.`tasty-core-bootstrapped`
36-
val `tasty-core-scala2` = Build.`tasty-core-scala2`
3732
val scaladoc = Build.scaladoc
3833
val `scaladoc-new` = Build.`scaladoc-new`
3934
val `scaladoc-testcases` = Build.`scaladoc-testcases`
4035
val `scaladoc-js-common` = Build.`scaladoc-js-common`
4136
val `scaladoc-js-main` = Build.`scaladoc-js-main`
4237
val `scaladoc-js-contributors` = Build.`scaladoc-js-contributors`
43-
val `scala3-bench-run` = Build.`scala3-bench-run`
44-
val dist = Build.dist
45-
val `dist-mac-x86_64` = Build.`dist-mac-x86_64`
46-
val `dist-mac-aarch64` = Build.`dist-mac-aarch64`
47-
val `dist-win-x86_64` = Build.`dist-win-x86_64`
48-
val `dist-linux-x86_64` = Build.`dist-linux-x86_64`
49-
val `dist-linux-aarch64` = Build.`dist-linux-aarch64`
38+
//val dist = Build.dist
39+
//val `dist-mac-x86_64` = Build.`dist-mac-x86_64`
40+
//val `dist-mac-aarch64` = Build.`dist-mac-aarch64`
41+
//val `dist-win-x86_64` = Build.`dist-win-x86_64`
42+
//val `dist-linux-x86_64` = Build.`dist-linux-x86_64`
43+
//val `dist-linux-aarch64` = Build.`dist-linux-aarch64`
5044
val `community-build` = Build.`community-build`
5145
val `scala3-presentation-compiler` = Build.`scala3-presentation-compiler`
5246
val `scala3-presentation-compiler-testcases` = Build.`scala3-presentation-compiler-testcases`

0 commit comments

Comments
 (0)