Skip to content

Commit cda99d0

Browse files
Synchronize language-reference-stable with Scala 3.6.3 (#22398)
2 parents 80e09f7 + 383d19a commit cda99d0

File tree

1,921 files changed

+29243
-170685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,921 files changed

+29243
-170685
lines changed

.github/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ RUN apt-get update && \
1515
openjdk-17-jdk-headless \
1616
openjdk-21-jdk-headless && \
1717
(curl -fsSL https://deb.nodesource.com/setup_18.x | bash -) && \
18-
apt-get install -y nodejs
18+
apt-get install -y nodejs && \
19+
apt-get install -y zip unzip
1920

2021

2122
# Install sbt

.github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ updates:
88
- hamzaremmal
99
reviewers:
1010
- hamzaremmal
11+
- package-ecosystem: bundler
12+
directory: '/docs/_spec'
13+
schedule:
14+
interval: weekly
15+
assignees:
16+
- hamzaremmal
17+
reviewers:
18+
- hamzaremmal
19+
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
###################################################################################################
2+
### THIS IS A REUSABLE WORKFLOW TO BUILD SCALA WITH CHOCOLATEY ###
3+
### HOW TO USE: ###
4+
### ###
5+
### NOTE: ###
6+
### ###
7+
###################################################################################################
8+
9+
10+
name: Build 'scala' Chocolatey Package
11+
run-name: Build 'scala' (${{ inputs.version }}) Chocolatey Package
12+
13+
on:
14+
workflow_call:
15+
inputs:
16+
version:
17+
required: true
18+
type : string
19+
url:
20+
required: true
21+
type : string
22+
digest:
23+
required: true
24+
type : string
25+
26+
jobs:
27+
build:
28+
runs-on: windows-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Replace the version placeholder
32+
uses: richardrigutins/replace-in-files@v2
33+
with:
34+
files: ./pkgs/chocolatey/scala.nuspec
35+
search-text: '@LAUNCHER_VERSION@'
36+
replacement-text: ${{ inputs.version }}
37+
- name: Replace the URL placeholder
38+
uses: richardrigutins/replace-in-files@v2
39+
with:
40+
files: ./pkgs/chocolatey/tools/chocolateyInstall.ps1
41+
search-text: '@LAUNCHER_URL@'
42+
replacement-text: ${{ inputs.url }}
43+
- name: Replace the CHECKSUM placeholder
44+
uses: richardrigutins/replace-in-files@v2
45+
with:
46+
files: ./pkgs/chocolatey/tools/chocolateyInstall.ps1
47+
search-text: '@LAUNCHER_SHA256@'
48+
replacement-text: ${{ inputs.digest }}
49+
- name: Build the Chocolatey package (.nupkg)
50+
run: choco pack ./pkgs/chocolatey/scala.nuspec --out ./pkgs/chocolatey
51+
- name: Upload the Chocolatey package to GitHub
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: scala.nupkg
55+
path: ./pkgs/chocolatey/scala.${{ inputs.version }}.nupkg
56+
if-no-files-found: error
57+

.github/workflows/build-msi.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
###################################################################################################
2+
### THIS IS A REUSABLE WORKFLOW TO BUILD SCALA MSI ###
3+
### HOW TO USE: ###
4+
### - THE RELEASE WORKFLOW SHOULD CALL THIS WORKFLOW ###
5+
### - IT WILL UPLOAD TO GITHUB THE MSI FILE FOR SCALA UNDER THE 'scala.msi' NAME ###
6+
### ###
7+
### NOTE: ###
8+
### - WE SHOULD BUILD SCALA USING JAVA 8 ###
9+
###################################################################################################
10+
11+
name: Build the MSI Package
12+
13+
on:
14+
workflow_call:
15+
16+
env:
17+
# Release only happends when triggering CI by pushing tag
18+
RELEASEBUILD: ${{ startsWith(github.event.ref, 'refs/tags/') && 'yes' || 'no' }}
19+
20+
jobs:
21+
build:
22+
runs-on: windows-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-java@v4
26+
with:
27+
distribution: 'adopt'
28+
java-version: '8'
29+
cache: 'sbt'
30+
- name: Build MSI package
31+
run: sbt 'dist-win-x86_64/Windows/packageBin'
32+
env:
33+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
34+
- name: Upload MSI Artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: scala.msi
38+
path: ./dist/win-x86_64/target/windows/scala.msi

.github/workflows/build-sdk.yml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
###################################################################################################
2+
### THIS IS A REUSABLE WORKFLOW TO BUILD THE SCALA LAUNCHERS ###
3+
### HOW TO USE: ###
4+
### - THSI WORKFLOW WILL PACKAGE THE ALL THE LAUNCHERS AND UPLOAD THEM TO GITHUB ARTIFACTS ###
5+
### ###
6+
### NOTE: ###
7+
### - SEE THE WORFLOW FOR THE NAMES OF THE ARTIFACTS ###
8+
###################################################################################################
9+
10+
11+
name: Build Scala Launchers
12+
run-name: Build Scala Launchers
13+
14+
on:
15+
workflow_call:
16+
inputs:
17+
java-version:
18+
type : string
19+
required : true
20+
outputs:
21+
universal-id:
22+
description: ID of the `universal` package from GitHub Artifacts (Authentication Required)
23+
value : ${{ jobs.build.outputs.universal-id }}
24+
linux-x86_64-id:
25+
description: ID of the `linux x86-64` package from GitHub Artifacts (Authentication Required)
26+
value : ${{ jobs.build.outputs.linux-x86_64-id }}
27+
linux-aarch64-id:
28+
description: ID of the `linux aarch64` package from GitHub Artifacts (Authentication Required)
29+
value : ${{ jobs.build.outputs.linux-aarch64-id }}
30+
mac-x86_64-id:
31+
description: ID of the `mac x86-64` package from GitHub Artifacts (Authentication Required)
32+
value : ${{ jobs.build.outputs.mac-x86_64-id }}
33+
mac-aarch64-id:
34+
description: ID of the `mac aarch64` package from GitHub Artifacts (Authentication Required)
35+
value : ${{ jobs.build.outputs.mac-aarch64-id }}
36+
win-x86_64-id:
37+
description: ID of the `win x86-64` package from GitHub Artifacts (Authentication Required)
38+
value : ${{ jobs.build.outputs.win-x86_64-id }}
39+
win-x86_64-digest:
40+
description: The SHA256 of the uploaded artifact (`win x86-64`)
41+
value : ${{ jobs.build.outputs.win-x86_64-digest }}
42+
43+
44+
jobs:
45+
build:
46+
runs-on: ubuntu-latest
47+
outputs:
48+
universal-id : ${{ steps.universal.outputs.artifact-id }}
49+
linux-x86_64-id : ${{ steps.linux-x86_64.outputs.artifact-id }}
50+
linux-aarch64-id : ${{ steps.linux-aarch64.outputs.artifact-id }}
51+
mac-x86_64-id : ${{ steps.mac-x86_64.outputs.artifact-id }}
52+
mac-aarch64-id : ${{ steps.mac-aarch64.outputs.artifact-id }}
53+
win-x86_64-id : ${{ steps.win-x86_64.outputs.artifact-id }}
54+
win-x86_64-digest: ${{ steps.win-x86_64-digest.outputs.digest }}
55+
env:
56+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: actions/setup-java@v4
60+
with:
61+
distribution: temurin
62+
java-version: ${{ inputs.java-version }}
63+
cache : sbt
64+
- uses: sbt/setup-sbt@v1
65+
- name: Build and pack the SDK (universal)
66+
run : ./project/scripts/sbt dist/Universal/stage
67+
- name: Build and pack the SDK (linux x86-64)
68+
run : ./project/scripts/sbt dist-linux-x86_64/Universal/stage
69+
- name: Build and pack the SDK (linux aarch64)
70+
run : ./project/scripts/sbt dist-linux-aarch64/Universal/stage
71+
- name: Build and pack the SDK (mac x86-64)
72+
run : ./project/scripts/sbt dist-mac-x86_64/Universal/stage
73+
- name: Build and pack the SDK (mac aarch64)
74+
run : ./project/scripts/sbt dist-mac-aarch64/Universal/stage
75+
- name: Build and pack the SDK (win x86-64)
76+
run : ./project/scripts/sbt dist-win-x86_64/Universal/stage
77+
- name: Upload zip archive to GitHub Artifact (universal)
78+
uses: actions/upload-artifact@v4
79+
id : universal
80+
with:
81+
path: ./dist/target/universal/stage
82+
name: scala3-universal
83+
- name: Upload zip archive to GitHub Artifact (linux x86-64)
84+
uses: actions/upload-artifact@v4
85+
id : linux-x86_64
86+
with:
87+
path: ./dist/linux-x86_64/target/universal/stage
88+
name: scala3-x86_64-pc-linux
89+
- name: Upload zip archive to GitHub Artifact (linux aarch64)
90+
uses: actions/upload-artifact@v4
91+
id : linux-aarch64
92+
with:
93+
path: ./dist/linux-aarch64/target/universal/stage
94+
name: scala3-aarch64-pc-linux
95+
- name: Upload zip archive to GitHub Artifact (mac x86-64)
96+
uses: actions/upload-artifact@v4
97+
id : mac-x86_64
98+
with:
99+
path: ./dist/mac-x86_64/target/universal/stage
100+
name: scala3-x86_64-apple-darwin
101+
- name: Upload zip archive to GitHub Artifact (mac aarch64)
102+
uses: actions/upload-artifact@v4
103+
id : mac-aarch64
104+
with:
105+
path: ./dist/mac-aarch64/target/universal/stage
106+
name: scala3-aarch64-apple-darwin
107+
- name: Upload zip archive to GitHub Artifact (win x86-64)
108+
uses: actions/upload-artifact@v4
109+
id : win-x86_64
110+
with:
111+
path: ./dist/win-x86_64/target/universal/stage
112+
name: scala3-x86_64-pc-win32
113+
- name: Compute SHA256 of the uploaded artifact (win x86-64)
114+
id : win-x86_64-digest
115+
run : |
116+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o artifact.zip -L https://api.github.com/repos/scala/scala3/actions/artifacts/${{ steps.win-x86_64.outputs.artifact-id }}/zip
117+
echo "digest=$(sha256sum artifact.zip | cut -d " " -f 1)" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)