Content-Length: 564411 | pFad | http://github.com/scala/scala/commit/3f6bdaeafde17d790023cc3f299b81eaaf876ca3

15 Merge pull request #10978 from scala/no-travis-ci-for-pr-validation · scala/scala@3f6bdae · GitHub
Skip to content

Commit 3f6bdae

Browse files
authored
Merge pull request #10978 from scala/no-travis-ci-for-pr-validation
no more Travis-CI for PR validation, use GitHub Actions [forward port]
2 parents 92a9eb2 + f748f82 commit 3f6bdae

File tree

3 files changed

+45
-105
lines changed

3 files changed

+45
-105
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
- name: Test
4444
run: |
4545
STARR=`cat buildcharacter.properties | grep ^maven.version.number | cut -d= -f2` && echo $STARR
46-
sbt -Dstarr.version=$STARR setupValidateTest test:compile info testAll
46+
sbt -Dstarr.version=$STARR setupValidateTest Test/compile info testAll

.github/workflows/validate.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PR validation
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
validate:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-java@v4
11+
with:
12+
distribution: temurin
13+
java-version: 8
14+
cache: sbt
15+
- uses: sbt/setup-sbt@v1
16+
# "mini" bootstrap for PR validation
17+
# "mini" in these senses:
18+
# - it doesn't use the complicated legacy scripts.
19+
# - it doesn't publish to scala-pr-validation-snapshots
20+
# (because we need secrets for that and PRs from forks can't have secrets)
21+
# it is still a true bootstrap.
22+
- name: build
23+
run: sbt -warn setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
24+
- name: rebuild
25+
run: |
26+
STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
27+
sbt -Dstarr.version=$STARR Test/compile
28+
- name: testAll1
29+
run: |
30+
STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
31+
sbt -Dstarr.version=$STARR setupValidateTest testAll1
32+
- name: testAll2
33+
run: |
34+
STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
35+
sbt -Dstarr.version=$STARR setupValidateTest testAll2
36+
- name: benchmarks
37+
run: |
38+
STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
39+
sbt -Dstarr.version=$STARR bench/Jmh/compile
40+
- name: build library with Scala 3
41+
run: sbt -Dscala.build.compileWithDotty=true library/compile

.travis.yml

Lines changed: 3 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,12 @@ dist: xenial # GPG stuff breaks on bionic; scala/scala-dev#764
55
language: scala
66

77
stages:
8-
- build
9-
- test
10-
11-
templates: # this has no effect on travis, it's just a place to put our templates
12-
pr-jdk8: &pr-jdk8
13-
if: type = pull_request OR repo != scala/scala
14-
15-
cron-jdk17: &cron-jdk17
16-
if: type = cron AND repo = scala/scala
17-
env: ADOPTOPENJDK=17
18-
19-
build-for-testing: &build-for-testing
20-
# pull request validation (w/ bootstrap)
21-
# differs from the build that publishes releases / integration builds:
22-
# - not using bash script setup, but just the underlying sbt calls
23-
# - publishing locally rather than to Artifactory
24-
# the bootstrap above is older historically; this way of doing it is newer
25-
# and also simpler. we should aim to reduce/eliminate the duplication.
26-
stage: build
27-
name: build, publishLocal, build again
28-
script:
29-
- set -e
30-
- sbt setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
31-
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
32-
- sbt -Dstarr.version=$STARR setupValidateTest compile
33-
workspaces:
34-
create:
35-
name: bootstrapped
36-
paths:
37-
# so new STARR will be available
38-
- "buildcharacter.properties"
39-
- "$HOME/.ivy2/local/org.scala-lang"
40-
# so build products built using new STARR are kept
41-
- "target"
42-
- "project/target"
43-
- "project/project/target"
44-
- "project/project/project/target"
45-
- "dist"
46-
- "build"
47-
48-
test1: &test1
49-
stage: test
50-
name: tests (junit, scalacheck, et al)
51-
workspaces:
52-
use: bootstrapped
53-
script:
54-
- set -e
55-
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
56-
- sbt -Dstarr.version=$STARR setupValidateTest Test/compile testAll1
57-
58-
test2: &test2
59-
stage: test
60-
name: tests (partest)
61-
workspaces:
62-
use: bootstrapped
63-
script:
64-
- set -e
65-
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
66-
- sbt -Dstarr.version=$STARR setupValidateTest testAll2
8+
- name: build
679

6810
jobs:
6911
include:
7012
- stage: build
71-
if: (type = push OR type = api) AND repo = scala/scala # api for manually triggered release builds
13+
if: type != pull_request AND repo = scala/scala AND branch = 2.13.x
7214
name: publish (bootstrapped) to scala-integration or sonatype
7315
script:
7416
# see comment in `bootstrap_fun` for details on the procedure
@@ -87,45 +29,8 @@ jobs:
8729
- buildQuick
8830
- triggerScalaDist
8931

90-
- <<: *build-for-testing
91-
<<: *pr-jdk8
92-
93-
- <<: *test1
94-
<<: *pr-jdk8
95-
96-
- <<: *test2
97-
<<: *pr-jdk8
98-
99-
- <<: *build-for-testing
100-
<<: *cron-jdk17
101-
102-
- <<: *test1
103-
<<: *cron-jdk17
104-
105-
- <<: *test2
106-
<<: *cron-jdk17
107-
108-
- stage: test
109-
name: build library with Scala 3
110-
if: type = pull_request OR repo != scala/scala
111-
workspaces:
112-
use: bootstrapped
113-
script:
114-
- set -e
115-
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
116-
- sbt -Dscala.build.compileWithDotty=true library/compile
117-
118-
- name: build benchmarks
119-
if: type = pull_request OR repo != scala/scala
120-
workspaces:
121-
use: bootstrapped
122-
script:
123-
- set -e
124-
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
125-
- sbt bench/Jmh/compile
126-
12732
- stage: build
128-
if: type = pull_request OR type = push
33+
if: type != pull_request AND repo = scala/scala AND branch = 2.13.x
12934
name: language spec
13035
dist: focal
13136
language: ruby
@@ -169,10 +74,4 @@ cache:
16974
- $HOME/.rvm
17075

17176
notifications:
172-
slack:
173-
rooms:
174-
- typesafe:WoewGgHil2FkdGzJyV3phAhj
175-
if: (type = cron OR type = push) AND repo = scala/scala
176-
on_success: never
177-
on_failure: change
17877
webhooks: https://scala-ci.typesafe.com/benchq/webhooks/travis

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/scala/scala/commit/3f6bdaeafde17d790023cc3f299b81eaaf876ca3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy