Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: standardize apt-get update/install & misc improvements #5857

Merged
merged 3 commits into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/build-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,18 @@ jobs:
github.com:443
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: update package information
run: sudo apt-get update
run: sudo apt-get update -qy
- name: install dependencies
run: sudo apt-get install libapparmor-dev libselinux1-dev
run: >
sudo apt-get install -qy
libapparmor-dev libselinux1-dev
- name: print env
run: ./ci/printenv.sh
- name: configure
run: >
CC=clang-14 ./configure --enable-fatal-warnings --enable-apparmor
--enable-selinux
|| (cat config.log; exit 1)
- name: make
run: make
- name: make install
Expand All @@ -89,15 +92,18 @@ jobs:
github.com:443
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: update package information
run: sudo apt-get update
run: sudo apt-get update -qy
- name: install clang-tools-14 and dependencies
run: sudo apt-get install clang-tools-14 libapparmor-dev libselinux1-dev
run: >
sudo apt-get install -qy
clang-tools-14 libapparmor-dev libselinux1-dev
- name: print env
run: ./ci/printenv.sh
- name: configure
run: >
CC=clang-14 ./configure --enable-fatal-warnings --enable-apparmor
--enable-selinux
|| (cat config.log; exit 1)
- name: scan-build
run: NO_EXTRA_CFLAGS="yes" scan-build-14 --status-bugs make
cppcheck:
Expand All @@ -112,9 +118,9 @@ jobs:
github.com:443
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: update package information
run: sudo apt-get update
run: sudo apt-get update -qy
- name: install cppcheck
run: sudo apt-get install cppcheck
run: sudo apt-get install -qy cppcheck
- run: cppcheck --version
- name: cppcheck
run: >
Expand All @@ -134,9 +140,9 @@ jobs:
github.com:443
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: update package information
run: sudo apt-get update
run: sudo apt-get update -qy
- name: install cppcheck
run: sudo apt-get install cppcheck
run: sudo apt-get install -qy cppcheck
- run: cppcheck --version
- name: cppcheck
run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance .
Expand All @@ -152,9 +158,9 @@ jobs:
github.com:443
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: update package information
run: sudo apt-get update
run: sudo apt-get update -qy
- name: install dependencies
run: sudo apt-get install codespell
run: sudo apt-get install -qy codespell
- run: codespell --version
- name: codespell
run: make codespell
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ jobs:
yahoo.com:1025
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: update package information
run: sudo apt-get update
run: sudo apt-get update -qy
- name: install dependencies
run: >
sudo apt-get install
sudo apt-get install -qy
gcc-12 libapparmor-dev libselinux1-dev expect xzdec whois
bridge-utils
- name: print env
Expand All @@ -75,6 +75,7 @@ jobs:
run: >
CC=gcc-12 ./configure --prefix=/usr --enable-fatal-warnings
--enable-analyzer --enable-apparmor --enable-selinux
|| (cat config.log; exit 1)
- name: make
run: make
- name: make install
Expand Down
52 changes: 28 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@

build_ubuntu_package:
image: ubuntu:rolling
variables:
DEBIAN_FRONTEND: noninteractive
script:
- apt-get update -qq
- apt-get update -qy
- >
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
build-essential lintian libapparmor-dev pkg-config python3 gawk
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
- ./configure || (cat config.log; exit 1)
- make deb
- dpkg -i firejail*.deb
- command -V firejail && firejail --version
# - python3 --version
# - python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc

build_debian_package:
image: debian:buster
variables:
DEBIAN_FRONTEND: noninteractive
script:
- apt-get update -qq
- apt-get update -qy
- >
apt-get install -y -qq
build-essential lintian libapparmor-dev pkg-config gawk
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
- ./configure || (cat config.log; exit 1)
- make deb
- dpkg -i firejail*.deb
- command -V firejail && firejail --version
Expand All @@ -40,7 +44,7 @@ build_redhat_package:
- dnf update -y
- dnf install -y rpm-build gcc make
- ./ci/printenv.sh
- ./configure --prefix=/usr
- ./configure --prefix=/usr || (cat config.log; exit 1)
- make rpms
- rpm -i firejail*.rpm
- command -V firejail && firejail --version
Expand All @@ -51,36 +55,35 @@ build_fedora_package:
- dnf update -y
- dnf install -y rpm-build gcc make
- ./ci/printenv.sh
- ./configure --prefix=/usr
- ./configure --prefix=/usr || (cat config.log; exit 1)
- make rpms
- rpm -i firejail*.rpm
- command -V firejail && firejail --version
# - python3 --version
# - python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc

build_src_package:
image: alpine:latest
script:
- apk update
- apk upgrade
- apk add build-base linux-headers python3 gawk
- apk add build-base linux-headers gawk
- ./ci/printenv.sh
- ./configure --prefix=/usr
- ./configure --prefix=/usr || (cat config.log; exit 1)
- make
- make install-strip
- command -V firejail && firejail --version
# - python3 --version
# - python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc

build_no_apparmor:
image: ubuntu:latest
variables:
DEBIAN_FRONTEND: noninteractive
script:
- apt-get update -qq
- apt-get update -qy
- >
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
build-essential lintian pkg-config gawk
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
- ./configure || (cat config.log; exit 1)
- make dist
- ./mkdeb.sh --disable-apparmor
- dpkg -i firejail*.deb
Expand All @@ -92,6 +95,7 @@ debian_ci:
variables:
DEBFULLNAME: "$GITLAB_USER_NAME"
DEBEMAIL: "$GITLAB_USER_EMAIL"
DEBIAN_FRONTEND: noninteractive
before_script:
- git checkout -B ci_build "$CI_COMMIT_SHA"
- gitlab-ci-enable-sid
Expand All @@ -101,7 +105,7 @@ debian_ci:
deb-src http://deb.debian.org/debian sid main
deb-src http://deb.debian.org/debian experimental main
EOF
- apt-get update
- apt-get update -qy
- git config user.name "$DEBFULLNAME"
- git config user.email "$DEBEMAIL"
- |
Expand All @@ -122,7 +126,7 @@ debian_ci:
- git commit -m 'add debian/'
- export CI_COMMIT_SHA="$(git rev-parse HEAD)"
script:
- apt-get --no-install-recommends install -y -qq gawk
- apt-get install --no-install-recommends -qy gawk
- ./ci/printenv.sh
- gitlab-ci-git-buildpackage
- gitlab-ci-lintian