63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Test - Arch Linux AUR Package
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- feat/add-arch-linux-support
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate PKGBUILD
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
|
|
- name: Build and Test Package
|
|
timeout-minutes: 60
|
|
run: |
|
|
mkdir -p build-dir
|
|
cp PKGBUILD build-dir/
|
|
|
|
docker run --rm -v $PWD/build-dir:/pkg -w /pkg archlinux:latest /bin/bash -c "
|
|
pacman -Syu --noconfirm --needed base-devel rust git sudo cargo-audit
|
|
|
|
useradd -m builduser
|
|
chown -R builduser:builduser /pkg
|
|
echo 'builduser ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/builduser
|
|
|
|
sudo -u builduser makepkg -o --nobuild --nocheck --nodeps --noprepare
|
|
sudo -u builduser sh -lc 'cd /pkg/src/numa && cargo audit'
|
|
sudo -u builduser makepkg -s --noconfirm
|
|
"
|
|
|
|
dry-run-srcinfo:
|
|
name: Dry Run .SRCINFO
|
|
runs-on: ubuntu-latest
|
|
needs: validate
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
|
|
- name: Generate .SRCINFO Without Pushing
|
|
timeout-minutes: 30
|
|
run: |
|
|
mkdir -p aur-dry-run
|
|
cp PKGBUILD aur-dry-run/
|
|
cd aur-dry-run
|
|
|
|
docker run --rm -v $(pwd):/pkg -w /pkg archlinux:latest /bin/bash -c "
|
|
pacman -Syu --noconfirm --needed binutils git sudo rust
|
|
useradd -m builduser
|
|
chown -R builduser:builduser /pkg
|
|
sudo -u builduser makepkg -od --nocheck
|
|
sudo -u builduser makepkg --printsrcinfo > .SRCINFO
|
|
"
|
|
|
|
echo 'Generated .SRCINFO for dry-run validation:'
|
|
sed -n '1,120p' .SRCINFO
|