forked from clicon/clixon
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (79 loc) · 2.75 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
name: Clixon CI
on:
push:
branches:
- master
- test-actions
pull_request:
branches: [ master ]
jobs:
ubuntu-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# 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 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@v3
# 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:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docker/test
steps:
- uses: actions/checkout@v3
# 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
run: sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true ./sum.sh'