mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 06:06:02 -06:00
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Changes:
* Use `scan-build make` instead of running `scan-build` inside of `make`
(this appears to be necessary for the output synchronization to work)
* Use `-j "$(nproc)"` and `-Orecurse` for the main `make` step in all
jobs (including where this step is currently not parallel)
The main drawback of using parallel make (`-j`) is that the output of
different jobs may be printed interspersed, which makes the output
harder to read and less stable across multiple executions.
Example:
job1: line1
job1: line2
job2: line1
job3: line1
job1: line3
Using `-Orecurse` should fix this by ensuring that the output of all
jobs is still printed sequentially in the order that the jobs were
executed (that is, as if `-j` was not used), even if the jobs themselves
are executed in parallel.
This should ensure that the main `make` step in each job runs its
targets in parallel and has a stable output at the same time, making it
easier to compare the logs of the same job across different CI runs.
Note: The `-O` flag is specific to GNU make and was added in version 4.0
(2013-10-09).
Related commits:
* 500d8f2d6 ("ci: run make in parallel where applicable", 2023-08-14) /
PR #5960
* 1f6400bd8 ("build: sync scan-build target with CI", 2024-02-24) /
PR #6222
162 lines
5.5 KiB
YAML
162 lines
5.5 KiB
YAML
# Builds on multiple systems using different package managers:
|
|
#
|
|
# - Debian-based systems: Use oldest working/supported debian image for
|
|
# reasonable backwards compatibility and ubuntu:rolling for new setups.
|
|
# Additionally, ensure that the package works without apparmor.
|
|
#
|
|
# - Redhat-based systems: Use a centos-like distribution for reasonable
|
|
# backwards compatibility and fedora:latest for new setups.
|
|
#
|
|
# - Alpine: Use it for installing directly from source.
|
|
|
|
build_ubuntu_package:
|
|
image: ubuntu:rolling
|
|
timeout: 10 minutes
|
|
variables:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
script:
|
|
- apt-get update -qy
|
|
- >
|
|
apt-get install --no-install-recommends -qy
|
|
build-essential fakeroot lintian libapparmor-dev pkg-config gawk
|
|
| grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
|
|
- ./ci/printenv.sh
|
|
- ./configure || (cat config.log; exit 1)
|
|
- make dist
|
|
- >
|
|
MAKEFLAGS="$MAKEFLAGS -Orecurse" ./mkdeb.sh
|
|
--enable-fatal-warnings
|
|
- dpkg -i ./*.deb
|
|
- make installcheck
|
|
|
|
build_debian_package:
|
|
image: debian:bullseye
|
|
timeout: 10 minutes
|
|
variables:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
script:
|
|
- apt-get update -qy
|
|
- >
|
|
apt-get install --no-install-recommends -qy
|
|
build-essential fakeroot lintian libapparmor-dev pkg-config gawk
|
|
| grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
|
|
- ./ci/printenv.sh
|
|
- ./configure || (cat config.log; exit 1)
|
|
- make dist
|
|
- >
|
|
MAKEFLAGS="$MAKEFLAGS -Orecurse" ./mkdeb.sh
|
|
--enable-fatal-warnings
|
|
- dpkg -i ./*.deb
|
|
- make installcheck
|
|
|
|
build_no_apparmor:
|
|
image: ubuntu:latest
|
|
timeout: 10 minutes
|
|
variables:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
script:
|
|
- apt-get update -qy
|
|
- >
|
|
apt-get install --no-install-recommends -qy
|
|
build-essential fakeroot lintian pkg-config gawk
|
|
| grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
|
|
- ./ci/printenv.sh
|
|
- ./configure || (cat config.log; exit 1)
|
|
- make dist
|
|
- >
|
|
MAKEFLAGS="$MAKEFLAGS -Orecurse" ./mkdeb.sh
|
|
--enable-fatal-warnings --disable-apparmor
|
|
- dpkg -i ./*.deb
|
|
- make installcheck
|
|
- make installcheck | grep -F 'AppArmor support is disabled'
|
|
|
|
build_redhat_package:
|
|
image: almalinux:latest
|
|
timeout: 10 minutes
|
|
script:
|
|
- dnf update -y
|
|
- dnf install -y rpm-build gcc make
|
|
- ./ci/printenv.sh
|
|
- ./configure || (cat config.log; exit 1)
|
|
- make dist
|
|
- >
|
|
MAKEFLAGS="$MAKEFLAGS -Orecurse" ./platform/rpm/mkrpm.sh
|
|
--enable-fatal-warnings
|
|
- rpm -i ./*.rpm
|
|
- make installcheck
|
|
|
|
build_fedora_package:
|
|
image: fedora:latest
|
|
timeout: 10 minutes
|
|
script:
|
|
- dnf update -y
|
|
- dnf install -y rpm-build gcc make
|
|
- ./ci/printenv.sh
|
|
- ./configure || (cat config.log; exit 1)
|
|
- make dist
|
|
- >
|
|
MAKEFLAGS="$MAKEFLAGS -Orecurse" ./platform/rpm/mkrpm.sh
|
|
--enable-fatal-warnings
|
|
- rpm -i ./*.rpm
|
|
- make installcheck
|
|
|
|
# FIXME: Cannot build src/libtrace with musl (see #6610).
|
|
#build_src_package:
|
|
# image: alpine:latest
|
|
# timeout: 10 minutes
|
|
# script:
|
|
# - apk update
|
|
# - apk upgrade
|
|
# - apk add build-base linux-headers gawk
|
|
# - ./ci/printenv.sh
|
|
# # Note: Do not use ` --enable-fatal-warnings` because the build
|
|
# # currently produces warnings on Alpine (see #6224).
|
|
# - >
|
|
# ./configure --prefix=/usr
|
|
# || (cat config.log; exit 1)
|
|
# - make -j "$(nproc)" -Orecurse
|
|
# - make install-strip
|
|
# - make installcheck
|
|
|
|
debian_ci:
|
|
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
|
|
timeout: 10 minutes
|
|
variables:
|
|
DEBFULLNAME: "$GITLAB_USER_NAME"
|
|
DEBEMAIL: "$GITLAB_USER_EMAIL"
|
|
DEBIAN_FRONTEND: noninteractive
|
|
PKGNAME: firejail
|
|
before_script:
|
|
- git checkout -B ci_build "$CI_COMMIT_SHA"
|
|
- gitlab-ci-enable-sid
|
|
- gitlab-ci-enable-experimental
|
|
- |
|
|
cat >>/etc/apt/sources.list <<EOF
|
|
deb-src http://deb.debian.org/debian sid main
|
|
deb-src http://deb.debian.org/debian experimental main
|
|
EOF
|
|
- apt-get update -qy
|
|
- git config user.name "$DEBFULLNAME"
|
|
- git config user.email "$DEBEMAIL"
|
|
- |
|
|
cd "$CI_PROJECT_DIR/.."
|
|
apt-get source --download-only -t experimental "$PKGNAME" ||
|
|
apt-get source --download-only "$PKGNAME"
|
|
- |
|
|
cd "$CI_PROJECT_DIR"
|
|
tar xf "../${PKGNAME}"_*.debian.tar.*
|
|
- rm -rf debian/patches/
|
|
- |
|
|
VERSION="$(grep ^PACKAGE_VERSION= configure | cut -d "'" -f 2)"
|
|
dch -v "${VERSION}-0.1~ci" 'Non-maintainer upload.'
|
|
git archive -o "../${PKGNAME}_${VERSION}.orig.tar.gz" HEAD
|
|
pristine-tar commit "../${PKGNAME}_${VERSION}.orig.tar.gz" ci_build
|
|
git branch -m pristine-tar origin/pristine-tar
|
|
- git add debian
|
|
- git commit -m 'add debian/'
|
|
- export CI_COMMIT_SHA="$(git rev-parse HEAD)"
|
|
script:
|
|
- apt-get install --no-install-recommends -qy gawk git-buildpackage
|
|
- ./ci/printenv.sh
|
|
- gitlab-ci-git-buildpackage
|
|
- gitlab-ci-lintian
|