-
Notifications
You must be signed in to change notification settings - Fork 2
134 lines (126 loc) · 4.44 KB
/
appimage.yml
File metadata and controls
134 lines (126 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Anylinux-AppImage
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
env:
VERSION: beta-0.${{ github.run_number }}
on:
push:
branches:
- main
schedule:
- cron: "0 7 1/21 * *" # We default to rebuilding every 21 days, change this to your liking
workflow_dispatch: {}
jobs:
build-prebuild-glibc:
name: Build prebuild glibc
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- uses: actions/checkout@v5
- name: Install build tools
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get install -y build-essential python3 gcc-10 g++-10 curl
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
- name: build AM-GUI
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install 22
node -v
npm -v
npm install --ignore-scripts
npx electron-rebuild --force
- name: Upload prebuild
uses: actions/upload-artifact@v5
with:
name: prebuild-glibc
path: node_modules/@homebridge/node-pty-prebuilt-multiarch/build/Release/pty.node
build-prebuild-musl:
name: Build prebuild musl
runs-on: ubuntu-latest
container: node:22-alpine
steps:
- uses: actions/checkout@v5
- name: Install build tools
run: apk add --no-cache python3 make g++ linux-headers
- name: build AM-GUI
run: |
npm install --ignore-scripts
npx electron-rebuild --force
- name: Upload prebuild
uses: actions/upload-artifact@v5
with:
name: prebuild-musl
path: node_modules/@homebridge/node-pty-prebuilt-multiarch/build/Release/pty.node
build:
name: "${{ matrix.name }} (${{ matrix.arch }})"
runs-on: ${{ matrix.runs-on }}
needs: [build-prebuild-glibc, build-prebuild-musl]
strategy:
matrix:
include:
- runs-on: ubuntu-latest
name: Build AppImage
arch: x86_64
# comment out these 3 lines if aarch64 is not wanted
# - runs-on: ubuntu-24.04-arm
# name: Build AppImage
# arch: aarch64
container: ghcr.io/pkgforge-dev/archlinux:latest
steps:
- uses: actions/checkout@v5
- name: Preparing Container
uses: pkgforge-dev/anylinux-setup-action@8872fabe63f9a00b35e25b2f46da62a05afc9a7d # v1
- name: Setup Node
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install 22
node -v
npm -v
npm install
npx patch-package
- name: Download prebuilds glibc
uses: actions/download-artifact@v5
with:
name: prebuild-glibc
path: temp-glibc
- name: Download prebuilds musl
uses: actions/download-artifact@v5
with:
name: prebuild-musl
path: temp-musl
- name: Place prebuilds
run: |
rm -rf node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds
mkdir -p node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/linux-x64
cp temp-glibc/pty.node node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/linux-x64/pty.node
cp temp-musl/pty.node node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/linux-x64/pty-musl.node
- name: Run dist
run: |
. "$HOME/.nvm/nvm.sh"
npm run dist
- name: Install Dependencies
run: /bin/sh ./scripts/get-dependencies.sh
- name: Make AppImage
run: /bin/sh ./scripts/make-appimage.sh
- name: Upload artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: AppImage-${{ matrix.arch }}
path: dist
release:
if: ${{ github.ref_name == 'main' }}
needs: [build]
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
pattern: AppImage-*
merge-multiple: true
- name: Release AppImage
uses: pkgforge-dev/make-stable-appimage-release@4ed3d48ccb065352b6e6c0db6d39885b201c54a0 #v1.1