Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different memory settings for local import & build #2948

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
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
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
branches: ['**']
tags: [v*]
env:
# .sbtopts specifies 8g, which is needed to import into IntelliJ, but on GH that exceeds the maximum available memory
SBT_JAVA_OPTS: -J-Xms4g -J-Xmx4g
jobs:
ci:
# run on external PRs, but not on internal PRs since those will be run by push to branch
Expand Down Expand Up @@ -50,32 +53,32 @@ jobs:
sudo apt-get install libidn2-dev libcurl3-dev
echo "STTP_NATIVE=1" >> $GITHUB_ENV
- name: Compile
run: sbt -v "compileScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}"
run: sbt $SBT_JAVA_OPTS -v "compileScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}"
- name: Compile documentation
if: matrix.target-platform == 'JVM'
run: sbt -v compileDocumentation
run: sbt $SBT_JAVA_OPTS -v compileDocumentation
- name: Test
if: matrix.target-platform != 'JS'
uses: nick-fields/retry@v2
with:
timeout_minutes: 45
max_attempts: 3
command: sbt -v "testScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}"
command: sbt $SBT_JAVA_OPTS -v "testScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}"
# The finatra tests take a really long time (1/3 of the build duration); hence, they are disabled and need to be run separately
#- name: Test finatra
# if: matrix.target-platform != 'JS'
# run: sbt -v testFinatra
# run: sbt $SBT_JAVA_OPTS -v testFinatra
# Temporarily call JS tests for each subproject explicitly as a workaround until
# https://github.com/scala-js/scala-js/issues/4317 has a solution
- name: Test
if: matrix.target-platform == 'JS' && matrix.scala-version == '2.12'
run: sbt catsJS2_12/test circeJsonJS2_12/test clientCoreJS2_12/test clientTestsJS2_12/test coreJS2_12/test enumeratumJS2_12/test jsoniterScalaJS2_12/test newtypeJS2_12/test openapiDocsJS2_12/test playJsonJS2_12/test redocJS2_12/test serverCoreJS2_12/test sttpClientJS2_12/test testingJS2_12/test testsJS2_12/test uPickleJsonJS2_12/test zio1JsonJS2_12/test zioJsonJS2_12/test
run: sbt $SBT_JAVA_OPTS catsJS2_12/test circeJsonJS2_12/test clientCoreJS2_12/test clientTestsJS2_12/test coreJS2_12/test enumeratumJS2_12/test jsoniterScalaJS2_12/test newtypeJS2_12/test openapiDocsJS2_12/test playJsonJS2_12/test redocJS2_12/test serverCoreJS2_12/test sttpClientJS2_12/test testingJS2_12/test testsJS2_12/test uPickleJsonJS2_12/test zio1JsonJS2_12/test zioJsonJS2_12/test
- name: Test
if: matrix.target-platform == 'JS' && matrix.scala-version == '2.13'
run: sbt catsJS/test circeJsonJS/test clientCoreJS/test clientTestsJS/test coreJS/test enumeratumJS/test jsoniterScalaJS/test newtypeJS/test openapiDocsJS/test playJsonJS/test redocJS/test serverCoreJS/test sttpClientJS/test testingJS/test testsJS/test uPickleJsonJS/test zio1JsonJS/test zioJsonJS/test
run: sbt $SBT_JAVA_OPTS catsJS/test circeJsonJS/test clientCoreJS/test clientTestsJS/test coreJS/test enumeratumJS/test jsoniterScalaJS/test newtypeJS/test openapiDocsJS/test playJsonJS/test redocJS/test serverCoreJS/test sttpClientJS/test testingJS/test testsJS/test uPickleJsonJS/test zio1JsonJS/test zioJsonJS/test
- name: Test
if: matrix.target-platform == 'JS' && matrix.scala-version == '3'
run: sbt catsJS3/test circeJsonJS3/test clientCoreJS3/test clientTestsJS3/test coreJS3/test jsoniterScalaJS3/test openapiDocsJS3/test redocJS3/test serverCoreJS3/test sttpClientJS3/test testingJS3/test testsJS3/test uPickleJsonJS3/test zioJsonJS3/test
run: sbt $SBT_JAVA_OPTS catsJS3/test circeJsonJS3/test clientCoreJS3/test clientTestsJS3/test coreJS3/test jsoniterScalaJS3/test openapiDocsJS3/test redocJS3/test serverCoreJS3/test sttpClientJS3/test testingJS3/test testsJS3/test uPickleJsonJS3/test zioJsonJS3/test
- name: Prepare release notes
uses: release-drafter/release-drafter@v5
with:
Expand All @@ -99,7 +102,7 @@ jobs:
java-version: 11
cache: 'sbt'
- name: Check MiMa
run: sbt -v mimaReportBinaryIssues
run: sbt $SBT_JAVA_OPTS -v mimaReportBinaryIssues

publish:
name: Publish release
Expand All @@ -122,9 +125,9 @@ jobs:
sudo apt-get update
sudo apt-get install libidn2-dev libcurl3-dev
- name: Compile
run: sbt compile
run: sbt $SBT_JAVA_OPTS compile
- name: Publish artifacts
run: sbt ci-release
run: sbt $SBT_JAVA_OPTS ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand Down
2 changes: 1 addition & 1 deletion .sbtopts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-J-Xmx4G
-J-Xmx8G
-J-Xss2M
-Dsbt.task.timings=false