-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (73 loc) · 2.25 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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Robin Jarry
---
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-24.04
env:
SANITIZE: none
BUILDTYPE: debugoptimized
MESON_EXTRA_OPTS: -Dc_args=-DTRACE_PACKETS
steps:
- name: install system dependencies
run: |
set -xe
sudo apt-get update -qy
sudo NEEDRESTART_MODE=l apt-get install -qy \
make gcc ccache ninja-build meson git scdoc \
libasan8 libcmocka-dev libedit-dev \
libevent-dev libsmartcols-dev libnuma-dev python3-pyelftools
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache
- run: make
- uses: actions/upload-artifact@v4
with:
path: |
build/br
build/br-cli
build/subprojects/ecoli/src/libecoli.so
retention-days: 5
- run: make unit-tests
smoke:
runs-on: ubuntu-24.04
needs: build
steps:
- name: install system dependencies
run: |
set -xe
sudo apt-get update -qy
sudo NEEDRESTART_MODE=l apt-get install -qy \
git socat tcpdump gdb binutils \
iproute2 iputils-ping libasan8 libedit2 \
libevent-2.1-7t64 libsmartcols1 libnuma1
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: build
merge-multiple: true
- run: chmod -c a+x build/br* build/subprojects/ecoli/src/libecoli.so
- run: sudo smoke/run.sh --coredump build
lint:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- run: dnf install -y make clang-tools-extra git
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: make lint
# TODO: later, check commit messages here
- run: |
git config --global --add safe.directory $PWD
git log --oneline --decorate "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"
if: ${{ github.event.pull_request.base.sha && github.event.pull_request.head.sha }}