From d6b630412ea70791d4223d4d6a80617c3e248d03 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:03:36 -0500 Subject: [PATCH 1/2] Add a matrix, and build sbt 2 --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9507c1..2dd5dc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,15 @@ on: - cron: '0 7 * * 6' jobs: build: + strategy: + matrix: + include: + - java: 8 + distribution: temurin + sbt: 1 + - java: 8 + distribution: temurin + sbt: 2 runs-on: ubuntu-latest env: # define Java options for both official sbt and sbt-extras @@ -14,19 +23,33 @@ jobs: JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Scala - uses: olafurpg/setup-scala@v10 + uses: actions/setup-java@v4 with: - java-version: "adopt@1.8" + distribution: "${{ matrix.distribution }}" + java-version: "${{ matrix.java }}" - name: Coursier cache uses: coursier/cache-action@v5 - - name: Build and test + - name: Build and test (sbt 1.x) + if: ${{ matrix.sbt == 1 }} + shell: bash run: | gpg --import test-key.gpg - sbt -v clean test scripted + sbt -v ++2.12.x clean test scripted rm -rf "$HOME/.ivy2/local" || true find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true find $HOME/.sbt + - name: Build and test (sbt 2.x) + if: ${{ matrix.sbt == 2 }} + shell: bash + run: | + gpg --import test-key.gpg + sbt -v ++3.x clean test scripted + rm -rf "$HOME/.ivy2/local" || true + find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true + find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true + find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true + find $HOME/.sbt \ No newline at end of file From 2a14fa57e0257824ad0fefa6f2cd3fde9cb26745 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:40:28 -0500 Subject: [PATCH 2/2] Adding in more standard cache/publish options --- .github/workflows/ci.yml | 15 ++------------- .github/workflows/publish.yml | 11 ++++++++--- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dd5dc5..3b4800a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,27 +29,16 @@ jobs: with: distribution: "${{ matrix.distribution }}" java-version: "${{ matrix.java }}" - - name: Coursier cache - uses: coursier/cache-action@v5 + cache: sbt - name: Build and test (sbt 1.x) if: ${{ matrix.sbt == 1 }} shell: bash run: | gpg --import test-key.gpg sbt -v ++2.12.x clean test scripted - rm -rf "$HOME/.ivy2/local" || true - find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true - find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true - find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true - find $HOME/.sbt - name: Build and test (sbt 2.x) if: ${{ matrix.sbt == 2 }} shell: bash run: | gpg --import test-key.gpg - sbt -v ++3.x clean test scripted - rm -rf "$HOME/.ivy2/local" || true - find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true - find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true - find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true - find $HOME/.sbt \ No newline at end of file + sbt -v ++3.x clean test scripted \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ed826f1..f5a38f8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,11 +14,16 @@ jobs: JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 steps: - name: Checkout - uses: actions/checkout@v2 - - name: Coursier cache - uses: coursier/cache-action@v5 + uses: actions/checkout@v4 + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + cache: sbt - name: Test run: | + gpg --import test-key.gpg sbt +test +packagedArtifacts - name: Release env: