From 1fd6dfbb3cdc0ece68695f20fd01f8387302622f Mon Sep 17 00:00:00 2001 From: Daniel Slapman Date: Sun, 19 Nov 2023 00:30:45 +0100 Subject: [PATCH 1/3] Build & run on JDK 21 --- .github/workflows/ci.yml | 6 +++--- backend/project/Settings.scala | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c890554..74a0bec0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: temurin - java-version: 17 + java-version: 21 check-latest: true - name: Install Protoc @@ -152,7 +152,7 @@ jobs: back-build-native: needs: [front-build] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: CI: true @@ -171,7 +171,7 @@ jobs: - uses: graalvm/setup-graalvm@v1 with: - java-version: '17' + java-version: '21' distribution: 'graalvm' components: 'native-image' github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/backend/project/Settings.scala b/backend/project/Settings.scala index f3a969f7..c4680689 100644 --- a/backend/project/Settings.scala +++ b/backend/project/Settings.scala @@ -127,7 +127,7 @@ object Settings { }, dockerExposedPorts := ports, dockerRepository := ciDockerRegistry.map(_ + "/tcb"), - dockerBaseImage := "eclipse-temurin:17-jre-focal", + dockerBaseImage := "eclipse-temurin:21-jre-jammy", dockerCommands := dockerCommands.value.patch( 8, Seq( @@ -153,7 +153,7 @@ object Settings { ports: List[Int], user: String = "mockingbird", userId: Option[String] = Some("2048"), - imageName: String = "ubuntu:20.04" + imageName: String = "ubuntu:22.04" ): Project => Project = { prj: Project => import com.typesafe.sbt.packager.docker.DockerChmodType import com.typesafe.sbt.packager.docker.{Cmd, DockerPermissionStrategy} From e5db826fa82e785559c2bedc534597f7fd8736f1 Mon Sep 17 00:00:00 2001 From: Daniel Slapman Date: Mon, 27 Nov 2023 22:53:49 +0100 Subject: [PATCH 2/3] Run missinglink as a separate job --- .github/workflows/ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a0bec0..591640b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,26 @@ jobs: name: front-static path: frontend/dist/out + back-missinglink-check: + runs-on: ubuntu-latest + + env: + SBT_OPTS: "-Xms6g -Xmx6g -XX:+AlwaysPreTouch -XX:ReservedCodeCacheSize=128M -XX:MaxMetaspaceSize=512M -Xss2m -XX:+TieredCompilation -XX:+UseParallelGC" + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + check-latest: true + + - name: Compile and test + run: | + cd backend + sbt "project mockingbird-api;clean;missinglinkCheck;" + back-build: needs: [front-build] @@ -95,7 +115,7 @@ jobs: - name: Compile and test run: | cd backend - sbt "project mockingbird-api;clean;fixCheck;test;missinglinkCheck;Docker / stage;" + sbt "project mockingbird-api;clean;fixCheck;test;Docker / stage;" - name: Build docker image for test uses: docker/build-push-action@v3 From 819d583529c0bf83ce9a2ddbfc885cb66569fc92 Mon Sep 17 00:00:00 2001 From: Daniel Slapman Date: Tue, 28 Nov 2023 23:02:39 +0100 Subject: [PATCH 3/3] Stop publishing layers --- .github/workflows/ci.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 591640b6..9a342ce8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,12 +125,6 @@ jobs: tags: ${{ env.MOCKINGBIRD_TEST_IMAGE_JVM }} if: ${{ ! ( github.ref_type == 'tag' || startsWith(github.event.head_commit.message, '[docker]') ) }} - - name: ZIP stages files - uses: montudor/action-zip@v1 - with: - args: zip -r layers.zip ./backend/mockingbird-api/target/docker/stage - if: ${{ github.ref_type == 'tag' }} - - name: Log in to the Container registry uses: docker/login-action@v2 with: @@ -147,15 +141,6 @@ jobs: tags: ghcr.io/leviysoft/mockingbird:${{ steps.get-ref.outputs.tag }} if: ${{ github.ref_type == 'tag' || startsWith(github.event.head_commit.message, '[docker]') }} - - name: Publish layers - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: layers.zip - asset_name: layers.zip - tag: ${{ github.ref_name }} - if: ${{ github.ref_type == 'tag' }} - - name: Save docker image to file run: | docker save -o /tmp/image-jvm.tar ${{ env.MOCKINGBIRD_TEST_IMAGE_JVM }}