mkosi: Various tools tree fixes (#36059)

This commit is contained in:
Daan De Meyer
2025-01-21 15:17:36 +01:00
committed by GitHub
16 changed files with 60 additions and 35 deletions

View File

@@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: systemd/mkosi@c1ae257e270e768088eadf7b44fbbbb48c575709
- uses: systemd/mkosi@00db6f1a12fb04ed9f837b40ff34f82fab4d4a03
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
# immediately, we remove the files in the background. However, we first move them to a different location
@@ -83,21 +83,25 @@ jobs:
run: mkosi summary
- name: Build tools tree
run: mkosi -f sandbox true
- name: PATH
run: echo "$PATH"
run: sudo --preserve-env mkosi -f sandbox true
- name: Configure meson
run: mkosi sandbox meson setup --buildtype=debugoptimized -Dintegration-tests=true build
run: |
sudo --preserve-env --preserve-env=PATH \
mkosi sandbox \
meson setup \
--buildtype=debugoptimized \
-Dintegration-tests=true \
build
- name: Build image
run: sudo --preserve-env mkosi sandbox meson compile -C build mkosi
- name: Initial coverage report
run: |
mkdir -p build/test/coverage
mkosi sandbox \
sudo --preserve-env mkdir -p build/test/coverage
sudo --preserve-env \
mkosi sandbox \
lcov \
--directory build/mkosi.builddir/arch~rolling~x86-64 \
--capture \
@@ -141,7 +145,7 @@ jobs:
lcov_args+=(--add-tracefile "${file}")
done < <(find build/test/coverage -name "TEST-*.coverage-info")
mkosi sandbox lcov --ignore-errors inconsistent,inconsistent "${lcov_args[@]}" --output-file build/test/coverage/everything.coverage-info
sudo --preserve-env mkosi sandbox lcov --ignore-errors inconsistent,inconsistent "${lcov_args[@]}" --output-file build/test/coverage/everything.coverage-info
- name: List coverage report
run: mkosi sandbox lcov --ignore-errors inconsistent,inconsistent --list build/test/coverage/everything.coverage-info

View File

@@ -120,7 +120,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: systemd/mkosi@c1ae257e270e768088eadf7b44fbbbb48c575709
- uses: systemd/mkosi@00db6f1a12fb04ed9f837b40ff34f82fab4d4a03
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
# immediately, we remove the files in the background. However, we first move them to a different location
@@ -159,8 +159,8 @@ jobs:
[Build]
UseSubvolumes=yes
ToolsTreeDistribution=fedora
ToolsTreeRelease=rawhide
ToolsTreeDistribution=${{ matrix.distro }}
ToolsTreeRelease=${{ matrix.release }}
WorkspaceDirectory=$TMPDIR
PackageCacheDirectory=$TMPDIR/cache
@@ -188,16 +188,28 @@ jobs:
run: mkosi summary
- name: Build tools tree
run: mkosi -f sandbox true
run: sudo --preserve-env mkosi -f sandbox true
- name: Configure meson
run: mkosi sandbox meson setup --buildtype=debugoptimized -Dintegration-tests=true build
run: |
sudo --preserve-env --preserve-env=PATH \
mkosi sandbox \
meson setup \
--buildtype=debugoptimized \
-Dintegration-tests=true \
build
- name: Build image
run: sudo --preserve-env mkosi sandbox meson compile -C build mkosi
- name: Run integration tests
run: |
if [[ "$(mkosi sandbox meson test --help)" == *"--max-lines"* ]]; then
MAX_LINES=(--max-lines 300)
else
MAX_LINES=()
fi
sudo --preserve-env \
mkosi sandbox \
env \
@@ -210,7 +222,7 @@ jobs:
--print-errorlogs \
--no-stdsplit \
--num-processes "$(($(nproc) - 1))" \
--max-lines 300
"${MAX_LINES[@]}"
- name: Archive failed test journals
uses: actions/upload-artifact@v4