Skip to content

Commit

Permalink
WIP download + build beta image
Browse files Browse the repository at this point in the history
Also tag images based on version
  • Loading branch information
ian-h-chamberlain committed Sep 20, 2023
1 parent 4cb1032 commit 0838e27
Show file tree
Hide file tree
Showing 8 changed files with 876 additions and 29 deletions.
85 changes: 65 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,103 @@ name: Build Holo Docker images
on:
workflow_dispatch:
push:
branches:
- main
# branches:
# - main

jobs:
build:
name: Build
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- variant: release
- variant: beta

# TODO: what the heck is the difference between beta, bc, staging, rc?
# Also what is the difference between snapshot and numbered versions?
# Should we support all those different types, or what?

continue-on-error: ${{ matrix.variant != 'release' }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0


# HACK: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Clean up unused runner software for disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Login to GitHub Container Registry
run: |
echo $GITHUB_TOKEN | docker login ghcr.io -u SteamDeckHomebrew --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u ian-h-chamberlain --password-stdin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download SteamOS
run: ./download.sh
env:
VARIANT: ${{ matrix.variant == 'release' && 'steamdeck' || format('steamdeck-{0}', matrix.variant) }}

- name: Build base image
run: sudo ./build.sh
run: df -h && sudo -E ./build.sh; df -h
env:
REPO: ${{ matrix.variant == 'release' && 'rel' || matrix.variant }}
TAG: ${{ matrix.variant }}

- name: Get built image version
id: version
run: |
docker run ghcr.io/ian-h-chamberlain/holo-base:${{ matrix.variant }} \
cat /etc/os-release >> $GITHUB_OUTPUT
- name: Cleanup SteamOS image
run: rm -rf ./steamos_image ./steamos

- name: Build Rust toolchain image
run: |
cd languages
docker build -t ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest -f ./rust.dockerfile .
# - name: Build Rust toolchain image
# run: |
# cd languages
# docker build -t ghcr.io/ian-h-chamberlain/holo-toolchain-rust:latest -f ./rust.dockerfile .

- name: Build Go toolchain image
run: |
cd languages
docker build -t ghcr.io/steamdeckhomebrew/holo-toolchain-go:latest -f ./go.dockerfile .
# - name: Build Go toolchain image
# run: |
# cd languages
# docker build -t ghcr.io/ian-h-chamberlain/holo-toolchain-go:latest -f ./go.dockerfile .

- name: Wait for other runs to complete
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Push Base image
run: docker push ghcr.io/steamdeckhomebrew/holo-base:latest
- name: Tag latest Base image
if: matrix.variant == 'release'
run: |
docker tag ghcr.io/ian-h-chamberlain/holo-base:${{ matrix.variant }} \
ghcr.io/ian-h-chamberlain/holo-base:latest
- name: Tag + push Base image
run: |
docker tag ghcr.io/ian-h-chamberlain/holo-base:${{ matrix.variant }} \
ghcr.io/ian-h-chamberlain/holo-base:${{ steps.version.outputs.VERSION_ID }}
docker tag ghcr.io/ian-h-chamberlain/holo-base:${{ matrix.variant }} \
ghcr.io/ian-h-chamberlain/holo-base:${{ steps.version.outputs.BUILD_ID }}
docker push --all-tags ghcr.io/ian-h-chamberlain/holo-base
- name: Push Rust toolchain image
run: docker push ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest
# - name: Push Rust toolchain image
# run: docker push ghcr.io/ian-h-chamberlain/holo-toolchain-rust:latest

- name: Push Go toolchain image
run: docker push ghcr.io/steamdeckhomebrew/holo-toolchain-go:latest
# - name: Push Go toolchain image
# run: docker push ghcr.io/ian-h-chamberlain/holo-toolchain-go:latest

- name: Log out of GitHub Container Registry
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
steamos
steamos_image
steamos_image
steamos.zip
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ FROM scratch as builder
ADD ./steamos /
ADD ./steamos/usr/share/factory /

# not removing libcroco holo-desync holo-keyring holo-pacman holo-pipewire holo-sudo holo-wireplumber elfutils
RUN pacman -R --noconfirm accounts-qml-module accountsservice adobe-source-code-pro-fonts adwaita-icon-theme alsa-card-profiles alsa-lib alsa-plugins alsa-topology-conf alsa-ucm-conf alsa-utils amd-ucode anthy aom appstream appstream-glib appstream-qt arch-install-scripts archlinux-appstream-data ark aspell aspell-en assimp atkmm at-spi2-core attica avahi baloo baloo-widgets bash-bats bash-completion bluedevil bluez bluez-libs bluez-plugins bluez-qt bluez-utils bolt boost-libs breeze breeze-grub breeze-gtk breeze-icons btop btrfs-progs bubblewrap cairo cairomm cantarell-fonts caps casync-git cdparanoia cfitsio cifs-utils clang-libs convertlit cpio cpupower dav1d dbus-glib dbus-python dconf desktop-file-utils desync-git discount discover djvulibre dmidecode dmraid dnssec-anchors dolphin dos2unix dosfstools double-conversion dracut drkonqi ebook-tools editorconfig-core-c efibootmgr efivar ell enchant evtest exfat-utils exiv2 f3 fatresize fd ffmpeg fish flac flashrom flatpak fontconfig frameworkintegration freeglut freerdp freetype2 fribidi fuse2 fuse3 fuse-common fwupd gamemode gamescope gcab gdb gdb-common gdk-pixbuf2 geoclue geocode-glib giflib git ghostscript glew glfw-x11 glibmm glib-networking glslang glu gobject-introspection-runtime gpm gptfdisk gpu-trace graphene graphite grub gsettings-desktop-schemas gsm gst-plugins-base gst-plugins-base-libs drm_info gstreamer gtk3 gtkmm3 gtk-update-icon-cache gwenview harfbuzz hicolor-icon-theme hidapi htop hunspell ibus ibus-anthy ibus-hangul ibus-pinyin ibus-table ibus-table-cangjie-lite iniparser iotop iso-codes iw iwd jasper jbig2dec jq json-glib jupiter-dock-updater-bin jupiter-fan-control jupiter-hw-support jupiter-legacy-support kaccounts-integration kactivities kactivities-stats kactivitymanagerd karchive kate kauth kbookmarks kcmutils kcodecs kcolorpicker kcompletion kconfig kconfigwidgets kcontacts kcoreaddons kcrash kdbusaddons kdeclarative kde-cli-tools kdeconnect kdecoration kded kde-gtk-config kdelibs4support kdeplasma-addons kdesu kdialog kdnssd kdsoap kdsoap-ws-discovery-client kdump-steamos kemoticons kfilemetadata kgamma5 kglobalaccel kguiaddons kholidays khotkeys ki18n kiconthemes kidletime kimageannotator kinfocenter kio kio-extras kio-fuse kirigami2 kitemmodels kitemviews kitty-terminfo kjobwidgets kjs kmenuedit knewstuff knotifications knotifyconfig konsole kpackage kparts kpeople kpeoplevcard kpipewire kpmcore kpty kquickcharts krunner kscreen kscreenlocker kservice ksshaskpass ksystemstats ktexteditor ktextwidgets kunitconversion kuserfeedback kwallet kwallet-pam kwayland kwayland-integration kwidgetsaddons kwin kwindowsystem kwrited kxmlgui lame layer-shell-qt lcms2 ldb ldns lib32-alsa-lib lib32-alsa-plugins lib32-brotli lib32-bzip2 lib32-curl lib32-dbus lib32-e2fsprogs lib32-expat lib32-flac lib32-fontconfig lib32-freetype2 lib32-gamemode lib32-gcc-libs lib32-glib2 lib32-glibc lib32-harfbuzz lib32-icu lib32-keyutils lib32-krb5 lib32-libasyncns lib32-libcap lib32-libdrm lib32-libelf lib32-libffi lib32-libgcrypt lib32-libglvnd lib32-libgpg-error lib32-libice lib32-libidn2 lib32-libldap lib32-libnm lib32-libogg lib32-libpciaccess lib32-libpng lib32-libpsl lib32-libpulse lib32-libsm lib32-libsndfile lib32-libssh2 lib32-libtasn1 lib32-libtirpc lib32-libunistring lib32-libunwind lib32-libva lib32-libva-mesa-driver lib32-libvdpau lib32-libvorbis lib32-libx11 lib32-libxau lib32-libxcb lib32-libxcrypt lib32-libxdamage lib32-libxdmcp lib32-libxext lib32-libxfixes lib32-libxi lib32-libxinerama lib32-libxml2 lib32-libxshmfence lib32-libxss lib32-libxtst lib32-libxxf86vm lib32-llvm-libs lib32-lm_sensors lib32-mangohud lib32-mesa lib32-mesa-vdpau lib32-ncurses lib32-nspr lib32-nss lib32-openal lib32-openssl lib32-opus lib32-p11-kit lib32-pam lib32-pcre2 lib32-pipewire lib32-sqlite lib32-systemd lib32-util-linux lib32-vulkan-icd-loader lib32-vulkan-radeon lib32-wayland lib32-xz lib32-zlib lib32-zstd libaccounts-glib libaccounts-qt libaio libass libasyncns libatasmart libavc1394 libblockdev libbluray libbs2b libbsd libbytesize libcanberra libclc libcloudproviders libcolord libcups libdaemon libdatrie libdbusmenu-qt5 libdmtx libedit libepoxy libevdev libfakekey libfdk-aac libfontenc libfreeaptx libftdi libglvnd libgssglue libgudev libgusb libhangul libibus libical libice libiec61883 libimobiledevice libinih libinput libjcat libjpeg-turbo libkdcraw libkexiv2 libkscreen libksysguard libldac libmbim libmd libmfx libmm-glib libmodplug libmtp libndp libnewt libnm libnotify libogg libomxil-bellagio libspectre libdrm ds-inhibit libpciaccess libpgm libpipeline libplist libpng libproxy libpulse libqaccessibilityclient libqalculate libqmi libqrtr-glib libraw libraw1394 librsvg libsamplerate libsigc++ libsm libsndfile libsodium libsoup libsoup3 libsoxr libssh libstemmer libteam libthai libtheora libtiff libtommath libtraceevent libtracefs libunwind liburcu libusb libusbmuxd libutempter libva libva-intel-driver libva-mesa-driver libvdpau libvisual libvorbis libvpx libwacom libwebp libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxi libxinerama libxkbcommon libxkbcommon-x11 libxkbfile libxmlb libxmu libxpm libxrandr libxrender libxres libxshmfence libxslt libxss libxt libxtst libxv libxxf86vm libyaml libzip lilv linux-firmware-neptune linux-neptune llvm-libs lmdb lm_sensors lsb-release l-smash lsof lua luit lv2 lvm2 lzo maliit-framework maliit-keyboard man-db mangohud md4c mdadm media-player-info mesa mesa-utils mesa-vdpau milou minizip mobile-broadband-provider-info modemmanager modemmanager-qt mtdev nano ndctl nethogs networkmanager networkmanager-qt noise-suppression-for-voice noto-fonts noto-fonts-cjk nspr nss nss-mdns ntfs-3g numactl nvme-cli ocl-icd okular oniguruma openal opencl-mesa opencore-amr openjpeg2 openssh openvpn opus orc ostree oxygen p7zip pango pangomm parted partitionmanager paru pavucontrol pcsclite perf perl-error perl-mailtools perl-timedate phonon-qt5 phonon-qt5-gstreamer pipewire pipewire-alsa pipewire-audio pipewire-jack pipewire-pulse pixman pkcs11-helper plasma-browser-integration plasma-desktop plasma-disks plasma-firewall plasma-framework plasma-integration plasma-meta plasma-nm plasma-pa plasma-systemmonitor plasma-thunderbolt plasma-vault plasma-wayland-protocols plasma-wayland-session plasma-workspace plasma-workspace-wallpapers plymouth polkit polkit-kde-agent polkit-qt5 poppler poppler-qt5 powerdevil powertop ppp presage prison pulseaudio-qt purpose python-aiohttp python-aiosignal python-async-timeout python-attrs python-chardet python-charset-normalizer python-click python-crcmod python-evdev python-frozenlist python-gobject python-hid python-idna python-multidict python-progressbar python-psutil python-pyaml python-pyenchant python-pyinotify python-semantic-version python-systemd python-sysv_ipc python-typing_extensions python-utils python-yaml python-yarl pyzy qca-qt5 qqc2-desktop-style qrencode qt5-base qt5-declarative qt5-feedback qt5-graphicaleffects qt5-location qt5-multimedia qt5-quickcontrols qt5-quickcontrols2 qt5-sensors qt5-speech qt5-svg qt5-tools qt5-translations qt5-wayland qt5-webchannel qt5-webengine qt5-webview qt5-x11extras rauc rav1e re2 ripgrep rsync rtkit rxvt-unicode-terminfo sbc sddm-kcm sddm-wayland sdl2 seatd serd shared-mime-info signond signon-kwallet-extension signon-plugin-oauth2 signon-ui slang smartmontools smbclient snappy socat solid sonnet sord sound-theme-freedesktop source-highlight spectacle speex speexdsp squashfs-tools sratom srt sshfs steamdeck-kde-presets steam-im-modules steam-jupiter-stable steamos-atomupd-client-git steamos-customizations-jupiter steamos-devkit-service steamos-efi strace svt-av1 syndication syntax-highlighting sysfsutils systemd-swap systemsettings taglib talloc tcl tdb tevent thin-provisioning-tools threadweaver tk trace-cmd tracker3 tree tslib ttf-dejavu ttf-hack ttf-twemoji-default udisks2 unrar unzip upower usbmuxd usbutils v4l-utils vid.stab vim vim-runtime vkmark-git vmaf volume_key vpower vulkan-icd-loader vulkan-radeon vulkan-tools wayland wayland-utils webrtc-audio-processing wget wireless-regdb wireless_tools wireplumber wpa_supplicant x264 x265 xbindkeys xbitmaps xcb-proto xcb-util xcb-util-cursor xcb-util-errors xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xdg-dbus-proxy xdg-desktop-portal xdg-desktop-portal-kde xdg-user-dirs xdg-utils xdotool xf86-input-libinput xf86-video-amdgpu xfsprogs xkeyboard-config xorg-fonts-encodings xorgproto xorg-server xorg-server-common xorg-setxkbmap xorg-xauth xorg-xdpyinfo xorg-xhost xorg-xkbcomp xorg-xmessage xorg-xprop xorg-xrandr xorg-xrdb xorg-xset xorg-xsetroot xorg-xwayland-jupiter xorg-xwininfo xterm xvidcore xxhash zenity-light zeromq zimg zip zsh zxing-cpp renderdoc-minimal lib32-renderdoc-minimal lib32-xcb-util-keysyms \
&& sed -r -i 's/\[(jupiter|core|extra|community|multilib|holo)\]/\[\1-rel\]/g' /etc/pacman.conf \
COPY ./packagelists/removed-packages.txt /tmp/

ARG VERSION=rel
COPY ./packagelists/removed-${VERSION}.txt /tmp/

RUN grep --no-filename --invert --extended-regexp '^#' -- /tmp/removed-*.txt \
| xargs pacman --noconfirm -R

RUN sed -r -i 's/\[(jupiter|core|extra|community|multilib|holo)\]/\[\1-${VERSION}\]/g' /etc/pacman.conf \
&& pacman-key --init \
&& pacman-key --populate archlinux \
&& pacman-key --populate holo \
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eux

LOOP=$(losetup --find --partscan --show ./steamos_image/disk.img)
mkdir -p ./steamos
Expand All @@ -10,6 +10,6 @@ unmountimg() {
}
trap unmountimg ERR

docker build -t ghcr.io/steamdeckhomebrew/holo-base:latest .
docker build --build-arg=REPO="${REPO:=rel}" -t "ghcr.io/ian-h-chamberlain/holo-base:${TAG:=latest}" .

unmountimg
22 changes: 19 additions & 3 deletions download.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
#!/bin/sh
set -e
set -eux

VARIANT=${VARIANT:="steamdeck"}
BUILD_ID=${BUILD_ID:="20220526.1"}

# these are hardcoded and can be found in ~/.netrc
AUTH="jupiter-image-2021:e54fe7f0-756e-46e1-90d2-7843cda0ac01"
FILE=$(curl -sS --user $AUTH "https://steamdeck-atomupd.steamos.cloud/updates?product=steamos&release=holo&variant=steamdeck&arch=amd64&version=snapshot&buildid=20220526.1&checkpoint=False&estimated_size=0" | jq -r ".minor.candidates[0].update_path" | sed 's/\.raucb/\.img.zip/')
FILE="$(
curl -sS -w "\n" --user $AUTH 'https://steamdeck-atomupd.steamos.cloud/updates' \
--url-query "product=steamos" \
--url-query "release=holo" \
--url-query "arch=amd64" \
--url-query "version=snapshot" \
--url-query "variant=$VARIANT" \
--url-query "buildid=$BUILD_ID" \
--url-query "checkpoint=False" \
--url-query "estimated_size=0" \
| tee /dev/stderr \
| jq -r ".minor.candidates[0].update_path" \
| sed 's/\.raucb/\.img.zip/'
)"
echo "Downloading image $FILE"
curl --user $AUTH "https://steamdeck-images.steamos.cloud/$FILE" -o ./steamos.zip
unzip ./steamos.zip -d ./steamos_image
rm ./steamos.zip
rm ./steamos.zip
5 changes: 5 additions & 0 deletions packagelists/removed-beta.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This attempts to find the equivalents of everything in removed-rel.txt,
# which isn't much, for now
linux-neptune-61
casync
desync
Loading

0 comments on commit 0838e27

Please sign in to comment.