Skip to content

Commit 339d395

Browse files
committed
ci: print env-related settings in each job
To make debugging easier. Use a separate shell script instead of just a make target to ensure that it can safely run before ./configure and without having make installed.
1 parent fde591c commit 339d395

File tree

7 files changed

+48
-0
lines changed

7 files changed

+48
-0
lines changed

.github/workflows/build-extra.yml

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ jobs:
6767
run: sudo apt-get update
6868
- name: install dependencies
6969
run: sudo apt-get install libapparmor-dev libselinux1-dev
70+
- name: print env
71+
run: ./ci/printenv.sh
7072
- name: configure
7173
run: >
7274
CC=clang-14 ./configure --enable-fatal-warnings --enable-apparmor
@@ -92,6 +94,8 @@ jobs:
9294
run: sudo apt-get update
9395
- name: install clang-tools-14 and dependencies
9496
run: sudo apt-get install clang-tools-14 libapparmor-dev libselinux1-dev
97+
- name: print env
98+
run: ./ci/printenv.sh
9599
- name: configure
96100
run: >
97101
CC=clang-14 ./configure --enable-fatal-warnings --enable-apparmor

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
sudo apt-get install
6969
gcc-12 libapparmor-dev libselinux1-dev expect xzdec whois
7070
bridge-utils
71+
- name: print env
72+
run: ./ci/printenv.sh
7173
- name: configure
7274
run: >
7375
CC=gcc-12 ./configure --prefix=/usr --enable-fatal-warnings

.github/workflows/codeql-analysis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ jobs:
9191
- name: Checkout repository
9292
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
9393

94+
- name: print env
95+
run: ./ci/printenv.sh
96+
9497
# Initializes the CodeQL tools for scanning.
9598
- name: Initialize CodeQL
9699
uses: github/codeql-action/init@b2c19fb9a2a485599ccf4ed5d65527d94bc57226

.github/workflows/profile-checks.yml

+3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ jobs:
3434
github.com:443
3535
3636
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
37+
- name: print env
38+
run: ./ci/printenv.sh
3739
- run: python3 --version
40+
3841
# - name: sort.py
3942
# run: >
4043
# ./ci/check/profiles/sort.py

.gitlab-ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ build_ubuntu_package:
1313
- >
1414
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
1515
build-essential lintian libapparmor-dev pkg-config python3 gawk
16+
- ./ci/printenv.sh
1617
- ./configure
1718
- make deb
1819
- dpkg -i firejail*.deb
@@ -27,6 +28,7 @@ build_debian_package:
2728
- >
2829
apt-get install -y -qq
2930
build-essential lintian libapparmor-dev pkg-config gawk
31+
- ./ci/printenv.sh
3032
- ./configure
3133
- make deb
3234
- dpkg -i firejail*.deb
@@ -37,6 +39,7 @@ build_redhat_package:
3739
script:
3840
- dnf update -y
3941
- dnf install -y rpm-build gcc make
42+
- ./ci/printenv.sh
4043
- ./configure --prefix=/usr
4144
- make rpms
4245
- rpm -i firejail*.rpm
@@ -47,6 +50,7 @@ build_fedora_package:
4750
script:
4851
- dnf update -y
4952
- dnf install -y rpm-build gcc make
53+
- ./ci/printenv.sh
5054
- ./configure --prefix=/usr
5155
- make rpms
5256
- rpm -i firejail*.rpm
@@ -60,6 +64,7 @@ build_src_package:
6064
- apk update
6165
- apk upgrade
6266
- apk add build-base linux-headers python3 gawk
67+
- ./ci/printenv.sh
6368
- ./configure --prefix=/usr
6469
- make
6570
- make install-strip
@@ -74,6 +79,7 @@ build_no_apparmor:
7479
- >
7580
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq
7681
build-essential lintian pkg-config gawk
82+
- ./ci/printenv.sh
7783
- ./configure
7884
- make dist
7985
- ./mkdeb.sh --disable-apparmor
@@ -117,5 +123,6 @@ debian_ci:
117123
- export CI_COMMIT_SHA="$(git rev-parse HEAD)"
118124
script:
119125
- apt-get --no-install-recommends install -y -qq gawk
126+
- ./ci/printenv.sh
120127
- gitlab-ci-git-buildpackage
121128
- gitlab-ci-lintian

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ scan-build: clean
364364
codespell: clean
365365
codespell --ignore-regex "UE|creat|shotcut|ether" src test
366366

367+
.PHONY: print-env
368+
print-env:
369+
./ci/printenv.sh
370+
367371
#
368372
# make test
369373
#

ci/printenv.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
# Print information that may be useful for debugging CI.
3+
4+
test -f /etc/os-release && . /etc/os-release
5+
6+
cat <<EOF
7+
nproc: $(nproc)
8+
kernel: $(uname -srvm)
9+
distro: $PRETTY_NAME
10+
sh: $(ls -l /bin/sh | sed 's|.* /bin|/bin|')
11+
user: $(id | cut -f -2 -d ' ')
12+
13+
[/etc/os-release]
14+
$(cat /etc/os-release)
15+
EOF
16+
17+
if test -z "$CI_VERBOSE"; then
18+
exit
19+
fi
20+
21+
cat <<EOF
22+
23+
[env]
24+
$(env | LC_ALL=C sort)
25+
EOF

0 commit comments

Comments
 (0)