steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: systemd/mkosi@00db6f1a12fb04ed9f837b40ff34f82fab4d4a03
+ - uses: systemd/mkosi@0df7ef3f404b211fbc8d856214929de10311ee22
# 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
run: mkosi summary
- name: Build tools tree
- run: sudo --preserve-env mkosi -f sandbox true
+ run: sudo mkosi -f sandbox true
- name: Configure meson
run: |
- sudo --preserve-env --preserve-env=PATH \
- mkosi sandbox \
+ sudo mkosi sandbox \
meson setup \
--buildtype=debugoptimized \
-Dintegration-tests=true \
build
- name: Build image
- run: sudo --preserve-env mkosi sandbox meson compile -C build mkosi
+ run: sudo mkosi sandbox meson compile -C build mkosi
- name: Initial coverage report
run: |
- sudo --preserve-env mkdir -p build/test/coverage
- sudo --preserve-env \
- mkosi sandbox \
+ sudo mkdir -p build/test/coverage
+ sudo mkosi sandbox \
lcov \
--directory build/mkosi.builddir/arch~rolling~x86-64 \
--capture \
- name: Run integration tests
run: |
- sudo --preserve-env \
- mkosi sandbox \
+ sudo mkosi sandbox \
meson test \
-C build \
--no-rebuild \
lcov_args+=(--add-tracefile "${file}")
done < <(find build/test/coverage -name "TEST-*.coverage-info")
- sudo --preserve-env mkosi sandbox lcov --ignore-errors inconsistent,inconsistent "${lcov_args[@]}" --output-file build/test/coverage/everything.coverage-info
+ sudo mkosi sandbox lcov --ignore-errors inconsistent,inconsistent "${lcov_args[@]}" --output-file build/test/coverage/everything.coverage-info
- name: List coverage report
run: sudo mkosi sandbox lcov --ignore-errors inconsistent,inconsistent --list build/test/coverage/everything.coverage-info
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- - uses: systemd/mkosi@00db6f1a12fb04ed9f837b40ff34f82fab4d4a03
+ - uses: systemd/mkosi@0df7ef3f404b211fbc8d856214929de10311ee22
# 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
run: mkosi summary
- name: Build tools tree
- run: sudo --preserve-env mkosi -f sandbox true
+ run: sudo mkosi -f sandbox true
- name: Configure meson
run: |
- sudo --preserve-env --preserve-env=PATH \
- mkosi sandbox \
+ sudo mkosi sandbox \
meson setup \
--buildtype=debugoptimized \
-Dintegration-tests=true \
build
- name: Build image
- run: sudo --preserve-env mkosi sandbox meson compile -C build mkosi
+ run: sudo mkosi sandbox meson compile -C build mkosi
- name: Run integration tests
run: |
MAX_LINES=()
fi
- sudo --preserve-env \
- mkosi sandbox \
+ sudo mkosi sandbox \
env \
TEST_PREFER_QEMU=${{ matrix.vm }} \
TEST_SKIP=${{ matrix.skip }} \
for testing purposes.
First, install `mkosi` from the
-[GitHub repository](https://github.com/systemd/mkosi#running-mkosi-from-the-repository).
-Note that it's not possible to use your distribution's packaged version of mkosi
-as mkosi has to be installed outside of `/usr` for the following steps to work. When
-installing mkosi from the github repository, make sure to symlink it to `~/.local/bin`
-instead of `/usr/local/bin` if you want to add it to your `$PATH`.
+[GitHub repository](https://github.com/systemd/mkosi#running-mkosi-from-the-repository)
+or via your distribution's package manager. Note that systemd regularly adopts
+newer mkosi features that are not in an official release yet so there's a good
+chance that your distribution's packaged version of mkosi will be too old.
Then, you can build and run systemd executables as follows: