diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/matchers/erlang-matchers.json | 63 | ||||
-rw-r--r-- | .github/workflows/ci.yaml | 85 |
2 files changed, 103 insertions, 45 deletions
diff --git a/.github/matchers/erlang-matchers.json b/.github/matchers/erlang-matchers.json new file mode 100644 index 0000000..798e5df --- /dev/null +++ b/.github/matchers/erlang-matchers.json @@ -0,0 +1,63 @@ +{ + "problemMatcher": [ + { + "owner": "erlc-warning-matcher", + "pattern": [ + { + "regexp": "^(\\S+):(\\d+):(\\d+): ([wW]arning): (.+)$$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + ] + }, + { + "owner": "erlc-error-matcher", + "pattern": [ + { + "regexp": "^(\\S+):(\\d+):(\\d+): (.+)$$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + }, + { + "owner": "ct-problem-matcher", + "pattern": [ + { + "regexp": "^(\\S+) failed on line (\\d+)$$", + "file": 1, + "line": 2 + }, + { + "regexp": "^Reason: (.+)$$", + "message": 1 + } + ] + }, + { + "owner": "eunit-problem-matcher", + "pattern": [ + { + "regexp": "^\\S+: .+...\\*failed\\*$$" + }, + { + "regexp": "^in function .+ \\((.+), line (\\d+)\\)$$", + "file": 1, + "line": 2 + }, + { + "regexp": "^in call from .+$$" + }, + { + "regexp": "^\\*\\*error:(.+)$$", + "message": 1 + } + ] + } + ] +} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bc29b09..c53b2b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,8 +11,8 @@ env: jobs: - prepare-unix: - name: Prepare Unix + prepare: + name: Prepare runs-on: ubuntu-latest outputs: erlang: ${{ steps.versions.outputs.erlang }} @@ -47,8 +47,8 @@ jobs: } >> "$GITHUB_OUTPUT" dialyze: - name: Dialyzer (${{ needs.prepare-unix.outputs.latest }}) - needs: prepare-unix + name: Dialyzer (${{ needs.prepare.outputs.latest }}) + needs: prepare runs-on: ubuntu-latest steps: @@ -58,19 +58,28 @@ jobs: - name: Install Erlang/OTP uses: erlef/setup-beam@v1 with: - otp-version: '${{ needs.prepare-unix.outputs.latest }}' + otp-version: '${{ needs.prepare.outputs.latest }}' version-type: strict + - name: Checkout ci.erlang.mk repository + uses: actions/checkout@v4 + with: + repository: ninenines/ci.erlang.mk + path: deps/ci.erlang.mk + + - name: Install Erlang problem matchers + run: echo "::add-matcher::deps/ci.erlang.mk/.github/matchers/erlang-matchers.json" + - name: Run Dialyzer run: make dialyze test-unix: name: Tests - needs: prepare-unix + needs: prepare strategy: fail-fast: false matrix: - erlang: ${{ fromJson(needs.prepare-unix.outputs.erlang) }} + erlang: ${{ fromJson(needs.prepare.outputs.erlang) }} os: [ubuntu-latest, macos-14] exclude: # MacOS support in setup-beam starts at OTP-25. @@ -88,6 +97,15 @@ jobs: otp-version: '${{ matrix.erlang }}' version-type: strict + - name: Checkout ci.erlang.mk repository + uses: actions/checkout@v4 + with: + repository: ninenines/ci.erlang.mk + path: deps/ci.erlang.mk + + - name: Install Erlang problem matchers + run: echo "::add-matcher::deps/ci.erlang.mk/.github/matchers/erlang-matchers.json" + - name: Run tests (macOS) if: runner.os == 'macOS' run: > @@ -107,50 +125,18 @@ jobs: logs/ # !logs/**/log_private - prepare-windows: - name: Prepare Windows - runs-on: windows-latest - outputs: - erlang: ${{ steps.versions.outputs.erlang }} - steps: - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Checkout ci.erlang.mk repository - uses: actions/checkout@v4 - with: - repository: ninenines/ci.erlang.mk - path: deps/ci.erlang.mk - - - name: Setup MSYS2 - uses: msys2/setup-msys2@v2 - with: - msystem: mingw64 - update: true - install: >- - git - make - mingw-w64-x86_64-jq - - - name: Output Erlang/OTP versions - id: versions - shell: msys2 {0} - run: | - { - echo "erlang<<EOF" - make ci-windows-list | jq -Rn '[inputs]' - echo EOF - } >> "$GITHUB_OUTPUT" - test-windows: name: Tests - needs: prepare-windows + needs: prepare strategy: fail-fast: false matrix: - erlang: ${{ fromJson(needs.prepare-windows.outputs.erlang) }} + erlang: ${{ fromJson(needs.prepare.outputs.erlang) }} os: [windows-latest] + exclude: + # Windows doesn't have master builds. + - erlang: master + os: windows-latest runs-on: ${{ matrix.os }} env: COWBOY_QUICER: 0 @@ -166,6 +152,15 @@ jobs: otp-version: '${{ matrix.erlang }}' version-type: loose + - name: Checkout ci.erlang.mk repository + uses: actions/checkout@v4 + with: + repository: ninenines/ci.erlang.mk + path: deps/ci.erlang.mk + + - name: Install Erlang problem matchers + run: echo "::add-matcher::deps/ci.erlang.mk/.github/matchers/erlang-matchers.json" + - name: Setup MSYS2 uses: msys2/setup-msys2@v2 with: |