-
Notifications
You must be signed in to change notification settings - Fork 72
146 lines (141 loc) · 5.38 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
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-tests-a-m:
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
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" ./sum.sh'
docker-alpine-tests-n-p:
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-p
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true pattern="test_n*.sh test_o*.sh test_p*.sh" ./sum.sh'
docker-alpine-tests-r-z:
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 test_x*.sh test_y*.sh" ./sum.sh'