forked from coreos/rpm-ostree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Delete dockerfile, move to common scripts, consolidate gcc/clang
The Dockerfile is problematic since we can't update it atomically. I also really dislike reliance on the Hub. Further, I think rather than caching our build deps as built containers, we should be caching RPMs in CI. And we should be using rpm-ostree at some point to assemble filesystem trees faster. Also, consolidate the clang to be serial with gcc, since while we lose a tiny bit of parallelism, it's not really worth its own context right now. Closes: coreos#759 Approved by: jlebon
- Loading branch information
1 parent
23a9e7e
commit 4bbea19
Showing
5 changed files
with
75 additions
and
90 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/bash | ||
# Install build dependencies, run unit tests and installed tests. | ||
|
||
set -xeuo pipefail | ||
|
||
dn=$(dirname $0) | ||
. ${dn}/libbuild.sh | ||
${dn}/build.sh | ||
make check | ||
make install | ||
gnome-desktop-testing-runner rpm-ostree | ||
sudo --user=testuser gnome-desktop-testing-runner rpm-ostree | ||
git clean -dfx | ||
|
||
# And now a clang build to find unused variables | ||
export CC=clang | ||
export CFLAGS='-Werror=unused-variable' | ||
build_default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/bash | ||
# Install build dependencies, run unit tests and installed tests. | ||
|
||
set -xeuo pipefail | ||
|
||
dn=$(dirname $0) | ||
. ${dn}/libbuild.sh | ||
|
||
install_builddeps rpm-ostree | ||
|
||
# ⚠ Pull latest ostree for https://github.com/ostreedev/ostree/issues/758 | ||
# And we now depend on 2017.4 | ||
# Also, there's a copy of this below in the compose context | ||
# And also in tests/vmcheck/overlay.sh | ||
yum -y install https://kojipkgs.fedoraproject.org//packages/ostree/2017.5/2.fc25/x86_64/ostree-{,libs-,devel-,grub2-}2017.5-2.fc25.x86_64.rpm | ||
|
||
dnf install -y createrepo_c /usr/bin/jq PyYAML clang \ | ||
libubsan libasan libtsan elfutils fuse sudo gnome-desktop-testing | ||
|
||
# create an unprivileged user for testing | ||
adduser testuser | ||
|
||
build --enable-installed-tests --enable-gtk-doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/bash | ||
|
||
make() { | ||
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) | ||
} | ||
|
||
build() { | ||
env NOCONFIGURE=1 ./autogen.sh | ||
./configure --prefix=/usr --libdir=/usr/lib64 "$@" | ||
make | ||
} | ||
|
||
build_default() { | ||
export CFLAGS='-fsanitize=undefined' | ||
build | ||
} | ||
|
||
install_builddeps() { | ||
pkg=$1 | ||
dnf -y install dnf-plugins-core | ||
dnf install -y @buildsys-build | ||
dnf install -y 'dnf-command(builddep)' | ||
|
||
# builddeps+runtime deps | ||
dnf builddep -y $pkg | ||
dnf install -y $pkg | ||
rpm -e $pkg | ||
} |