-
Notifications
You must be signed in to change notification settings - Fork 33
124 lines (103 loc) · 3.37 KB
/
main.yml
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
name: Haskell Stack CI
on: [push]
jobs:
macos:
strategy:
matrix:
os:
- macos-12
- macos-13
- macos-14
- macos-15
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Stack
uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install Platypus
run: brew install --cask platypus
- name: Make Platypus CLI available
run: |
mv /Applications/Platypus.app/Contents/Resources/platypus_clt.gz .
tar -xvf platypus_clt.gz
mv platypus_clt /usr/local/bin/platypus
mkdir -p /usr/local/share/platypus
mv /Applications/Platypus.app/Contents/Resources/ScriptExec.gz /usr/local/share/platypus/
mv /Applications/Platypus.app/Contents/Resources/MainMenu.nib /usr/local/share/platypus/
cd /usr/local/share/platypus
tar -xvf ScriptExec.gz
- name: Print Platypus' version
run: platypus --version
- name: Install ImageMagick
run: brew install imagemagick
- name: Inject license keys
run:
sed -i ''
's/licenses = \[\]/licenses = \[${{ secrets.LICENSE_KEYS }}\]/'
source/Lib.hs
- name: Build Perspec App
run: make Perspec.app
- name: Move App to Artifact Directory
run: mkdir artifact && mv Perspec.app artifact
- name: Upload MacOS Release
uses: actions/upload-artifact@v4
with:
path: artifact
name: perspec-app_${{ matrix.os }}_x86_64
linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Stack
uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Add apt repository for libfuse2
run:
sudo add-apt-repository universe
- name: Install dependencies
run:
sudo apt-get install
freeglut3-dev
imagemagick
libfuse2
libgl1-mesa-dev
libglfw3
libglu1-mesa-dev
libxcursor-dev
libxi-dev
libxinerama-dev
libxrandr-dev
libxxf86vm-dev
- name: Download bundable ImageMagick AppImage
run:
curl -L -O
https://imagemagick.org/archive/binaries/magick &&
chmod +x ./magick
- name: Build Perspec CLI tool
run: make perspec
- name: Install AppImage
run:
curl -L -O
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage &&
chmod +x linuxdeploy-x86_64.AppImage
- name: Build AppImage
run:
./linuxdeploy-x86_64.AppImage
--executable $(which perspec)
--library /usr/lib/x86_64-linux-gnu/libglut.so.3
--library /usr/lib/x86_64-linux-gnu/libglfw.so.3
--appdir ./AppDir
--output appimage
--desktop-file ./.desktop
--icon-file $(pwd)/images/icon_padded_white_512.png &&
mv Perspec-*-x86_64.AppImage Perspec_x86_64.AppImage
- name: Upload Linux Release
uses: actions/upload-artifact@v4
with:
path: ./Perspec_x86_64.AppImage
name: Perspec_x86_64.AppImage