File tree 6 files changed +118
-1
lines changed
6 files changed +118
-1
lines changed Original file line number Diff line number Diff line change 82
82
with :
83
83
entrypoint : make
84
84
args : llvm-image PUSH=${{ steps.vars.outputs.push }}
85
+ - uses : docker://quay.io/cilium/image-maker:e55375ca5ccaea76dc15a0666d4f57ccd9ab89de
86
+ name : Run make clang-format-image
87
+ env :
88
+ DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD_CI }}
89
+ DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME_CI }}
90
+ QUAY_PASSWORD : ${{ secrets.QUAY_PASSWORD_IMAGE_TOOLS }}
91
+ QUAY_USERNAME : ${{ secrets.QUAY_USERNAME_IMAGE_TOOLS }}
92
+ with :
93
+ entrypoint : make
94
+ args : clang-format-image PUSH=${{ steps.vars.outputs.push }}
85
95
- uses : docker://quay.io/cilium/image-maker:e55375ca5ccaea76dc15a0666d4f57ccd9ab89de
86
96
name : Run make startup-script-image
87
97
env :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ PUSH ?= false
7
7
EXPORT ?= false
8
8
PLATFORMS ?= linux/amd64,linux/arm64
9
9
10
- all-images : lint maker-image tester-image compilers-image bpftool-image llvm-image network-perf-image ca-certificates-image startup-script-image checkpatch-image iptables-image
10
+ all-images : lint maker-image tester-image compilers-image bpftool-image llvm-image clang-format-image network-perf-image ca-certificates-image startup-script-image checkpatch-image iptables-image
11
11
12
12
13
13
lint :
@@ -31,6 +31,9 @@ bpftool-image: .buildx_builder
31
31
llvm-image : .buildx_builder
32
32
PUSH=$(PUSH ) EXPORT=$(EXPORT ) TEST=true scripts/build-image.sh cilium-llvm images/llvm $(PLATFORMS ) " $$ (cat .buildx_builder)" $(REGISTRIES )
33
33
34
+ clang-format-image : .buildx_builder
35
+ PUSH=$(PUSH ) EXPORT=$(EXPORT ) scripts/build-image.sh cilium-clang-format images/clang-format $(PLATFORMS ) " $$ (cat .buildx_builder)" $(REGISTRIES )
36
+
34
37
ca-certificates-image : .buildx_builder
35
38
PUSH=$(PUSH ) EXPORT=$(EXPORT ) scripts/build-image.sh ca-certificates images/ca-certificates $(PLATFORMS ) " $$ (cat .buildx_builder)" $(REGISTRIES )
36
39
Original file line number Diff line number Diff line change
1
+ # Copyright 2024 Authors of Cilium
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ ARG COMPILERS_IMAGE=quay.io/cilium/image-compilers:5569a29cea6b3ad50aeb03102aaf3dc03841197c@sha256:b15dbedb7c49816c74a765e2f6ecdb9359763b8e4e4328d794f48b9cefae9804
5
+
6
+ FROM --platform=linux/amd64 ${COMPILERS_IMAGE} as builder
7
+
8
+ COPY checkout-llvm.sh /tmp/checkout-llvm.sh
9
+ RUN /tmp/checkout-llvm.sh
10
+
11
+ COPY build-llvm-native.sh /tmp/build-llvm-native.sh
12
+ RUN /tmp/build-llvm-native.sh
13
+
14
+ COPY build-llvm-cross-aarch64.sh /tmp/build-llvm-cross-aarch64.sh
15
+ RUN /tmp/build-llvm-cross-aarch64.sh
16
+
17
+ FROM scratch
18
+ LABEL maintainer=
"[email protected] "
19
+
20
+ ARG TARGETPLATFORM
21
+ COPY --from=builder /out/${TARGETPLATFORM}/bin /
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2017-2024 Authors of Cilium
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ set -o xtrace
7
+ set -o errexit
8
+ set -o pipefail
9
+ set -o nounset
10
+
11
+ triplet=" aarch64-linux-gnu"
12
+
13
+ mkdir -p /src/llvm/llvm/build-cross-aarch64
14
+
15
+ cd /src/llvm/llvm/build-cross-aarch64
16
+
17
+ CC=" ${triplet} -gcc" CXX=" ${triplet} -g++" \
18
+ cmake .. -G " Ninja" \
19
+ -DLLVM_TARGETS_TO_BUILD=" BPF" \
20
+ -DLLVM_ENABLE_PROJECTS=" clang" \
21
+ -DBUILD_SHARED_LIBS=" OFF" \
22
+ -DLLVM_BUILD_STATIC=" ON" \
23
+ -DCMAKE_CXX_FLAGS=" -s -flto" \
24
+ -DCMAKE_BUILD_TYPE=" Release" \
25
+ -DLLVM_BUILD_RUNTIME=" OFF" \
26
+ -DLLVM_TABLEGEN=" /src/llvm/llvm/build-native/bin/llvm-tblgen" \
27
+ -DCLANG_TABLEGEN=" /src/llvm/llvm/build-native/bin/clang-tblgen" \
28
+ -DCMAKE_CROSSCOMPILING=" True" \
29
+ -DCMAKE_INSTALL_PREFIX=" /usr/local"
30
+
31
+ ninja clang-format
32
+
33
+ ${triplet} -strip bin/clang-format
34
+
35
+ mkdir -p /out/linux/arm64/bin
36
+ cp bin/clang-format /out/linux/arm64/bin
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2017-2024 Authors of Cilium
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ set -o xtrace
7
+ set -o errexit
8
+ set -o pipefail
9
+ set -o nounset
10
+
11
+ mkdir -p /src/llvm/llvm/build-native
12
+
13
+ cd /src/llvm/llvm/build-native
14
+
15
+ cmake .. -G " Ninja" \
16
+ -DLLVM_TARGETS_TO_BUILD=" BPF" \
17
+ -DLLVM_ENABLE_PROJECTS=" clang" \
18
+ -DBUILD_SHARED_LIBS=" OFF" \
19
+ -DLLVM_BUILD_STATIC=" ON" \
20
+ -DCMAKE_CXX_FLAGS=" -s -flto" \
21
+ -DCMAKE_BUILD_TYPE=" Release" \
22
+ -DLLVM_BUILD_RUNTIME=" OFF" \
23
+ -DCMAKE_INSTALL_PREFIX=" /usr/local"
24
+
25
+ # llvm-tblgen and clang-tblgen are needed to build the aarch64 version of clang-format
26
+ ninja clang-format llvm-tblgen clang-tblgen
27
+
28
+ strip bin/clang-format
29
+
30
+ mkdir -p /out/linux/amd64/bin
31
+ cp bin/clang-format /out/linux/amd64/bin
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright 2017-2024 Authors of Cilium
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ set -o xtrace
7
+ set -o errexit
8
+ set -o pipefail
9
+ set -o nounset
10
+
11
+ rev=" llvmorg-17.0.6"
12
+
13
+ git config --global user.email
" [email protected] "
14
+ git config --global user.name " Cilium Maintainers"
15
+
16
+ git clone --branch " ${rev} " https://github.com/llvm/llvm-project.git /src/llvm
You can’t perform that action at this time.
0 commit comments