From f90a97d8464edb4070c5cf28e400486488ada464 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Tue, 8 Dec 2020 16:46:45 +0100 Subject: [PATCH] CI: each job can only use 4 cores This should allow us to massively increase the number of jobs we can run in parallel. It also means we don't need to run sbt with so much ram so we can remove the max heap size setting in projects/script/sbt. --- .github/workflows/ci.yaml | 10 ++++++++++ project/scripts/sbt | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e4b3c2c284ab..9fd1646f2527 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -53,6 +54,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -137,6 +139,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -172,6 +175,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -207,6 +211,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -242,6 +247,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -284,6 +290,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -318,6 +325,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -359,6 +367,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache @@ -441,6 +450,7 @@ jobs: runs-on: [self-hosted, Linux] container: image: lampepfl/dotty:2020-11-19 + options: --cpus=4 volumes: - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache diff --git a/project/scripts/sbt b/project/scripts/sbt index 6c0e1b7e9b31..8c6f5aa1c280 100755 --- a/project/scripts/sbt +++ b/project/scripts/sbt @@ -7,8 +7,7 @@ set -e CMD="${1:?Missing sbt command}" # run sbt with the supplied arg -sbt -J-Xmx4096m \ - -J-XX:ReservedCodeCacheSize=512m \ +sbt -J-XX:ReservedCodeCacheSize=512m \ -DSBT_PGP_USE_GPG=false \ -no-colors \ "$CMD"