Skip to content

Commit

Permalink
chore: fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Mufanc committed Dec 10, 2023
1 parent 17f1ad2 commit 1c1ddde
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build CI

on:
push:
branches: [ master ]
branches: [ archlinux ]
paths-ignore:
- '**.md'
workflow_dispatch:
Expand All @@ -19,12 +19,8 @@ jobs:
with:
fetch-depth: 0

- name: Repack Linux-QQ
run: make

- name: Upload Artifact
if: success()
uses: actions/upload-artifact@v3
- name: Setup ArchLinux
uses: docker://archlinux:latest
with:
name: LinuxQQ-patched.deb
path: LinuxQQ-patched.deb
entrypoint: /bin/bash
args: .github/workflows/scripts/ci.sh
13 changes: 13 additions & 0 deletions .github/workflows/scripts/ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -ex

pacman -Syu --noconfirm --needed base-devel rustup pacman-contrib

rustup toolchain install stable
rustup toolchain install nightly

chmod -R a+rw .
useradd builder -m && echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

sudo -u builder BUILDARGS="--syncdeps --noconfirm" make
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
set -ex

export SOURCE=$(curl -s https://im.qq.com/rainbow/linuxQQDownload/ | grep -Eo '"deb":"[^"]+"' | grep -Eo 'https://.*_amd64\.deb')
export PKGVER=$(echo "$SOURCE" | awk -F "linuxqq_|-" '{print $2}')
export PKGROOT=$(realpath "$(dirname "$0")")

envsubst "$(env | grep -Po '^[A-Z_]+(?==)' | sed 's/^/$/g')" < PKGBUILD.proto > PKGBUILD
updpkgsums
makepkg -f

# shellcheck disable=SC2086
makepkg -f $BUILDARGS

0 comments on commit 1c1ddde

Please sign in to comment.