From 1235578ca8af7a9d3b7087b217acf9caa67e3235 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 19 Oct 2024 12:23:21 +0200 Subject: [PATCH] Simplify the check, don't pipe using tee, run sbt show verison twice --- .github/workflows/ci.yaml | 52 +-------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8aeef9ab7c3f..de07daa98919 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -83,7 +83,6 @@ jobs: run : | sbt --batch --no-colors "show scala3-compiler-bootstrapped/version" version=$(sbt --batch --no-colors "show scala3-compiler-bootstrapped/version" \ - | tee /dev/stdout \ | grep -Eo "3\.[0-9]+\.[0-9]+(-RC[0-9]+)?") if [ "${version}" = "${{ env.RELEASE_TAG }}" ]; then echo "Compiler version '${version}' matches tag: ${{ env.RELEASE_TAG }}" @@ -133,58 +132,9 @@ jobs: - name: Check compiler version shell: bash run : | + sbt --batch --no-colors "show scala3-compiler-bootstrapped/version" if ! sbt --batch --no-colors "show scala3-compiler-bootstrapped/version" \ - | tee /dev/stdout \ | grep -Eo "3\.[0-9]+\.[0-9]+-RC[0-9]+-bin-[0-9]{8}-[a-zA-Z0-9]{7}-NIGHTLY" >/dev/null 2>&1; then echo "Version used by compiler to publish nightly release does not match expected pattern" exit 1 - fi - test-snapshot: - runs-on: [ubuntu-22.04] - container: - image: lampepfl/dotty:2024-10-18 - options: --cpu-shares 4096 - volumes: - - ${{ github.workspace }}/../../cache/sbt:/root/.sbt - - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache - - ${{ github.workspace }}/../../cache/general:/root/.cache - - steps: - ###################################################################################### - ## WARNING: DO NOT CHANGE THE JAVA VERSION HERE. SCALA IS DISTRIBUTED USING JAVA 8. ## - ###################################################################################### - - name: Set JDK 8 as default - run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH - - name: Reset existing repo - run: | - git config --global --add safe.directory /__w/scala3/scala3 - git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true - - - name: Checkout cleanup script - uses: actions/checkout@v4 - - - name: Cleanup - run: .github/workflows/cleanup.sh - - - name: Git Checkout - uses: actions/checkout@v4 - - - name: Add SBT proxy repositories - run: cp -vf .github/workflows/repositories /root/.sbt/ ; true - # Extract the release tag - - name: Extract the release tag - run : echo "RELEASE_TAG=3.6.2" >> $GITHUB_ENV - # BUILD THE SDKs - - name: Check compiler version - shell: bash - run : | - sbt --batch --no-colors "show scala3-compiler-bootstrapped/version" - # TODO: Fix me, Commented out to test for debug purpuse, failed during release with no info - # Pipe through xargs to remove whitespaces - version=$(sbt --batch --no-colors "show scala3-compiler-bootstrapped/version" | grep -oEh "3\.\d+\.\d+([-a-zA-Z1-9]+)?") - if [ "${version}" = "${{ env.RELEASE_TAG }}" ]; then - echo "Compiler version '${version}' matches tag: ${{ env.RELEASE_TAG }}" - else - echo "Invalid compiler version '${version}', does not match tag: ${{ env.RELEASE_TAG }}" - exit 1 fi \ No newline at end of file