Skip to content

Commit 776cee8

Browse files
committed
Test stdlib-bootstrapped TASTy-MiMa in CI
1 parent c04d2db commit 776cee8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ jobs:
255255
run: |
256256
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; stdlib-bootstrapped/mimaReportBinaryIssues"
257257
258+
- name: TASTy MiMa
259+
run: |
260+
# This script cleans the compiler and recompiles it from scratch (keep as last run)
261+
./project/scripts/stdlib-bootstrapped-tasty-mima.sh
262+
258263
community_build_a:
259264
runs-on: [self-hosted, Linux]
260265
container:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
set -eux
3+
4+
source $(dirname $0)/cmdTestsCommon.inc.sh
5+
6+
TASTY_FROMAT_FILE="tasty/src/dotty/tools/tasty/TastyFormat.scala"
7+
MINOR_TASTY_VERSION_SUPPORTED_BY_TASTY_MIMA=3
8+
MINOR_TASTY_VERSION=$(grep -oE 'val MinorVersion: Int = ([0-9]+)' $TASTY_FROMAT_FILE | grep -oE '[0-9]+')
9+
EXPERIMENTAL_TASTY_VERSION=$(grep -oE 'val ExperimentalVersion: Int = ([0-9]+)' $TASTY_FROMAT_FILE | grep -oE '[0-9]+')
10+
11+
setTastyVersion() {
12+
sed -i -E -e "s/val MinorVersion: Int = [0-9]+/val MinorVersion: Int = $1/" -e "s/val ExperimentalVersion: Int = [0-9]+/val ExperimentalVersion: Int = $2/" $TASTY_FROMAT_FILE
13+
}
14+
15+
setTastyVersion $MINOR_TASTY_VERSION_SUPPORTED_BY_TASTY_MIMA 0
16+
17+
# Run stdlib-bootstrapped/tastyMiMaReportIssues using a custom TASTy version.
18+
# We clean before to make sure all sources are recompiled using the new TASTY version.
19+
# We clean after to make sure no other test will use the TASTy generated with this version.
20+
"$SBT" "clean; stdlib-bootstrapped/clean; reload; stdlib-bootstrapped/tastyMiMaReportIssues; clean; stdlib-bootstrapped/clean"
21+
22+
setTastyVersion $MINOR_TASTY_VERSION $EXPERIMENTAL_TASTY_VERSION

0 commit comments

Comments
 (0)