You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2024/01/25 14:58:39 UTC

(couchdb-fast-pbkdf2) 24/40: Use pure rebar3 in GHA

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-fast-pbkdf2.git

commit 42c61565dc094476fe22defb07488066de13bd30
Author: Nelson Vides <vi...@gmail.com>
AuthorDate: Mon Nov 20 14:11:56 2023 +0100

    Use pure rebar3 in GHA
---
 .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++------------------
 1 file changed, 37 insertions(+), 21 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 285b205..9b5264b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,28 +9,44 @@ on:
 
 jobs:
   test:
-    name: OTP ${{matrix.otp}}
+    name: OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}} / OS ${{matrix.os}}
     strategy:
       matrix:
-        otp: ['24.0', '23.3', '22.3', '21.3']
-    runs-on: 'ubuntu-20.04'
-    env:
-      OTPVER: ${{ matrix.otp }}
+        os: ['ubuntu-22.04']
+        otp: ['26.1', '25.3', '24.3']
+        rebar3: ['3.22.1']
+    runs-on: ${{matrix.os}}
     steps:
-      - uses: actions/checkout@v2
-      - uses: ErlGang/setup-erlang@v1.0.0
+      - uses: actions/checkout@v3
+      - uses: erlef/setup-beam@v1
         with:
-          otp-version: ${{ matrix.otp }}
-      - run: make rebar3
-      - run: make deps
-      - run: make test
-      - run: make dialyzer
-        if: ${{ matrix.otp == '24.0' }}
-      - run: make codecov
-        if: ${{ matrix.otp == '24.0' }}
-      - run: make gcov
-        if: ${{ matrix.otp == '24.0' }}
-      - run: pip install --user codecov
-        if: ${{ matrix.otp == '24.0' }}
-      - run: /home/runner/.local/bin/codecov
-        if: ${{ matrix.otp == '24.0' }}
+          otp-version: ${{matrix.otp}}
+          rebar3-version: ${{matrix.rebar3}}
+      - name: Restore _build
+        uses: actions/cache@v3
+        with:
+          path: _build
+          key: _build-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
+      - name: Restore rebar3's cache
+        uses: actions/cache@v3
+        with:
+          path: ~/.cache/rebar3
+          key: rebar3-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
+
+      - run: rebar3 as test get-deps
+      - run: rebar3 as test compile
+      - run: rebar3 as test ct
+
+      - run: rebar3 dialyzer
+        if: ${{ matrix.otp == '26.1' && matrix.os == 'ubuntu-22.04' }}
+
+      - name: Run coverage
+        if: ${{ matrix.otp == '26.1' && matrix.os == 'ubuntu-22.04' }}
+        run: |
+          rebar3 as test codecov analyze
+          gcov -o c_src fast_pbkdf2
+      - name: Upload coverage
+        if: ${{ matrix.otp == '26.1' && matrix.os == 'ubuntu-22.04' }}
+        run: |
+          pip install --user codecov
+          /home/runner/.local/bin/codecov