Skip to content

GitHub Actions: build and test on Windows [ci: last-only]#9496

Merged
SethTisue merged 3 commits intoscala:2.12.xfrom
griggt:wip/gh-actions-windows
Apr 21, 2021
Merged

GitHub Actions: build and test on Windows [ci: last-only]#9496
SethTisue merged 3 commits intoscala:2.12.xfrom
griggt:wip/gh-actions-windows

Conversation

@griggt
Copy link
Contributor

@griggt griggt commented Feb 11, 2021

An experimental GitHub Actions port of #9493.

I've kept Ubuntu in the matrix for comparison.

@scala-jenkins scala-jenkins added this to the 2.12.14 milestone Feb 11, 2021
@SethTisue SethTisue added the internal not resulting in user-visible changes (build changes, tests, internal cleanups) label Feb 11, 2021
@griggt griggt changed the title GitHub Actions: build and test on Windows GitHub Actions: build and test on Windows [ci: last-only] Feb 16, 2021
@SethTisue
Copy link
Member

SethTisue commented Apr 21, 2021

I think it's sufficient for this PR to just test on JDK 8. That would achieve parity with what we have on Jenkins. Adding testing on 11 and/or 16 can be considered separately; there is WIP for JDK 16 on 2.13.x at #9579. Once that lands we could consider whether to expand it to 2.12.x and/or expand it to 11.

In the past week, I've been brushing up on GitHub Actions, adding it to some low-stakes repos to get a feel for it, so I now feel able to move forward with this PR.

@SethTisue SethTisue self-assigned this Apr 21, 2021
@griggt
Copy link
Contributor Author

griggt commented Apr 21, 2021

In that case I would recommend a workflow structure similar to that in 25aa274, avoiding the unnecessary complexity of the upload-artifact and download-artifact actions used in the fanout approach in 50a9924.

@SethTisue SethTisue force-pushed the wip/gh-actions-windows branch from 13b8f80 to ec36685 Compare April 21, 2021 01:55
@SethTisue
Copy link
Member

For comparison purposes, a recent Jenkins run looks like: https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-windows/2098/consoleFull

@SethTisue SethTisue marked this pull request as ready for review April 21, 2021 02:19
@SethTisue
Copy link
Member

SethTisue commented Apr 21, 2021

(I'll do some squashing before merge, and remove the temporary TODO thing in ci.yml, too.)

@lrytz I think we could merge this and shut down our Jenkins Windows stuff forever.

@SethTisue SethTisue requested a review from dwijnand April 21, 2021 02:20
@dwijnand
Copy link
Member

Let's pair review this today so we can land it quickly.

Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! Intuitively it seems to me we should align the scripts with what we do in .travis.yml.

javac -version
generateRepositoriesConfig
# Pass these environment vars to subsequent steps
echo "SBT=sbt -Dsbt.override.build.repos=true -Dsbt.repository.config=${sbtRepositoryConfig}" >> $GITHUB_ENV
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't do scripts/common / generateRepositoriesConfig / sbt.override.build.repos in the travis build, why here?

scala/.travis.yml

Lines 43 to 46 in 52cdad9

- set -e
- sbt setupPublishCore generateBuildCharacterPropertiesFile headerCheck publishLocal
- STARR=$(sed -n 's/^maven\.version\.number=//p' buildcharacter.properties) && echo $STARR
- sbt -Dstarr.version=$STARR setupValidateTest compile

Copy link
Member

@SethTisue SethTisue Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably no reason except that we copied scripts/jobs/integrate/windows rather than copying .travis.yml, which have probably diverged from each other accidentally. I agree we should try for the simpler version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! The pr testing in travis doesn't use anything from scripts, which is what should be our long-term goal.

run: |
source scripts/common
parseScalaProperties buildcharacter.properties
$SBT -Dstarr.version=$maven_version_number -warn setupValidateTest testAll
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why -warn?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beats me, but .travis.yml has it as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, on 2.12, but not anymore on 2.13.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, good catch. I'll remove it

@SethTisue
Copy link
Member

SethTisue commented Apr 21, 2021

I suggest we merge this anyway despite the divergence from .travis.yml, since the immediate goal is to get rid of Windows Jenkins. Then I can address the divergence in a separate PR.

@lrytz
Copy link
Member

lrytz commented Apr 21, 2021

OK if you prefer, though I don't think it's much work to align with travis, and we need to rebase this PR anyway to squash the commits and remove the TODO.

griggt and others added 3 commits April 21, 2021 10:33
Co-authored-by: Seth Tisue <seth@tisue.net>
Co-authored-by: Seth Tisue <seth@tisue.net>
@SethTisue
Copy link
Member

followup PR is #9585

@SethTisue SethTisue enabled auto-merge April 21, 2021 17:56
@SethTisue SethTisue merged commit 5430edf into scala:2.12.x Apr 21, 2021
SethTisue added a commit to SethTisue/scala that referenced this pull request Apr 22, 2021
and remove obsolete CI scripts

forward-ports scala#9496 and scala#9585

Co-authored-by: Seth Tisue <seth@tisue.net>
SethTisue added a commit to SethTisue/scala that referenced this pull request Apr 23, 2021
and remove obsolete CI scripts

forward-ports scala#9496 and scala#9585

Co-authored-by: Seth Tisue <seth@tisue.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal not resulting in user-visible changes (build changes, tests, internal cleanups)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants