Skip to content

Commit 859c233

Browse files
committed
ci: add more clang versions to test build on
Add 11, 12, and 13 versions, to make sure examples works on all of them. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
1 parent 00b03fb commit 859c233

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/docker/Dockerfile.ubuntu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ARG LLVM_VERSION="14"
55
ENV LLVM_VERSION=$LLVM_VERSION
66

77
ARG SHORTNAME="jammy"
8+
ENV SHORTNAME=$SHORTNAME
89

910
RUN apt-get update && apt-get install -y curl gnupg
1011
RUN if [ "${LLVM_VERSION}" = "17" ]; \

.github/workflows/build.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,31 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
llvm: [14, 15, 16, 17]
15+
llvm: [11, 12, 13, 14, 15, 16, 17]
1616
steps:
1717
- uses: actions/checkout@v2
1818
with:
1919
submodules: recursive
20-
- name: Build container
20+
- name: Build container (20.04)
21+
if: ${{ matrix.llvm < 14 }}
2122
uses: docker/build-push-action@v3
2223
with:
2324
push: false
24-
build-args: LLVM_VERSION=${{ matrix.llvm }}
25+
build-args: |
26+
LLVM_VERSION=${{ matrix.llvm }}
27+
VERSION=20.04
28+
SHORTNAME=focal
29+
file: ./.github/docker/Dockerfile.ubuntu
30+
tags: build_container
31+
- name: Build container (22.04)
32+
if: ${{ matrix.llvm >= 14 }}
33+
uses: docker/build-push-action@v3
34+
with:
35+
push: false
36+
build-args: |
37+
LLVM_VERSION=${{ matrix.llvm }}
38+
VERSION=22.04
39+
SHORTNAME=jammy
2540
file: ./.github/docker/Dockerfile.ubuntu
2641
tags: build_container
2742
- name: Build examples/c
@@ -30,7 +45,7 @@ jobs:
3045
-v $(pwd):/libbpf-bootstrap \
3146
build_container \
3247
/bin/bash -c \
33-
'cd /libbpf-bootstrap/examples/c && make'
48+
'cd /libbpf-bootstrap/examples/c && make -j`nproc`'
3449
- name: Build examples/rust
3550
run: |
3651
docker run \

0 commit comments

Comments
 (0)