From 141a7d506e9af37e634902b2d7264e8fa99bf334 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Sat, 26 Aug 2023 13:22:01 +0100 Subject: [PATCH 1/4] Prefer GitHub actions' syntax to shell's It also helps to see clearer, in CI, what steps are being skipped We "fix" the env.var to have it directly related to the matrix one --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b86054605..8bdacd794 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: image: erlang:${{ matrix.otp_version }} env: - LATEST_OTP_RELEASE: 26.0 + LATEST_OTP_RELEASE: 26 steps: - uses: actions/checkout@v2 @@ -33,7 +33,9 @@ jobs: - shell: bash name: Dialyzer run: | - [[ "${{ matrix.otp_version }}" != "${{ env.LATEST_OTP_RELEASE }}" ]] || (./rebar3 clean -a && ./rebar3 as dialyzer dialyzer) + ./rebar3 clean -a + ./rebar3 as dialyzer dialyzer + if: ${{ matrix.otp_version == env.LATEST_OTP_RELEASE }} macos: name: Test on MacOS From 77fdbb9abed9f724d03d03a1488d1a35e53b6c6a Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Sat, 26 Aug 2023 13:08:10 +0100 Subject: [PATCH 2/4] Increase chances of running tests on the latest 25 Because this is controlled by the Erlang/OTP Docker maintainers 25.0 is from Sep 13 2022 25 is from Aug 18 2023 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bdacd794..d9c1a004f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - otp_version: [24, 25.0, 26] + otp_version: [24, 25, 26] os: [ubuntu-latest] container: From 6fa30d23aa0927560ae08ffd9499c7ced764707a Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Thu, 14 Sep 2023 22:48:53 +0100 Subject: [PATCH 3/4] Ease pre-pull request CI in forks Otherwise instead of just pushing you have to create a pull request in the fork too --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9c1a004f..313727b60 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,12 +1,6 @@ name: Common Test -on: - pull_request: - branches: - - 'main' - push: - branches: - - 'main' +on: [pull_request, push] jobs: linux: From 8cd3e25fc26bf565c8c6a9de63ecc047391039bb Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Thu, 14 Sep 2023 22:51:43 +0100 Subject: [PATCH 4/4] Fix macOS CI workflow issues This: - cleans deeper - updates and upgrades before doctor - installs the env.-exposed specific latest OTP version --- .github/workflows/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 313727b60..e944bbd16 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,6 +2,9 @@ name: Common Test on: [pull_request, push] +env: + LATEST_OTP_RELEASE: 26 + jobs: linux: name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} @@ -15,9 +18,6 @@ jobs: container: image: erlang:${{ matrix.otp_version }} - env: - LATEST_OTP_RELEASE: 26 - steps: - uses: actions/checkout@v2 - name: Compile @@ -40,15 +40,19 @@ jobs: - name: Brew Version Check run: brew --version - name: Brew Cleanup - run: brew cleanup + run: | + brew cleanup --prune=all -s + brew autoremove - name: Brew Untap Casks run: brew untap homebrew/cask homebrew/core + - name: Keep Brew Fresh + run: | + brew update + brew upgrade - name: Debug Brew run: brew doctor - - name: Keep Brew Fresh - run: brew update - name: Install Erlang - run: brew install erlang + run: brew install erlang@${{ env.LATEST_OTP_RELEASE }} - name: Compile run: ./bootstrap - name: CT tests