1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-21 14:22:45 +00:00

add setup script testing workflow

This commit is contained in:
Phantop 2024-10-25 12:18:45 -04:00
parent c83c7a5c17
commit 585b141b66
4 changed files with 74 additions and 1 deletions

33
.github/workflows/setup.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Test dotfiles run
on:
workflow_dispatch: # allow manual trigger
push:
branches:
- main
jobs:
setup: # try setting up user with setup script
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Install git on container and add user
run: |
pacman -Sy --noconfirm git sudo
pacman-key --init
useradd -m glados
echo 'glados ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/glados
- name: Checkout repo
uses: actions/checkout@v4
- name: Bump submodules
run: |
cp -r /__w/dotfiles/dotfiles /home/glados/.dotfiles
sudo -u glados /home/glados/.dotfiles/bin/setup
mkdwarfs -i /home/glados -o /home.dwarfs
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: home.dwarfs
path: /home.dwarfs

38
arch/dwarfs-universal Normal file
View file

@ -0,0 +1,38 @@
# Maintainer: phantop <phantop@tuta.io>
pkgname=dwarfs-universal
pkgver=0.10.1
pkgrel=1
pkgdesc='A fast high compression read-only file system (pre-compiled binaries)'
url='https://github.com/mhx/dwarfs'
source=("https://github.com/mhx/dwarfs/releases/download/v${pkgver}/dwarfs-${pkgver}-Linux-${CARCH}-clang.tar.xz"
"https://github.com/mhx/dwarfs/releases/download/v${pkgver}/dwarfs-universal-${pkgver}-Linux-${CARCH}-clang"
"https://github.com/mhx/dwarfs/raw/main/scripts/extract_blocks.py")
arch=('x86_64' 'aarch64')
license=('GPL3')
depends=( 'fuse3' )
conflicts=('dwarfs')
provides=('dwarfs')
package() {
install -Dm755 "${srcdir}/dwarfs-universal-${pkgver}-Linux-${CARCH}-clang" "${pkgdir}/usr/bin/dwarfsuniversal"
install -Dm755 "${srcdir}/extract_blocks.py" "${pkgdir}/usr/bin/dwarfsblocks"
ln -s dwarfsuniversal "${pkgdir}/usr/bin/dwarfsck"
ln -s dwarfsuniversal "${pkgdir}/usr/bin/dwarfsextract"
ln -s dwarfsuniversal "${pkgdir}/usr/bin/mkdwarfs"
ln -s dwarfsuniversal "${pkgdir}/usr/bin/dwarfs"
# mount will just run dwarfsuniversal otherwise
printf '#!/bin/sh\ndwarfs "$@"' > "${pkgdir}/usr/bin/mount.dwarfs"
chmod 755 "${pkgdir}/usr/bin/mount.dwarfs"
cd "${srcdir}/dwarfs-${pkgver}-Linux-${CARCH}-clang"
install -Dm644 share/man/man1/dwarfs.1 "$pkgdir/usr/share/man/man1/dwarfs.1"
install -Dm644 share/man/man1/dwarfsck.1 "$pkgdir/usr/share/man/man1/dwarfsck.1"
install -Dm644 share/man/man1/dwarfsextract.1 "$pkgdir/usr/share/man/man1/dwarfsextract.1"
install -Dm644 share/man/man1/mkdwarfs.1 "$pkgdir/usr/share/man/man1/mkdwarfs.1"
install -Dm644 share/man/man5/dwarfs-format.5 "$pkgdir/usr/share/man/man5/dwarfs-format.5"
}
# update by removing and running `makepkg -g >> PKGBUILD`
sha256sums=('SKIP'
'SKIP'
'SKIP')

View file

@ -14,8 +14,10 @@ printf "[dkp-linux]\nServer = https://pkg.devkitpro.org/packages/linux/\$arch/\n
echo permit :wheel | t /etc/doas.conf
p -Syu
xargs sudo pacman --noconfirm -S --needed < ~/.dotfiles/archpkgs
xargs sudo pacman --noconfirm -S --needed < ~/.dotfiles/arch/packages
yay -S pandoc-bin shellcheck-bin --noconfirm
cp ~/.dotfiles/arch/packages/dwarfs-universal /tmp/PKGBUILD
makepkg -sircD /tmp
chsh -s "$(grep -m1 bin/fish /etc/shells)"
echo kernel.core_pattern=/dev/null | t /etc/sysctl.d/50-coredump.conf