-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (61 loc) · 2 KB
/
cicd.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
name: C/C++ CI
on:
push:
paths:
- '**.c'
- '**.cpp'
- 'Makefile'
schedule:
- cron: "0 2 * * 0" # Run at 2am UTC on Sun
jobs:
build_and_test:
name: "Compile artifacts"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y gcc make git check libsubunit-dev libjson-c-dev libnuma-dev libcap-dev libgsl-dev libgsl-dbg
- name: "Build Orchestrator"
run: make orchestrator
env:
DEBUG: ${{ !endsWith(github.ref, '/master') }}
- name: "Build Use cases"
run: make usecases
env:
DEBUG: ${{ !endsWith(github.ref, '/master') }}
- name: Build test code - libcheck
run: make test
- name: Move binaries to new folder
run: |
mkdir bin \
&& mv orchestrator check_test DataGenerator WorkerApp bin/
- name: Upload result for job
uses: actions/[email protected]
with:
name: binaries
path: bin/
test_containers:
name: "Test against distros"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Build ubuntu container and run tests"
run: |
docker build -t ubuntubuild -f tools/Dockerfile-Build-ubuntu . \
&& docker run --rm -v "$PWD":/home ubuntubuild
- name: "Build debian container and run tests"
run: |
docker build -t debianbuild -f tools/Dockerfile-Build-debian . \
&& docker run --rm -v "$PWD":/home debianbuild
- name: "Build fedora container and run tests"
run: |
docker build -t fedorabuild -f tools/Dockerfile-Build-fedora . \
&& docker run --rm -v "$PWD":/home fedorabuild
- name: "Build alpine container and run tests"
run: |
docker build -t alpinebuild -f tools/Dockerfile-Build-alpine . \
&& docker run --rm -v "$PWD":/home alpinebuild