Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
holazt committed Feb 28, 2023
1 parent 7649fa0 commit 427f7ce
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 48 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,36 @@ on:

env:
PRODUCT: netease-cloud-music
VLC_VERSION: 3.0.16
VLC_VERSION: 3.0.18

jobs:
appimage-pack:
name: build appimage on ${{ matrix.config.name }}-${{ matrix.config.arch }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config:
- {
name: ubuntu-18.04,
name: ubuntu-22.04,
os: ubuntu,
symbol: bionic,
symbol: jammy,
arch: amd64,
image_repo: ubuntu
}
# - {
# name: debian-11,
# os: debian,
# symbol: bullseye,
# arch: amd64,
# image_repo: debian
# }
container:
image: ${{ matrix.config.image_repo }}:${{ matrix.config.symbol }}
options: -v ${{ github.workspace }}:/worker --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -73,34 +66,28 @@ jobs:
git \
python3 \
python3-pip
- name: Get pkg2appimage tool
shell: bash
run: |
cd /worker
wget -c https://github.com/$(wget -q https://github.com/AppImage/pkg2appimage/releases -O - \
| grep "pkg2appimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -O pkg2appimage
wget -c https://github.com/AppImageCommunity/pkg2appimage/releases/download/continuous/pkg2appimage-1807-x86_64.AppImage -O pkg2appimage
- name: Get appimagetool tool
shell: bash
run: |
cd /worker
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool
wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
- name: Prepare for building
shell: bash
run: |
chmod +x pkg2appimage
chmod +x /worker/scripts/services/*.sh
- name: Build AppImage(original)
shell: bash
run: |
/worker/pkg2appimage /worker/workspace/netease-cloud-music.yml
mkdir -p /worker/build/dist
cp /worker/out/*.AppImage /worker/build/dist
- name: Prepare for vlc build
shell: bash
run: |
Expand All @@ -114,17 +101,14 @@ jobs:
automake \
autopoint \
gettext
mkdir -p /worker/vlc-patch
wget -c https://get.videolan.org/vlc/${{ env.VLC_VERSION }}/vlc-${{ env.VLC_VERSION }}.tar.xz
tar -vxf vlc-${{ env.VLC_VERSION }}.tar.xz
- name: Patch vlc
shell: bash
run: |
cd vlc-${{ env.VLC_VERSION }}
patch -p1 < /worker/workspace/ncm-vlc.patch
- name: Build vlc with patch
shell: bash
run: |
Expand All @@ -142,7 +126,6 @@ jobs:
make DESTDIR=/worker/vlc-patch install
cd /worker
tar -czvf vlc-patch.tar.gz /worker/vlc-patch
- name: Build AppImage(vlc with patch)
shell: bash
run: |
Expand All @@ -153,24 +136,20 @@ jobs:
rm -rf /worker/appimage-patch/netease-cloud-music.AppDir/usr/lib/x86_64-linux-gnu/vlc
cp -r /worker/vlc-patch/usr/lib/vlc /worker/appimage-patch/netease-cloud-music.AppDir/usr/lib/x86_64-linux-gnu
/worker/appimagetool netease-cloud-music.AppDir
- name: Upload AppImage(vlc with patch)
run: |
bash $GITHUB_WORKSPACE/scripts/services/wetransfer.com.sh $GITHUB_WORKSPACE/appimage-patch/*.AppImage
- name: Upload AppImage(original)
run: |
bash $GITHUB_WORKSPACE/scripts/services/wetransfer.com.sh $GITHUB_WORKSPACE/build/dist/NetEase_Cloud_Music-*.*.AppImage
- name: Artifact(vlc with patch)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifact-vlc-patch
path: |
${{ github.workspace }}/appimage-patch/*.AppImage
- name: Artifact(original)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifact-original
path: |
Expand Down
41 changes: 24 additions & 17 deletions workspace/netease-cloud-music.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# doc, https://github.com/AppImageCommunity/pkg2appimage/blob/master/YML.md
# reference, https://github.com/AppImageCommunity/pkg2appimage/blob/master/recipes/wps-office.yml
app: netease-cloud-music
binpatch: true

ingredients:
dist: apricot
sources:
- deb http://mirrors.kernel.org/deepin/ apricot main non-free contrib
pretend:
# http://mirrors.kernel.org/deepin/pool/main/n/netease-cloud-music/
- netease-cloud-music 1.2.0.3-1
# http://mirrors.kernel.org/deepin/pool/main/c/cups/
- libcups2 2.3.0+deepin2.1-1+dde
# http://mirrors.kernel.org/deepin/pool/main/f/fcitx-qt5/
- fcitx-frontend-qt5 1.2.3.3-1
sources:
# altenative, deb http://mirrors.kernel.org/deepin/ apricot main non-free contrib
- deb https://community-packages.deepin.com/deepin/ apricot main non-free contrib
packages:
- netease-cloud-music
# https://community-packages.deepin.com/deepin/pool/main/g/glibc/
- libc6(>= 2.23)
# https://community-packages.deepin.com/deepin/pool/main/c/cups/
- libcups2
# https://community-packages.deepin.com/deepin/pool/main/f/fcitx-qt5/
- fcitx-frontend-qt5
script:
# - VERSION=1.2.0.3
# - wget -c http://d1.music.126.net/dmusic/netease-cloud-music_1.2.1_amd64_ubuntu_20190428.deb --trust-server-names
# - wget -c http://mirrors.163.com/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb --trust-server-names # Faster mirror for China mainland
# - wget -c http://mirror.math.princeton.edu/pub/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb --trust-server-names
# - wget -c http://mirrors.kernel.org/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb --trust-server-names
# - echo $VERSION > VERSION
# https://community-packages.deepin.com/deepin/pool/main/n/netease-cloud-music/
- netease-cloud-music
exclude:
# Workaround for: /lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined symbol: g_module_open_full
# https://github.com/AppImage/pkg2appimage/pull/500#issuecomment-997183221
# https://community-packages.deepin.com/deepin/pool/main/g/glib2.0/
- libglib2.0-0
# script:
# # - VERSION=1.2.0.3
# - wget -c http://d1.music.126.net/dmusic/netease-cloud-music_1.2.1_amd64_ubuntu_20190428.deb
# - wget -c http://mirrors.163.com/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb # Faster mirror for China mainland
# - wget -c http://mirror.math.princeton.edu/pub/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb
# - wget -c http://mirrors.kernel.org/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb
# - wget -c https://community-packages.deepin.com/deepin/pool/main/n/netease-cloud-music/netease-cloud-music_1.2.0.3-1_amd64.deb
# - echo $VERSION > VERSION

script:
# current directory: /worker/netease-cloud-music/netease-cloud-music.AppDir
Expand Down

0 comments on commit 427f7ce

Please sign in to comment.