lf-lang / lingua-franca

Intuitive concurrent programming in any language
https://www.lf-lang.org
Other
231 stars 62 forks source link

Address intermittant problems with Gradle in CI #1239

Open lhstrh opened 2 years ago

lhstrh commented 2 years ago

At times, ./gradlew fails because it is unable to download Gradle and throws errors like the following:

javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake

Perhaps we should add an action that repeatedly tries to invoke ./gradlew tasks (which would trigger the installation of Gradle if that hadn't yet happened). Alternatively, we could use a caching strategy to lessen the frequency at which Gradle gets downloaded in the first place.

lhstrh commented 2 years ago

Adding this should do the trick:

- uses: actions/cache@v3
  with:
    path: |
      ~/.gradle/caches
      ~/.gradle/wrapper
    key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
    restore-keys: |
      ${{ runner.os }}-gradle-

I recall we were using this action in the past but stopped using it because of other problems. Maybe @petervdonovan remembers?

petervdonovan commented 2 years ago

I recall we were using this action in the past but stopped using it because of other problems.

No, I do not remember any such incident in relation to Gradle. Something like that happened with PNPM lockfiles, but not with Gradle. If anything, I might vaguely remember arguing against caching the Gradle caches, because I was not aware of the connection problem mentioned in this issue.

lhstrh commented 12 months ago

The new caching config doesn't solve this problem, but hopefully #2023 does.