-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (71 loc) · 2.36 KB
/
erlang.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
name: Erlang CI
"on":
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch: {}
jobs:
vsns:
runs-on: ubuntu-22.04
outputs:
# renovate datasource: github-runners, depName: ubuntu
ubuntu: 22.04
# renovate datasource: github-runners, depName: windows
windows: 2022
# renovate datasource: github-runners, depName: macos
macos: 14
steps:
- run: echo "versions set!"
ci:
name: Erlang CI
needs: [vsns]
strategy:
fail-fast: false
matrix:
include:
- os-base: ubuntu
os-vsn: ${{ needs.vsns.outputs.ubuntu }}
- os-base: windows
os-vsn: ${{ needs.vsns.outputs.windows }}
- os-base: macos # macos, for now, is considered best-effort
os-vsn: ${{ needs.vsns.outputs.macos }}
runs-on: ${{matrix.os-base}}-${{matrix.os-vsn}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: erlef/setup-beam@a6e26b22319003294c58386b6f25edbc7336819a # v1.18.0
id: setup-beam
with:
version-type: strict
version-file: .tool-versions
if: ${{matrix.os-base != 'macos'}}
- uses: asdf-vm/actions/[email protected]
if: ${{matrix.os-base == 'macos'}}
- name: Restore _build
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: _build
key: "_build-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}"
if: ${{matrix.os-base != 'macos'}}
- name: Restore rebar3's cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/rebar3
key: "rebar3-cache-for\
-os-${{runner.os}}\
-otp-${{steps.setup-beam.outputs.otp-version}}\
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}"
if: ${{matrix.os-base != 'macos'}}
- name: Check file format
run: rebar3 fmt --check
if: ${{matrix.os-base != 'windows'}}
- name: Continuous Integration
run: rebar3 as test ci