Skip to content

Commit

Permalink
Run things sequentially in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdziuban committed Mar 21, 2024
1 parent 0e9c903 commit 24a605d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions both.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
set -exo pipefail

operation="$1"; shift
sequential="$([ "$1" = 'sequential' ] && echo 1 || echo 0)"

function sbtSequential() {
bash -c "cd scala-2 && sbt $1"
bash -c "cd scala-3 && sbt $1"
}

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
Expand Down

0 comments on commit 24a605d

Please sign in to comment.