diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6b142214aa..abe4bbd467 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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 diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 3a90bd6680..47a43c689f 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -188,10 +188,16 @@ 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