-
Notifications
You must be signed in to change notification settings - Fork 73
177 lines (171 loc) · 6.55 KB
/
ci.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Clixon CI
on:
push:
branches:
- master
- test-actions
pull_request:
branches: [ master ]
jobs:
ubuntu-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# 1) checkout and compile natively (no test)
- name: install cligen
run: (git clone https://github.com/clicon/cligen.git && cd cligen && ./configure && make && sudo make install)
- name: run apt update
run: sudo apt update
- name: install dependencies
run: sudo apt install -y libssl-dev libnghttp2-dev
- name: configure
run: ./configure
- name: make
run: make -j10
- name: make install
run: sudo make install install-include
- name: make example
run: (cd example; make)
- name: install example
run: (cd example; sudo make install)
ubuntu-build-restconf-fcgi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# 1) checkout and compile natively (no test)
- name: install cligen
run: (git clone https://github.com/clicon/cligen.git && cd cligen && ./configure && make && sudo make install)
- name: install dependencies
run: sudo apt install -y nginx
- name: install fcgi
run: (git clone https://github.com/FastCGI-Archives/fcgi2 && cd fcgi2 && ./autogen.sh && rm -rf .git && ./configure --prefix=/usr; make; sudo make install)
- name: configure
run: ./configure --with-restconf=fcgi
- name: make
run: make -j10
- name: make install
run: sudo make install install-include
- name: make example
run: (cd example; make)
- name: install example
run: (cd example; sudo make install)
docker-alpine-test-1:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docker/test
steps:
- uses: actions/checkout@v4
# 2) Inline of make test, but without configure
- name: in-line clone
run: git clone file://$(realpath ../..)
- name: openconfig
run: mkdir -p openconfig; cd openconfig ; git clone https://github.com/openconfig/public
- name: yangmodels1
run: mkdir -p yang/standard
- name: yangmodels2
run: (cd yang; git init;)
- name: yangmodels3
run: (cd yang; git remote add -f origin https://github.com/YangModels/yang)
- name: yangmodels4
run: (cd yang; git config core.sparseCheckout true)
- name: yangmodels5
run: (echo "standard/" >> yang/.git/info/sparse-checkout; echo "experimental/" >> yang/.git/info/sparse-checkout)
- name: yangmodels6
run: (cd yang; git pull origin main)
- name: make docker
run: sudo docker build -f Dockerfile.native -t clixon/clixon-test .
- name: start container
run: ./start.sh
- name: run test a-m,p
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true pattern="test_a*.sh test_c*.sh test_d*.sh test_f*.sh test_h*.sh test_i*.sh test_j*.sh test_l*.sh test_m*.sh test_o*.sh test_x*.sh test_y*.sh" ./sum.sh'
docker-alpine-test-2:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docker/test
steps:
- uses: actions/checkout@v4
# 2) Inline of make test, but without configure
- name: in-line clone
run: git clone file://$(realpath ../..)
- name: openconfig
run: mkdir -p openconfig; cd openconfig ; git clone https://github.com/openconfig/public
- name: yangmodels1
run: mkdir -p yang/standard
- name: yangmodels2
run: (cd yang; git init;)
- name: yangmodels3
run: (cd yang; git remote add -f origin https://github.com/YangModels/yang)
- name: yangmodels4
run: (cd yang; git config core.sparseCheckout true)
- name: yangmodels5
run: (echo "standard/" >> yang/.git/info/sparse-checkout; echo "experimental/" >> yang/.git/info/sparse-checkout)
- name: yangmodels6
run: (cd yang; git pull origin main)
- name: make docker
run: sudo docker build -f Dockerfile.native -t clixon/clixon-test .
- name: start container
run: ./start.sh
- name: run test n-o
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true pattern="test_n*.sh test_p*.sh" ./sum.sh'
docker-alpine-test-3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docker/test
steps:
- uses: actions/checkout@v4
# 2) Inline of make test, but without configure
- name: in-line clone
run: git clone file://$(realpath ../..)
- name: openconfig
run: mkdir -p openconfig; cd openconfig ; git clone https://github.com/openconfig/public
- name: yangmodels1
run: mkdir -p yang/standard
- name: yangmodels2
run: (cd yang; git init;)
- name: yangmodels3
run: (cd yang; git remote add -f origin https://github.com/YangModels/yang)
- name: yangmodels4
run: (cd yang; git config core.sparseCheckout true)
- name: yangmodels5
run: (echo "standard/" >> yang/.git/info/sparse-checkout; echo "experimental/" >> yang/.git/info/sparse-checkout)
- name: yangmodels6
run: (cd yang; git pull origin main)
- name: make docker
run: sudo docker build -f Dockerfile.native -t clixon/clixon-test .
- name: start container
run: ./start.sh
- name: run test r-y
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true pattern="test_r*.sh test_s*.sh test_t*.sh test_u*.sh test_w*.sh" ./sum.sh'
docker-alpine-test-fcgi-r:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docker/test
steps:
- uses: actions/checkout@v4
# 2) Inline of make test, but without configure
- name: in-line clone
run: git clone file://$(realpath ../..)
- name: openconfig
run: mkdir -p openconfig; cd openconfig ; git clone https://github.com/openconfig/public
- name: yangmodels1
run: mkdir -p yang/standard
- name: yangmodels2
run: (cd yang; git init;)
- name: yangmodels3
run: (cd yang; git remote add -f origin https://github.com/YangModels/yang)
- name: yangmodels4
run: (cd yang; git config core.sparseCheckout true)
- name: yangmodels5
run: (echo "standard/" >> yang/.git/info/sparse-checkout; echo "experimental/" >> yang/.git/info/sparse-checkout)
- name: yangmodels6
run: (cd yang; git pull origin main)
- name: make docker fcgi
run: sudo docker build -f Dockerfile.fcgi -t clixon/clixon-test .
- name: start container
run: ./start.sh
- name: run test r-y
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true pattern="test_r*.sh" ./sum.sh'