Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/gen-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ on:
default: "rpi-armv6l rpi-armv6l-musl rpi-armv7l rpi-armv7l-musl rpi-aarch64 rpi-aarch64-musl"
required: false
type: string
wsl_flag:
description: "Build WSL images"
default: true
required: true
type: boolean
wsl:
description: "Archs to build WSL images for"
default: "x86_64 x86_64-musl aarch64 aarch64-musl"
required: false
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -74,6 +84,7 @@ jobs:
rootfs: ${{ steps.prep.outputs.rootfs }}
platformfs: ${{ steps.prep.outputs.platformfs }}
sbc_imgs: ${{ steps.prep.outputs.sbc_imgs }}
wsl: ${{ steps.prep.outputs.wsl }}

steps:
- name: Prepare Environment
Expand All @@ -97,6 +108,7 @@ jobs:
echo "rootfs=$(echo "${{ inputs.rootfs }}" | jsonify)" >> $GITHUB_OUTPUT
echo "platformfs=$(echo "${{ inputs.platformfs }}" | jsonify)" >> $GITHUB_OUTPUT
echo "sbc_imgs=$(echo "${{ inputs.sbc_imgs }}" | jsonify)" >> $GITHUB_OUTPUT
echo "wsl=$(echo "${{ inputs.wsl }}" | jsonify)" >> $GITHUB_OUTPUT

build-live-isos:
name: Build Live ISOs
Expand Down Expand Up @@ -282,6 +294,52 @@ jobs:
!distdir-${{ needs.prepare.outputs.datecode }}/*PLATFORMFS*
if-no-files-found: error

build-wsl:
name: Build WSL Images
runs-on: ubuntu-latest
needs: prepare
if: ${{ inputs.wsl_flag }}

strategy:
matrix:
arch: ${{ fromJson(needs.prepare.outputs.wsl) }}

container:
image: 'ghcr.io/void-linux/void-mklive:20250116R1'
options: --privileged
volumes:
- /dev:/dev
env:
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
MKLIVE_REV: "${{ needs.prepare.outputs.revision }}"

steps:
- name: Prepare container
shell: sh
run: xbps-install -Syu xbps && xbps-install -yu

- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1

- name: Build WSL Images
run: |
make wsl-all-print wsl-all \
SUDO= REPOSITORY="${{ needs.prepare.outputs.mirror }}" \
DATECODE="${{ needs.prepare.outputs.datecode }}" \
ARCHS="${{ matrix.arch }}"

- name: Prepare artifacts for upload
run: |
make dist DATECODE="${{ needs.prepare.outputs.datecode }}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: void-wsl-${{ matrix.arch }}-${{ needs.prepare.outputs.datecode }}
path: |
distdir-${{ needs.prepare.outputs.datecode }}/*
if-no-files-found: error


merge-artifacts:
name: Combine artifacts
runs-on: ubuntu-latest
Expand All @@ -292,6 +350,7 @@ jobs:
- build-rootfs
- build-platformfs
- build-sbc-img
- build-wsl

container:
image: 'ghcr.io/void-linux/void-mklive:20250116R1'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.raw
*.tar.gz
*.box
*.wsl
xbps-cache
xbps-cachedir*
stamps*
Expand Down
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ T_CLOUD_IMGS=GCP{,-musl}

T_PXE_ARCHS=x86_64{,-musl}

T_WSL_ARCHS={x86_64,aarch64}{,-musl}

LIVE_ARCHS:=$(shell echo $(T_LIVE_ARCHS))
LIVE_FLAVORS:=base enlightenment xfce mate cinnamon gnome kde lxde lxqt xfce-wayland
LIVE_PLATFORMS:=pinebookpro x13s
Expand All @@ -19,13 +21,15 @@ PLATFORMS:=$(shell echo $(T_PLATFORMS))
SBC_IMGS:=$(shell echo $(T_SBC_IMGS))
CLOUD_IMGS:=$(shell echo $(T_CLOUD_IMGS))
PXE_ARCHS:=$(shell echo $(T_PXE_ARCHS))
WSL_ARCHS:=$(shell echo $(T_WSL_ARCHS))

ALL_LIVE_ISO=$(foreach arch,$(LIVE_ARCHS), $(foreach flavor,$(LIVE_FLAVORS),void-live-$(arch)-$(DATECODE)-$(flavor).iso))
ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATECODE).tar.xz)
ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATECODE).tar.xz)
ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATECODE).img.xz)
ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATECODE).tar.gz)
ALL_PXE_ARCHS=$(foreach arch,$(PXE_ARCHS),void-$(arch)-NETBOOT-$(DATECODE).tar.gz)
ALL_WSL=$(foreach arch,$(WSL_ARCHS),void-$(arch)-$(DATECODE).wsl)

SUDO := sudo

Expand Down Expand Up @@ -122,4 +126,14 @@ void-%-NETBOOT-$(DATECODE).tar.gz: void-%-ROOTFS-$(DATECODE).tar.xz mknet.sh
$(SUDO) ./mknet.sh void-$*-ROOTFS-$(DATECODE).tar.xz
@[ -n "${CI}" ] && printf '::endgroup::\n' || true

.PHONY: all checksum dist live-iso-all live-iso-all-print rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all
wsl-all: $(ALL_WSL)

wsl-all-print:
@echo $(ALL_WSL) | sed "s: :\n:g"

void-%-$(DATECODE).wsl: mkrootfs.sh
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
$(SUDO) ./mkrootfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) -b wsl-base -o $@ $*
@[ -n "${CI}" ] && printf '::endgroup::\n' || true

.PHONY: all checksum dist live-iso-all live-iso-all-print rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all wsl-all-print wsl-all