constellation/.github/actions/setup_mkosi/action.yaml

68 lines
2.0 KiB
YAML
Raw Normal View History

2022-10-19 11:10:15 +00:00
name: Setup mkosi
description: Install mkosi and all its dependencies
inputs:
version:
description: "Version (commit hash) of mkosi to install."
required: true
systemdVersion:
description: "Version (commit hash) of systemd to install."
required: true
2022-10-19 11:10:15 +00:00
runs:
using: composite
steps:
- name: Dependencies
shell: bash
run: |
echo "::group::Dependencies"
echo "deb-src http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install --assume-yes --no-install-recommends \
bubblewrap \
2022-10-19 11:10:15 +00:00
dnf \
e2fsprogs \
libfdisk-dev \
mtools \
ovmf \
python3-pefile \
python3-pyelftools \
python3-setuptools \
qemu-system-x86 \
squashfs-tools \
systemd-container
2022-10-19 11:10:15 +00:00
echo "::endgroup::"
- name: Checkout systemd
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
repository: systemd/systemd
path: ${{ github.action_path }}/systemd
ref: ${{ inputs.systemdVersion }}
- name: Update systemd tools
2022-10-19 11:10:15 +00:00
shell: bash
working-directory: ${{ github.action_path }}
run: |
echo "::group::Update systemd tools"
2022-10-19 11:10:15 +00:00
sudo apt-get build-dep systemd
meson systemd/build systemd -Drepart=true -Defi=true -Dbootloader=true
BINARIES=(
bootctl
systemctl
systemd-analyze
systemd-dissect
systemd-nspawn
systemd-repart
ukify
)
ninja -C systemd/build ${BINARIES[@]}
for BINARY in "${BINARIES[@]}"; do
sudo ln -svf $PWD/systemd/build/$BINARY /usr/bin/$BINARY
done
2022-10-19 11:10:15 +00:00
echo "::endgroup::"
2022-10-19 11:10:15 +00:00
- name: Install
shell: bash
run: sudo python3 -m pip install git+https://github.com/systemd/mkosi.git@${{ inputs.version }}