Skip to content

Commit

Permalink
ci/buildroot: allow arch-specific deps, make lld arch-specific
Browse files Browse the repository at this point in the history
`lld` doesn't exist on s390x. Set things up similarly to how we have it
in cosa with our deps by having separate arch-specific dep files.
  • Loading branch information
jlebon committed Oct 10, 2023
1 parent dd9c4f0 commit bb43e8a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ci/buildroot/buildroot-reqs-aarch64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lld
1 change: 1 addition & 0 deletions ci/buildroot/buildroot-reqs-ppc64le.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lld
1 change: 1 addition & 0 deletions ci/buildroot/buildroot-reqs-x86_64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lld
2 changes: 1 addition & 1 deletion ci/buildroot/buildroot-reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ attr
gjs

# Also, add clang since it's useful at least in CI for C/C++ projects
clang lld
clang
# And the tools such as clang-format, used for style checking
clang-tools-extra
# All C/C++ projects should have CI that uses the sanitizers
Expand Down
6 changes: 6 additions & 0 deletions ci/buildroot/install-buildroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ set -euo pipefail
dn=$(dirname "$0")
tmpd=$(mktemp -d) && trap 'rm -rf ${tmpd}' EXIT

arch=$(arch)

echo "Installing base build requirements"
dnf -y install /usr/bin/xargs 'dnf-command(builddep)'
deps=$(grep -v '^#' "${dn}"/buildroot-reqs.txt)
if [ -f "${dn}/buildroot-reqs-${arch}.txt" ]; then
deps+=" "
deps+=$(grep -v '^#' "${dn}/buildroot-reqs-${arch}.txt")
fi
echo "${deps}" | xargs dnf -y install

echo "Installing build dependencies of primary packages"
Expand Down

0 comments on commit bb43e8a

Please sign in to comment.