diff --git a/.github/workflows/build-katsu.yml b/.github/workflows/build-katsu.yml index 557b637..3bb9291 100644 --- a/.github/workflows/build-katsu.yml +++ b/.github/workflows/build-katsu.yml @@ -1,6 +1,7 @@ -name: Build Live ISO images (with Katsu) +name: Build images (with Katsu) env: + KATSU_BUILD_TASK_NAME: "Build image" DNF_PKGS: | git xorriso @@ -77,7 +78,7 @@ jobs: popd - name: Checkout uses: actions/checkout@v2 - - name: Build ISO + - name: ${{ env.KATSU_BUILD_TASK_NAME }} run: | pushd katsu katsu --output=disk-image modules/${{ matrix.variant }}.yaml @@ -91,12 +92,70 @@ jobs: # set github variable echo artifact=$name >> $GITHUB_ENV - - name: Upload ISO + - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: ${{ env.artifact }}-image path: katsu/katsu-work/image/*.img.xz + docker: + strategy: + fail-fast: false + matrix: + variant: + - base/base-docker-x86_64 + - base/base-docker-aarch64 + runs-on: ubuntu-latest + container: + image: ghcr.io/terrapkg/builder:f38 + # Pass /dev from host to container + # Very hacky, but it works + # Microsoft/Github, if you're reading this, + # I'm sorry. + options: --privileged -v /dev:/dev + + steps: + - name: Install dependencies + run: | + dnf install -y $DNF_PKGS + dnf clean all + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Clone Katsu + uses: actions/checkout@v3 + with: + repository: FyraLabs/katsu + ref: main + path: katsu + - name: Build Katsu + run: | + pushd katsu + cargo build --release + cp target/release/katsu /usr/bin/katsu + popd + - name: Checkout + uses: actions/checkout@v2 + - name: ${{ env.KATSU_BUILD_TASK_NAME }} + run: | + pushd katsu + katsu --output=fs modules/${{ matrix.variant }}.yaml + + # tarball katsu-work/chroot + tar -C katsu-work/chroot -c . | xz -z9 -c > katsu-work/image/katsu.tar.xz + popd + + - name: sanitize artifact name + run: | + name=$(echo ${{ matrix.variant }} | sed 's/\//-/g') + + # set github variable + echo artifact=$name >> $GITHUB_ENV + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ env.artifact }}-docker + path: katsu/katsu-work/image/*.tar.xz live-iso: strategy: @@ -135,7 +194,7 @@ jobs: popd - name: Checkout uses: actions/checkout@v2 - - name: Build ISO + - name: ${{ env.KATSU_BUILD_TASK_NAME }} run: | pushd katsu katsu --output=iso modules/${{ matrix.variant }}.yaml @@ -148,7 +207,7 @@ jobs: # set github variable echo artifact=$name >> $GITHUB_ENV - - name: Upload ISO + - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: ${{ env.artifact }}-iso diff --git a/katsu/modules/base/base-disk-aarch64.yaml b/katsu/modules/base/base-disk-aarch64.yaml index 3ec7fca..346777f 100644 --- a/katsu/modules/base/base-disk-aarch64.yaml +++ b/katsu/modules/base/base-disk-aarch64.yaml @@ -11,6 +11,7 @@ users: import: - base.yaml + - base-disk.yaml scripts: post: @@ -39,56 +40,4 @@ disk: dnf: releasever: 39 - arch: aarch64 - options: - - --setopt=cachedir=/var/cache/dnf - - --nogpgcheck - - --setopt=keepcache=True - exclude: - - fedora-release* - - generic-release* - packages: - - filesystem - - setup - - lvm2 - - btrfs-progs - - dmraid - - nvme-cli - - kernel - - glibc - - glibc-common - - dracut-config-generic - - dracut-tools - - dnf - - dracut - # - mkpasswd # maybe not needed soon - - "@core" - - "@standard" - - grub2-tools - - "@hardware-support" - - NetworkManager - - rpm - - libgomp - - ultramarine-release-identity-basic - - ultramarine-release-basic - - fedora-repos - - efibootmgr - - arch_packages: - aarch64: - - grub2-efi-aa64 - - grub2-efi-aa64-modules - - grub2-efi-aa64-cdboot - - shim-aa64 - - shim-unsigned-aarch64 - - bcm283x-firmware - - bcm283x-overlays - - "@arm-tools" - x86_64: - - grub2-efi-x64 - - grub2-efi-x64-modules - - grub2-efi-x64-cdboot - - grub2-pc - - grub2-pc-modules - - shim-x64 - - shim-unsigned-x64 + arch: aarch64 \ No newline at end of file diff --git a/katsu/modules/base/base-disk-x86_64.yaml b/katsu/modules/base/base-disk-x86_64.yaml index f86cb16..823c87e 100644 --- a/katsu/modules/base/base-disk-x86_64.yaml +++ b/katsu/modules/base/base-disk-x86_64.yaml @@ -11,6 +11,7 @@ users: import: - base.yaml + - base-disk.yaml scripts: post: @@ -38,56 +39,4 @@ disk: dnf: - releasever: 39 - options: - - --setopt=cachedir=/var/cache/dnf - - --nogpgcheck - - --setopt=keepcache=True - exclude: - - fedora-release* - - generic-release* - packages: - - filesystem - - setup - - lvm2 - - btrfs-progs - - dmraid - - nvme-cli - - kernel - - glibc - - glibc-common - - dracut-config-generic - - dracut-tools - - dnf - - dracut - # - mkpasswd # maybe not needed soon - - "@core" - - "@standard" - - grub2-tools - - "@hardware-support" - - NetworkManager - - rpm - - libgomp - - ultramarine-release-identity-basic - - ultramarine-release-basic - - fedora-repos - - efibootmgr - - arch_packages: - aarch64: - - grub2-efi-aa64 - - grub2-efi-aa64-modules - - grub2-efi-aa64-cdboot - - shim-aa64 - - shim-unsigned-aarch64 - - bcm283x-firmware - - bcm283x-overlays - - "@arm-tools" - x86_64: - - grub2-efi-x64 - - grub2-efi-x64-modules - - grub2-efi-x64-cdboot - - grub2-pc - - grub2-pc-modules - - shim-x64 - - shim-unsigned-x64 + releasever: 39 \ No newline at end of file diff --git a/katsu/modules/base/base-disk.yaml b/katsu/modules/base/base-disk.yaml new file mode 100644 index 0000000..7fa1714 --- /dev/null +++ b/katsu/modules/base/base-disk.yaml @@ -0,0 +1,56 @@ +builder: dnf + +dnf: + releasever: 39 + options: + - --setopt=cachedir=/var/cache/dnf + - --nogpgcheck + - --setopt=keepcache=True + exclude: + - fedora-release* + - generic-release* + packages: + - filesystem + - setup + - lvm2 + - btrfs-progs + - dmraid + - nvme-cli + - kernel + - glibc + - glibc-common + - dracut-config-generic + - dracut-tools + - dnf + - dracut + # - mkpasswd # maybe not needed soon + - "@core" + - "@standard" + - grub2-tools + - "@hardware-support" + - NetworkManager + - rpm + - libgomp + - ultramarine-release-identity-basic + - ultramarine-release-basic + - fedora-repos + - efibootmgr + + arch_packages: + aarch64: + - grub2-efi-aa64 + - grub2-efi-aa64-modules + - grub2-efi-aa64-cdboot + - shim-aa64 + - shim-unsigned-aarch64 + - bcm283x-firmware + - bcm283x-overlays + - "@arm-tools" + x86_64: + - grub2-efi-x64 + - grub2-efi-x64-modules + - grub2-efi-x64-cdboot + - grub2-pc + - grub2-pc-modules + - shim-x64 + - shim-unsigned-x64 diff --git a/katsu/modules/base/base-docker-aarch64.yaml b/katsu/modules/base/base-docker-aarch64.yaml new file mode 100644 index 0000000..e16287a --- /dev/null +++ b/katsu/modules/base/base-docker-aarch64.yaml @@ -0,0 +1,6 @@ +builder: dnf +distro: Ultramarine Linux 39 + +dnf: + releasever: 39 + arch: aarch64 \ No newline at end of file diff --git a/katsu/modules/base/base-docker-x86_64.yaml b/katsu/modules/base/base-docker-x86_64.yaml new file mode 100644 index 0000000..fc7f508 --- /dev/null +++ b/katsu/modules/base/base-docker-x86_64.yaml @@ -0,0 +1,6 @@ +builder: dnf +distro: Ultramarine Linux 39 + +dnf: + releasever: 39 + arch: x86_64 \ No newline at end of file diff --git a/katsu/modules/base/base-docker.yaml b/katsu/modules/base/base-docker.yaml new file mode 100644 index 0000000..785d981 --- /dev/null +++ b/katsu/modules/base/base-docker.yaml @@ -0,0 +1,27 @@ +builder: dnf + +dnf: + releasever: 39 + options: + - --setopt=cachedir=/var/cache/dnf + - --nogpgcheck + - --setopt=keepcache=True + exclude: + - fedora-release* + - generic-release* + - kernel* + packages: + - filesystem + - setup + - glibc + - glibc-common + - dnf + # - mkpasswd # maybe not needed soon + - "@core" + - "@hardware-support" + - rpm + - libgomp + - ultramarine-release-identity-basic + - ultramarine-release-basic + - fedora-repos +