From 73eb8df06044c9118f0d7019fbe96aa1103fd420 Mon Sep 17 00:00:00 2001 From: Duncan McGreggor Date: Mon, 4 Mar 2024 23:36:31 -0600 Subject: [PATCH] CI/CD updates. --- .github/workflows/cicd.yml | 54 +++++++++++++++----------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 9dff036..8b12972 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -10,24 +10,19 @@ on: jobs: builds: - name: Old builds on OTP ${{ matrix.otp_version }} / ${{ matrix.os }} + name: Erlang ${{ matrix.otp-version }} build runs-on: ubuntu-latest strategy: matrix: - # XXX had to comment out 19 and 20 for now, due to copying in the code - # from rebar3 to work around Erlang 26: - # * https://github.com/lfe/rebar3/issues/79 - #otp_version: [19, 20, 21, 22, 23] - otp_version: [21, 22, 23] - # otp_version: [22] - os: ['ubuntu-latest'] - - container: - image: erlang:${{ matrix.otp_version }} + otp-version: ['26', '25', '24'] steps: - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp-version }} + rebar3-version: '3.22' - name: Check rebar3 Version run: DEBUG=1 rebar3 --version - name: Compile @@ -79,39 +74,34 @@ jobs: - name: Clean-build Command run: cd priv/testing/example-app && rebar3 lfe clean-build - new-builds: - name: New builds on OTP ${{ matrix.otp_version }} / ${{ matrix.os }} - runs-on: ubuntu-latest + older-builds: + name: Erlang ${{ matrix.otp-version }} build (old) + runs-on: ubuntu-20.04 strategy: matrix: - otp_version: [24, 25, 26] - rebar3-version: ['3.22.0'] - os: [ubuntu-latest] - - container: - image: erlang:${{ matrix.otp_version }} + otp-version: ['23', '22', '21'] steps: - uses: actions/checkout@v4 - - name: Download rebar3 - run: wget https://github.com/erlang/rebar3/releases/download/${{ matrix.rebar3-version }}/rebar3 && chmod 755 ./rebar3 - - name: Update Path - run: echo "./" >> $GITHUB_PATH + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp-version }} + rebar3-version: '3.15' - name: Check rebar3 Version - run: DEBUG=1 ./rebar3 --version + run: DEBUG=1 rebar3 --version - name: Compile - run: ./rebar3 compile + run: rebar3 compile # - name: Xref Checks -# run: ./rebar3 xref +# run: rebar3 xref # - name: Dialyzer -# run: ./rebar3 dialyzer +# run: rebar3 dialyzer - name: Run Unit Tests - run: ./rebar3 as test eunit + run: rebar3 as test eunit - name: Run Proper Tests - run: ./rebar3 as test do proper -c + run: rebar3 as test do proper -c - name: Check Coverage - run: ./rebar3 as test cover -v --min_coverage=0 + run: rebar3 as test cover -v --min_coverage=0 - name: Get Supported 'new' Templates run: cd priv/testing && rebar3 new - name: Create LFE Library Project @@ -148,5 +138,3 @@ jobs: run: cd priv/testing/example-lib && rebar3 lfe clean - name: Clean-build Command run: cd priv/testing/example-app && rebar3 lfe clean-build - -