mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-15 19:04:23 -05:00
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
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
|
|
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 \
|
|
dnf \
|
|
e2fsprogs \
|
|
libfdisk-dev \
|
|
mtools \
|
|
ovmf \
|
|
python3-pefile \
|
|
python3-pyelftools \
|
|
python3-setuptools \
|
|
qemu-system-x86 \
|
|
squashfs-tools \
|
|
systemd-container
|
|
echo "::endgroup::"
|
|
|
|
- name: Checkout systemd
|
|
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
|
with:
|
|
repository: systemd/systemd
|
|
path: ${{ github.action_path }}/systemd
|
|
ref: ${{ inputs.systemdVersion }}
|
|
|
|
- name: Update systemd tools
|
|
shell: bash
|
|
working-directory: ${{ github.action_path }}
|
|
run: |
|
|
echo "::group::Update systemd tools"
|
|
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
|
|
echo "::endgroup::"
|
|
|
|
- name: Install
|
|
shell: bash
|
|
run: sudo python3 -m pip install git+https://github.com/systemd/mkosi.git@${{ inputs.version }}
|