Skip to content

Commit f544497

Browse files
committed
FRRouting + libyang build
It can build using a set of well known verions of libyang, for some well known tags. The purpose is to ensure that libyang and FRRouting keeps working together smoothly. Currently, it is just about a compilation and link test. In order to work with pre-set tags/versions, the fork should include the git tags. If they are missing, you can catch up those tags using: $ git remote -v origin [email protected]:vjardin/libyang.git (fetch) origin [email protected]:vjardin/libyang.git (push) upstream [email protected]:CESNET/libyang.git (fetch) upstream [email protected]:CESNET/libyang.git (push) $ git fetch --tags upstream $ git tag -l $ git push --tags origin
1 parent fc4dbd9 commit f544497

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

.github/workflows/frr-checks.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: libyang+FRR HEAD CI
2+
run-name: libyang CI FRR ${{ github.actor }} ⚗️
3+
on:
4+
schedule:
5+
# every night at 1.10
6+
- cron: '10 1 * * *'
7+
# the following in pending for fixes per the comments of pr !2203
8+
# push:
9+
# branches:
10+
# - '**'
11+
# pull_request:
12+
# branches:
13+
# - '**'
14+
jobs:
15+
build-frr:
16+
name: Build FRR
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
compiler: [ gcc ]
21+
frr-versions:
22+
- master
23+
libyang-versions:
24+
- v2.1.128
25+
steps:
26+
- name: add missing packages per building-frr-for-ubuntu2204
27+
uses: ConorMacBride/install-package@v1
28+
with:
29+
apt:
30+
git
31+
autoconf
32+
libtool
33+
make
34+
libreadline-dev
35+
texinfo
36+
pkg-config
37+
libelf-dev
38+
libpam0g-dev
39+
libjson-c-dev
40+
bison
41+
flex
42+
libc-ares-dev
43+
python3-dev
44+
python3-sphinx
45+
install-info
46+
build-essential
47+
libsnmp-dev
48+
perl
49+
libcap-dev
50+
libelf-dev
51+
libunwind-dev
52+
protobuf-c-compiler
53+
libprotobuf-c-dev
54+
libgrpc++-dev
55+
protobuf-compiler-grpc
56+
libsqlite3-dev
57+
libzmq5
58+
libzmq3-dev
59+
- name: libyang ${{ matrix.libyang-versions }} ${{ matrix.compiler }}
60+
uses: actions/checkout@v4
61+
with:
62+
ref: ${{ matrix.libyang-versions }}
63+
submodules: false
64+
fetch-depth: 0
65+
filter: tree:0
66+
fetch-tags: true
67+
- name: make libyang from upstream
68+
run: >-
69+
git branch &&
70+
mkdir build &&
71+
cd build &&
72+
export CC=${{ matrix.compiler }} &&
73+
cmake -DCMAKE_BUILD_TYPE:String="Release" .. &&
74+
make -j $(nproc) &&
75+
sudo make install
76+
- name: Add FRR user and groups
77+
run: >-
78+
sudo groupadd -r -g 92 frr &&
79+
sudo groupadd -r -g 85 frrvty &&
80+
sudo adduser --system --ingroup frr --home /var/run/frr/ --gecos "FRR suite" --shell /sbin/nologin frr &&
81+
sudo usermod -a -G frrvty frr
82+
- name: FRR github checkout
83+
uses: actions/checkout@v4
84+
with:
85+
repository: 'FRRouting/frr.git'
86+
ref: ${{ matrix.frr-versions }}
87+
submodules: false
88+
fetch-depth: 0
89+
filter: tree:0
90+
fetch-tags: true
91+
- name: compile FRR with ${{ matrix.libyang-versions }} ${{ matrix.compiler }}
92+
if: ${{ always() }}
93+
run: >-
94+
ls -la &&
95+
export CC=${{ matrix.compiler }} &&
96+
./bootstrap.sh &&
97+
./configure \
98+
--prefix=/usr \
99+
--includedir=\${prefix}/include \
100+
--bindir=\${prefix}/bin \
101+
--sbindir=\${prefix}/lib/frr \
102+
--libdir=\${prefix}/lib/frr \
103+
--libexecdir=\${prefix}/lib/frr \
104+
--sysconfdir=/etc \
105+
--localstatedir=/var \
106+
--with-moduledir=\${prefix}/lib/frr/modules \
107+
--enable-configfile-mask=0640 \
108+
--enable-logfile-mask=0640 \
109+
--enable-snmp=agentx \
110+
--enable-multipath=64 \
111+
--enable-user=frr \
112+
--enable-group=frr \
113+
--enable-vty-group=frrvty \
114+
--with-pkg-git-version \
115+
--with-pkg-extra-version=-MyOwnFRRVersion &&
116+
make -j $(nproc) &&
117+
sudo make install

0 commit comments

Comments
 (0)