build & release packages #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build & release packages | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: "0 7 1/30 * *" | |
workflow_dispatch: {} | |
jobs: | |
build: | |
name: "Build: ${{ matrix.script }} (${{ matrix.arch }})" | |
permissions: | |
actions: read | |
security-events: write | |
contents: write | |
runs-on: ${{ matrix.runs-on }} | |
continue-on-error: false | |
strategy: | |
matrix: | |
include: | |
- arch: x86_64 | |
platform: linux/amd64 | |
runs-on: ubuntu-24.04 | |
script: llvm-mini | |
- arch: x86_64 | |
platform: linux/amd64 | |
runs-on: ubuntu-24.04 | |
script: llvm-nano | |
- arch: aarch64 | |
platform: linux/arm64 | |
runs-on: ubuntu-24.04-arm | |
script: llvm-mini | |
- arch: aarch64 | |
platform: linux/arm64 | |
runs-on: ubuntu-24.04-arm | |
script: llvm-nano | |
- arch: x86_64 | |
platform: linux/amd64 | |
runs-on: ubuntu-24.04 | |
script: iculess-libxml2 | |
- arch: aarch64 | |
platform: linux/arm64 | |
runs-on: ubuntu-24.04-arm | |
script: iculess-libxml2 | |
- arch: x86_64 | |
platform: linux/amd64 | |
runs-on: ubuntu-24.04 | |
script: iculess-qt6base | |
- arch: aarch64 | |
platform: linux/arm64 | |
runs-on: ubuntu-24.04-arm | |
script: iculess-qt6base | |
- arch: x86_64 | |
platform: linux/amd64 | |
runs-on: ubuntu-24.04 | |
script: ffmpeg-mini | |
- arch: aarch64 | |
platform: linux/arm64 | |
runs-on: ubuntu-24.04-arm | |
script: ffmpeg-mini | |
container: | |
image: ghcr.io/pkgforge-dev/archlinux:latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: build | |
run: | | |
sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf | |
pacman -Syu --noconfirm \ | |
alsa-lib \ | |
base-devel \ | |
cmake \ | |
cups \ | |
curl \ | |
desktop-file-utils \ | |
double-conversion \ | |
freetds \ | |
git \ | |
gst-plugins-base-libs \ | |
gtk3 \ | |
icu \ | |
libb2 \ | |
libedit \ | |
libfbclient \ | |
libffi \ | |
libice \ | |
libinput \ | |
libpulse \ | |
libsm \ | |
libxkbcommon-x11 \ | |
libxml2 \ | |
mariadb-libs \ | |
md4c \ | |
mtdev \ | |
ncurses \ | |
ninja \ | |
pacman \ | |
patchelf \ | |
perl \ | |
postgresql \ | |
python-myst-parser \ | |
python-psutil \ | |
python-setuptools \ | |
python-sphinx \ | |
readline \ | |
strace \ | |
tslib \ | |
unixodbc \ | |
vulkan-headers \ | |
wget \ | |
xcb-util-cursor \ | |
xcb-util-image \ | |
xcb-util-keysyms \ | |
xcb-util-renderutil \ | |
xcb-util-wm \ | |
xdg-utils \ | |
xmlstarlet \ | |
zlib \ | |
zstd \ | |
amf-headers \ | |
avisynthplus \ | |
clang \ | |
ffnvcodec-headers \ | |
frei0r-plugins \ | |
ladspa \ | |
nasm \ | |
opencl-headers | |
export PATH="$PATH:/usr/bin/core_perl" | |
sudo sed -i -e 's|-O2|-Os|' \ | |
-e 's|DEBUG_CFLAGS="-g"|DEBUG_CFLAGS="-g0"|' \ | |
-e 's|-fno-omit-frame-pointer|-fomit-frame-pointer|' \ | |
-e 's|-mno-omit-leaf-frame-pointer||' \ | |
-e 's|-Wp,-D_FORTIFY_SOURCE=3||' \ | |
-e 's|-fstack-clash-protection||' \ | |
-e 's|MAKEFLAGS=.*|MAKEFLAGS="-j$(nproc)"|' \ | |
-e 's|#MAKEFLAGS|MAKEFLAGS|' /etc/makepkg.conf | |
cat /etc/makepkg.conf | |
echo "Hacking makepkg to allow building as root in the container..." | |
sudo sed -i 's|EUID == 0|EUID == 69|g' /usr/bin/makepkg | |
mkdir -p /usr/local/bin | |
cp /usr/bin/makepkg /usr/local/bin | |
chmod +x ./*.sh | |
sh ${{ matrix.script }}.sh | |
mkdir ./dist | |
sha256sum ./*.pkg.tar.* | |
mv ./*.pkg.tar.* ./dist | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ format('{0}-{1}', matrix.script, matrix.arch) }} | |
path: "dist" | |
release: | |
name: "release" | |
needs: [build] | |
permissions: | |
actions: read | |
security-events: write | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: llvm-mini-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: llvm-nano-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: llvm-mini-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: llvm-nano-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: iculess-libxml2-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: iculess-libxml2-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: iculess-qt6base-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: iculess-qt6base-x86_64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ffmpeg-mini-aarch64 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ffmpeg-mini-x86_64 | |
- name: release | |
uses: marvinpinto/[email protected] | |
with: | |
title: Continuous build | |
automatic_release_tag: continuous | |
prerelease: false | |
draft: false | |
files: | | |
*.pkg.tar.zst | |
*.pkg.tar.xz | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |