Skip to content

Commit

Permalink
build: add print-version target and use in CI
Browse files Browse the repository at this point in the history
To reduce TARNAME hardcoding.

Added on commit 6a89ab0 ("ci: run firejail --version after
build/install", 2022-05-16) / PR netblue30#5148.
  • Loading branch information
kmk3 committed Feb 29, 2024
1 parent 48db047 commit c9531d9
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ jobs:
- name: make install
run: sudo make install
- name: print version
run: command -V firejail && firejail --version
run: make print-version
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ jobs:
run: make
- name: make install
run: sudo make install
- name: print firejail version
run: command -V firejail && firejail --version
- name: print version
run: make print-version
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print firejail version
run: command -V firejail && firejail --version
- name: print version
run: make print-version
- run: make lab-setup
- run: make test-seccomp-extra
- run: make test-firecfg
Expand Down Expand Up @@ -128,8 +128,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print firejail version
run: command -V firejail && firejail --version
- name: print version
run: make print-version
- run: make lab-setup
- run: make test-private-etc
- run: make test-fs
Expand Down Expand Up @@ -167,8 +167,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print firejail version
run: command -V firejail && firejail --version
- name: print version
run: make print-version
- run: make lab-setup
- run: make test-environment
- run: make test-profiles
Expand Down Expand Up @@ -209,8 +209,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print firejail version
run: command -V firejail && firejail --version
- name: print version
run: make print-version
- run: make lab-setup
- run: make test-utils

Expand Down Expand Up @@ -255,8 +255,8 @@ jobs:
run: make -j "$(nproc)"
- name: make install
run: sudo make install
- name: print firejail version
run: command -V firejail && firejail --version
- name: print version
run: make print-version
- run: make lab-setup
- run: make test-fnetfilter
- run: make test-sysutils
Expand Down
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build_ubuntu_package:
- ./configure || (cat config.log; exit 1)
- make deb
- dpkg -i ./*.deb
- command -V firejail && firejail --version
- make print-version

build_debian_package:
image: debian:buster
Expand All @@ -38,7 +38,7 @@ build_debian_package:
- ./configure || (cat config.log; exit 1)
- make deb
- dpkg -i ./*.deb
- command -V firejail && firejail --version
- make print-version

build_redhat_package:
image: almalinux:latest
Expand All @@ -50,7 +50,7 @@ build_redhat_package:
- ./configure || (cat config.log; exit 1)
- make rpms
- rpm -i ./*.rpm
- command -V firejail && firejail --version
- make print-version

build_fedora_package:
image: fedora:latest
Expand All @@ -62,7 +62,7 @@ build_fedora_package:
- ./configure || (cat config.log; exit 1)
- make rpms
- rpm -i ./*.rpm
- command -V firejail && firejail --version
- make print-version

build_src_package:
image: alpine:latest
Expand All @@ -75,7 +75,7 @@ build_src_package:
- ./configure --prefix=/usr || (cat config.log; exit 1)
- make
- make install-strip
- command -V firejail && firejail --version
- make print-version

build_no_apparmor:
image: ubuntu:latest
Expand All @@ -93,8 +93,8 @@ build_no_apparmor:
- make dist
- ./mkdeb.sh --disable-apparmor
- dpkg -i ./*.deb
- command -V firejail && firejail --version
- firejail --version | grep -F 'AppArmor support is disabled'
- make print-version
- make print-version | grep -F 'AppArmor support is disabled'

debian_ci:
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ codespell:
print-env:
./ci/printenv.sh

.PHONY: print-version
print-version: config.mk
command -V $(TARNAME) && $(TARNAME) --version

#
# make test
#
Expand Down
2 changes: 1 addition & 1 deletion gcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ gcov_generate() {

make distclean && ./configure --prefix=/usr --enable-apparmor --enable-gcov --enable-fatal-warnings && make -j4 && sudo make install
rm -fr gcov-dir gcov-file
firejail --version
make print-version
gcov_generate

make test-firecfg | grep TESTING
Expand Down

0 comments on commit c9531d9

Please sign in to comment.