Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtrt committed Dec 26, 2023
1 parent 3b0ac1b commit ed0af0e
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 235 deletions.
65 changes: 27 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
# Build at 00:00 on every 12th day-of-month.
#schedule:
#- cron: "0 0 */12 * *"
# Triggers the workflow on push or pull request events but only for the test3 branch
# Triggers the workflow on push or pull request events but only for the test6 branch
push:
branches: [ test3 ]
branches: [ test6 ]
paths-ignore: [ '**/README.md' ]
pull_request:
branches: [ test3 ]
branches: [ test6 ]
paths-ignore: [ '**/README.md' ]

# Allows you to run this workflow manually from the Actions tab
Expand All @@ -21,56 +21,45 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

build-stable-4-i386:
# This workflow contains a single job called "build-devel"
build-devel:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Prerequisites
run: |
sudo apt update && sudo apt install libfuse2 -y
wget -q "https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.3/appimage-builder-1.0.3-x86_64.AppImage" -O appimage-builder ; chmod +x appimage-builder ; ./appimage-builder --appimage-extract &>/dev/null
mkdir -p /usr/share/icons/hicolor/scalable/ ; cp wine.svg /usr/share/icons/hicolor/scalable/
# wget -q "https://github.com/probonopd/static-tools/releases/download/continuous/mksquashfs-x86_64" -O squashfs-root/usr/bin/mksquashfs
cp runtime/mksquashfs squashfs-root/usr/bin/mksquashfs
rm appimage-builder ; sed -i 's|xz|zstd|' squashfs-root/usr/lib/python3.8/site-packages/appimagebuilder/modules/prime/appimage_primer.py
# stable
echo "WINE_VER=stable-i386_4.0.4" >> $GITHUB_ENV
# devel
if [ $(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/ | grep wine-devel | head -1 | grep -c ~rc) -gt 0 ]; then
echo "WINE_VER=devel_$(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/ | grep wine-devel | sed 's|_| |g;s|~| |2;s|~|-|' | awk '{print $5}' | tail -n1)" >> $GITHUB_ENV
else
echo "WINE_VER=devel_$(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/ | grep wine-devel | sed 's|_| |g;s|~| |g' | awk '{print $5}' | tail -n1)" >> $GITHUB_ENV
fi
# Runs a set of commands using the runners shell
- name: Build appimage
run: |
# add dir dist
mkdir dist
squashfs-root/AppRun --recipe wine-stable-4-i386.yml
mv *AppImage* dist/.
- name: Upload artifact
uses: actions/[email protected]
with:
name: wine-stable-4-i386-continuous-x86_64.AppImage
path: 'dist'
# add custom mksquashfs
cp runtime/mksquashfs squashfs-root/usr/bin/mksquashfs
release-stable-4-i386:
needs: [build-stable-4-i386]
runs-on: ubuntu-latest
# force zstd format in appimagebuilder for appimages
rm appimage-builder ; sed -i 's|xz|zstd|' squashfs-root/usr/lib/python3.8/site-packages/appimagebuilder/modules/prime/appimage_primer.py
steps:
- uses: actions/download-artifact@v1
with:
name: wine-stable-4-i386-continuous-x86_64.AppImage
squashfs-root/AppRun --recipe wine-devel.yml
- name: release
uses: marvinpinto/action-automatic-releases@latest
with:
title: test3 4.0.x i386
automatic_release_tag: test3
prerelease: false
draft: false
files: |
wine-stable-4-i386-continuous-x86_64.AppImage
repo_token: ${{ secrets.GITHUB_TOKEN }}
- name: release
uses: marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303
with:
title: test build wine v9.x.x
automatic_release_tag: test6
prerelease: false
draft: false
files: /home/runner/work/WINE_AppImage/WINE_AppImage/*.AppImage*
repo_token: ${{ secrets.GITHUB_TOKEN }}
160 changes: 160 additions & 0 deletions wine-devel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
version: 1

script:
# Remove any previous build cache data
- rm -rf AppDir appimage-builder-cache/var/cache/apt/archives/*wine* || true
- mkdir -p appimage-build/prime AppDir/winedata && cp wrapper AppDir
# Add winetricks
- wget -q "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" -P ./AppDir/bin && chmod +x ./AppDir/bin/winetricks
# Copy App icon to AppDir/usr/share/icons needed prior to appimage-builder ver 1.x.x
- mkdir -p AppDir/usr/share/icons ; cp wine.svg AppDir/usr/share/icons
# Add static appimage runtime
- cp runtime/runtime-x86_64 appimage-build/prime/runtime-x86_64
# Add config
- cp -R config AppDir/winedata

AppDir:
path: ./AppDir

app_info:
id: org.winehq.wine
name: wine
icon: wine
version: !ENV ${WINE_VER}
exec: bin/bash
exec_args: $APPDIR/wrapper $@

apt:
arch: [amd64, i386]
sources:
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse'
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse'
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
- sourceline: 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main'
key_url: 'https://dl.winehq.org/wine-builds/winehq.key'
# - sourceline: 'deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/ jammy main'
# key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xFCAE110B1118213C'
- sourceline: 'deb https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu jammy main'
key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf63f0f2b90935439'

include:
- wine-staging-i386=8.21~jammy-1
- wine-staging-amd64=8.21~jammy-1
- bash
- cabextract
- cups
- dash
- perl
- coreutils
- mesa-utils
- mesa-utils-bin
- vulkan-tools
- libmspack0

files:
exclude:
- sbin
- var
- etc/alternatives
- etc/apt
- etc/cron.daily
- etc/dpkg
- etc/mysql
- etc/sane.d
- etc/sensors.d
- etc/skel
- etc/snmp
- etc/udev
- etc/gss
- etc/init.d
- etc/logrotate.d
- lib/modprobe.d
- lib/systemd
- lib/udev
- usr/lib/mime
- usr/lib/sasl2
- usr/lib/tmpfiles.d
- usr/sbin
- usr/share/apps
- usr/share/man
- usr/share/doc
- usr/share/adduser
- usr/share/apport
- usr/share/bash-completion
- usr/share/bug
- usr/share/debconf
- usr/share/doc
- usr/share/doc-base
- usr/share/dpkg
- usr/share/glib-2.0
- usr/share/gst-plugins-base
- usr/share/hal
- usr/share/info
- usr/share/initramfs-tools
- usr/share/kde4
- usr/share/libgphoto2
- usr/share/lintian
- usr/share/menu
- usr/share/metainfo
- usr/share/mesa-demos
- usr/share/mime
- usr/share/misc
- usr/share/mysql-common
- usr/share/pixmaps
- usr/share/pkgconfig
- usr/share/polkit-1
- usr/share/snmp
- usr/share/zoneinfo
- usr/share/zoneinfo-icu
- usr/share/zsh
- opt/wine-staging
- opt/wine-devel/share/man
- opt/wine-devel/share/applications
- opt/wine-devel/lib/wine/i386-unix/*.a
- opt/wine-devel/lib/wine/i386-windows/*.a
- opt/wine-devel/lib64/wine/x86_64-unix/*.a
- opt/wine-devel/lib64/wine/x86_64-windows/*.a

after_bundle:
# this is executed after the packages and files are added
- |
# Patch wrapper script
sed -i 's|wine-appimage|wine-appimage-devel|' AppDir/wrapper
# Check for rc builds
if [ $(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/ | grep wine-devel | tail -n1 | grep -c ~rc) -gt 0 ]; then
WINE_VER="$(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/ | grep wine-devel | sed 's|_| |g;s|~| |2' | awk '{print $5}' | tail -n1)"
else
WINE_VER="$(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/ | grep wine-devel | sed 's|_| |g;s|~| |g' | awk '{print $5}' | tail -n1)"
fi
wget -q -c https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-i386/wine-devel_${WINE_VER}~jammy-1_i386.deb
wget -q -c https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-i386/wine-devel-i386_${WINE_VER}~jammy-1_i386.deb
wget -q -c https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/wine-devel_${WINE_VER}~jammy-1_amd64.deb
wget -q -c https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/main/binary-amd64/wine-devel-amd64_${WINE_VER}~jammy-1_amd64.deb
dpkg -x "wine-devel_${WINE_VER}~jammy-1_i386.deb" AppDir/
dpkg -x "wine-devel-i386_${WINE_VER}~jammy-1_i386.deb" AppDir/
dpkg -x "wine-devel_${WINE_VER}~jammy-1_amd64.deb" AppDir/
dpkg -x "wine-devel-amd64_${WINE_VER}~jammy-1_amd64.deb" AppDir/
(cd AppDir/usr/bin; ln -s "../../opt/wine-devel/bin/"* .)
# Cleanup
rm -rf AppDir/usr/share/{applications,man,doc}
rm -rf AppDir/opt/wine-devel/share/{applications,man,doc}
rm -rf AppDir/opt/wine-devel/lib/wine/i386-unix/*.a
rm -rf AppDir/opt/wine-devel/lib/wine/i386-windows/*.a
rm -rf AppDir/opt/wine-devel/lib64/wine/x86_64-unix/*.a
rm -rf AppDir/opt/wine-devel/lib64/wine/x86_64-windows/*.a
runtime:
env:
APPDIR_LIBC_VERSION: '2.38'

path_mappings:
- /opt/wine-devel:$APPDIR/opt/wine-devel

AppImage:
update-information: gh-releases-zsync|mmtrt|WINE_AppImage|test6|wine-devel*.AppImage.zsync
#sign-key: None
arch: x86_64

Loading

0 comments on commit ed0af0e

Please sign in to comment.