generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 46
63 lines (61 loc) · 1.8 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [assigned, opened, synchronize, reopened]
jobs:
build-library-and-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev libwebsockets-dev uncrustify valgrind
- name: Prepare libyaml
run: |
git clone https://github.com/yaml/libyaml --depth 1 --branch release/0.2.5
cd libyaml
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON
make -j $(cat /proc/cpuinfo | grep processor | wc -l)
sudo make install
- name: Build client library
run: |
cd kubernetes
mkdir build
cd build
cmake ..
make -j $(cat /proc/cpuinfo | grep processor | wc -l)
- name: Build authentication plugin - oidc
run: |
cd kubernetes/config/authn_plugin/plugins/oidc
mkdir build
cd build
cmake ..
make
- name: Build Debian package
run: |
cd kubernetes/build
cpack -G DEB
- name: Build examples
run: |
cd examples/
make
- name: Create k8s kind cluster
uses: helm/kind-action@v1.10.0
- name: Test examples
run: |
kubectl cluster-info --context kind-chart-testing
kubectl describe node
cd examples/
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/kubernetes/build/:/usr/local/lib make test
- name: Valgrind memory check for examples
run: |
kubectl cluster-info --context kind-chart-testing
kubectl describe node
cd examples/
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/kubernetes/build/:/usr/local/lib make memcheck