From d6a09fad26609630bf2659a75dc94a81a7c2cfa4 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 29 Jul 2023 01:23:12 -0400 Subject: [PATCH] Switch to Scala CLA --- .github/workflows/ci.yml | 26 +++++++++++--------------- .github/workflows/cla.yml | 24 ++++++++++++++++++++++++ project/build.properties | 2 +- 3 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/cla.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32c533a..3710525 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,25 +12,21 @@ jobs: include: - jobtype: 1 - jobtype: 2 + - jobtype: 3 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - name: Setup JDK + uses: actions/setup-java@v3 with: + distribution: temurin java-version: 11 - distribution: adopt - - uses: coursier/cache-action@v6 + cache: sbt - if: ${{ matrix.jobtype == 1 }} shell: bash - run: sbt -v "++2.13.8!" library/test + run: sbt -v "++2.13.x" library/test - if: ${{ matrix.jobtype == 2 }} shell: bash - run: sbt -v "++2.12.15!" scalafmtCheckAll test scripted - - shell: bash - run: | - rm -rf "$HOME/.sbt/scripted/" || true - rm -rf "$HOME/.ivy2/local" || true - rm -r $(find $HOME/.sbt/boot -name "*-SNAPSHOT") || 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 "*.lock" -delete || true + run: sbt -v "++2.12.x" test scripted + - if: ${{ matrix.jobtype == 3 }} + shell: bash + run: sbt -v "++2.12.x" scalafmtCheckAll diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 0000000..abbf9f3 --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,24 @@ +name: Scala CLA +on: [pull_request] +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check CLA + env: + AUTHOR: ${{ github.event.pull_request.user.login }} + run: | + echo "Pull request submitted by $AUTHOR"; + signed=$(curl -s "https://www.lightbend.com/contribute/cla/scala/check/$AUTHOR" | jq -r ".signed"); + if [ "$signed" = "true" ] ; then + echo "CLA check for $AUTHOR successful"; + else + echo "CLA check for $AUTHOR failed"; + echo "Please sign the Scala CLA to contribute to the Scala compiler."; + echo "Go to https://www.lightbend.com/contribute/cla/scala and then"; + echo "comment on the pull request to ask for a new check."; + echo ""; + echo "Check if CLA is signed: https://www.lightbend.com/contribute/cla/scala/check/$AUTHOR"; + exit 1; + fi; diff --git a/project/build.properties b/project/build.properties index 203e3dc..52413ab 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.1 \ No newline at end of file +sbt.version=1.9.3