-
Notifications
You must be signed in to change notification settings - Fork 15
140 lines (132 loc) · 5.32 KB
/
cicd.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: ci/cd
on:
push:
branches: [ main, 'release/**', 'task/**', 'feature/**', 'epic/**']
tags: ['**']
pull_request:
branches: [ main, 'release/**', 'task/**', 'feature/**', 'epic/**']
jobs:
builds:
name: Erlang ${{ matrix.otp-version }} build
runs-on: ubuntu-latest
strategy:
matrix:
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
run: rebar3 compile
# - name: Xref Checks
# run: rebar3 xref
# - name: Dialyzer
# run: rebar3 dialyzer
- name: Run Unit Tests
run: rebar3 as test eunit
- name: Run Proper Tests
run: rebar3 as test do proper -c
- name: Check Coverage
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
run: cd priv/testing && rebar3 new lfe-lib example-lib
- name: Compile LFE Library Project
run: cd priv/testing/example-lib && DEBUG=1 rebar3 lfe compile
- name: Create LFE Main Project
run: cd priv/testing && rebar3 new lfe-main example-main
- name: Run LFE Main Project's Script
run: cd priv/testing/example-main && rebar3 lfe run -- 42
- name: Create LFE/OTP Application Project
run: cd priv/testing && rebar3 new lfe-app example-app
- name: Compile LFE Application Project
run: cd priv/testing/example-app && DEBUG=1 rebar3 lfe compile
- name: Create LFE escript Project
run: cd priv/testing && rebar3 new lfe-escript example-escript
- name: Escriptize LFE escript Project
run: cd priv/testing/example-escript && rebar3 lfe escriptize
- name: Run LFE escript Project
run: cd priv/testing/example-escript && rebar3 lfe run-escript 1 2 5
- name: Create LFE/OTP Release Project
run: cd priv/testing && rebar3 new lfe-release example-release
- name: Build LFE/OTP Release
run: cd priv/testing/example-release && rebar3 release
# XXX Startup keeps hanging in Github Actions ... probably need to do somehting
# different.
# - name: Start LFE/OTP Release
# run: cd priv/testing/example-release && rebar3 lfe run-release start && sleep 5
# - name: Ping LFE/OTP Release
# run: cd priv/testing/example-release && rebar3 lfe run-release ping
- name: Versions Command Output
run: cd priv/testing/example-release && rebar3 lfe versions
- name: Clean Command
run: cd priv/testing/example-lib && rebar3 lfe clean
- name: Clean-build Command
run: cd priv/testing/example-app && rebar3 lfe clean-build
older-builds:
name: Erlang ${{ matrix.otp-version }} build (old)
runs-on: ubuntu-20.04
strategy:
matrix:
otp-version: ['23', '22', '21']
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp-version }}
rebar3-version: '3.15'
- name: Check rebar3 Version
run: DEBUG=1 rebar3 --version
- name: Compile
run: rebar3 compile
# - name: Xref Checks
# run: rebar3 xref
# - name: Dialyzer
# run: rebar3 dialyzer
- name: Run Unit Tests
run: rebar3 as test eunit
- name: Run Proper Tests
run: rebar3 as test do proper -c
- name: Check Coverage
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
run: cd priv/testing && rebar3 new lfe-lib example-lib
- name: Compile LFE Library Project
run: cd priv/testing/example-lib && DEBUG=1 rebar3 lfe compile
- name: Create LFE Main Project
run: cd priv/testing && rebar3 new lfe-main example-main
- name: Run LFE Main Project's Script
run: cd priv/testing/example-main && rebar3 lfe run -- 42
- name: Create LFE/OTP Application Project
run: cd priv/testing && rebar3 new lfe-app example-app
- name: Compile LFE Application Project
run: cd priv/testing/example-app && DEBUG=1 rebar3 lfe compile
- name: Create LFE escript Project
run: cd priv/testing && rebar3 new lfe-escript example-escript
- name: Escriptize LFE escript Project
run: cd priv/testing/example-escript && rebar3 lfe escriptize
- name: Run LFE escript Project
run: cd priv/testing/example-escript && rebar3 lfe run-escript 1 2 5
- name: Create LFE/OTP Release Project
run: cd priv/testing && rebar3 new lfe-release example-release
- name: Build LFE/OTP Release
run: cd priv/testing/example-release && rebar3 release
# XXX Startup keeps hanging in Github Actions ... probably need to do somehting
# different.
# - name: Start LFE/OTP Release
# run: cd priv/testing/example-release && rebar3 lfe run-release start && sleep 5
# - name: Ping LFE/OTP Release
# run: cd priv/testing/example-release && rebar3 lfe run-release ping
- name: Versions Command Output
run: cd priv/testing/example-release && rebar3 lfe versions
- name: Clean Command
run: cd priv/testing/example-lib && rebar3 lfe clean
- name: Clean-build Command
run: cd priv/testing/example-app && rebar3 lfe clean-build