Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 0 additions & 124 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ on:
- 'lts-**'
pull_request:
merge_group:
schedule:
- cron: '0 3 * * *' # Every day at 3 AM
workflow_dispatch:

# Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag)
Expand Down Expand Up @@ -619,128 +617,6 @@ jobs:
run: |
./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test"

publish_nightly:
runs-on: [self-hosted, Linux]
container:
image: lampepfl/dotty:2024-10-18
options: --cpu-shares 4096
volumes:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
strategy:
matrix:
series: [
{repository: scala/scala3, branch: main}, # Scala Next nightly
{repository: scala/scala3-lts, branch: lts-3.3} # Scala LTS nightly
]
needs: [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'scala/scala3'"
env:
NIGHTLYBUILD: yes
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
SONATYPE_PW: ${{ secrets.SONATYPE_PW_ORGSCALALANG }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}

steps:
######################################################################################
## WARNING: DO NOT CHANGE THE JAVA VERSION HERE. SCALA IS DISTRIBUTED USING JAVA 8. ##
######################################################################################
- name: Set JDK 8 as default
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true

- name: Checkout cleanup script
uses: actions/checkout@v5

- name: Cleanup
run: .github/workflows/cleanup.sh

- name: Git Checkout
uses: actions/checkout@v5
with:
repository: ${{ matrix.series.repository }}
ref: ${{ matrix.series.branch }}

- name: Add SBT proxy repositories
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true

- name: Get version string for this build
run: |
ver=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
echo "This build version: $ver"
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV

- name: Check is version matching pattern
shell: bash
run: |
if ! grep -Eo "3\.[0-9]+\.[0-9]+-RC[0-9]+-bin-[0-9]{8}-[a-zA-Z0-9]{7}-NIGHTLY" <<< "${{ env.THISBUILD_VERSION }}"; then
echo "Version used by compiler to publish nightly release does not match expected pattern"
exit 1
fi

- name: Check whether not yet published
id: not_yet_published
continue-on-error: true
run: |
! ./project/scripts/is-version-published.sh "$THISBUILD_VERSION"

- name: Publish Nightly
if: "steps.not_yet_published.outcome == 'success'"
run: |
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonaRelease"

nightly_documentation:
runs-on: [self-hosted, Linux]
container:
image: lampepfl/dotty:2024-10-18
options: --cpu-shares 4096
volumes:
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
- ${{ github.workspace }}/../../cache/general:/root/.cache
needs: [publish_nightly]
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.repository == 'scala/scala3'"
env:
NIGHTLYBUILD: yes
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true

- name: Checkout cleanup script
uses: actions/checkout@v5

- name: Cleanup
run: .github/workflows/cleanup.sh

- name: Set JDK 17 as default
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH

- name: Git Checkout
uses: actions/checkout@v5

- name: Add SBT proxy repositories
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true

- name: Generate Website
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
./project/scripts/genDocs -doc-snapshot

- name: Deploy Website to https://dotty.epfl.ch
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.DOTTYBOT_TOKEN }}
publish_dir: docs/_site
external_repository: scala/dotty.epfl.ch
publish_branch: main

publish_release:
permissions:
contents: write # for GH CLI to create a release
Expand Down