From 24a605d07ccfcdefa79ee1c308eb6288b695a2e0 Mon Sep 17 00:00:00 2001 From: Matt Dziuban Date: Thu, 21 Mar 2024 10:15:37 -0400 Subject: [PATCH] Run things sequentially in CI. --- .github/workflows/ci.yml | 6 +++--- both.sh | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a18ac24..5ec56e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,10 @@ jobs: cache: sbt - name: Test - run: ./both.sh test + run: ./both.sh test sequential - name: Check binary compatibility - run: ./both.sh mimaReport + run: ./both.sh mimaReport sequential - name: Build docs - run: ./both.sh docs + run: ./both.sh docs sequential diff --git a/both.sh b/both.sh index 905cea6..bf9cfb2 100755 --- a/both.sh +++ b/both.sh @@ -3,6 +3,7 @@ set -exo pipefail operation="$1"; shift +sequential="$([ "$1" = 'sequential' ] && echo 1 || echo 0)" function sbtSequential() { bash -c "cd scala-2 && sbt $1" @@ -10,6 +11,11 @@ function sbtSequential() { } function sbtParallel() { + if [ "$sequential" = 1 ]; then + sbtSequential $1 + return + fi + bash -c "cd scala-2 && sbt $1" & bash -c "cd scala-3 && sbt $1" & wait