forked from od-contrib/commander
-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (92 loc) · 3.77 KB
/
linux_x86_64_appimage.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
name: Build Linux x86_64 AppImage
on: [push]
env:
BUILD_TYPE: Release
# AppImage directory
APP_DIR: ${{github.workspace}}/AppDir
jobs:
linux_appimage_x86_64_sdl1:
runs-on: ubuntu-18.04
steps:
- name: Install APT packages (build dependencies) - SDL1.2
run: sudo apt-get install -y -qq libsdl1.2-dev libsdl-image1.2-dev
- uses: actions/checkout@v2
- name: "CMake: Create Build Directory"
run: cmake -E make_directory ${{github.workspace}}/build
- name: "CMake: Configure for AppImage - SDL 1.2"
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPPU_X=2 -DPPU_Y=2 \
-DCMAKE_INSTALL_PREFIX=$APP_DIR/usr -DRES_DIR='"usr/share/commander/res/"' \
-DUSE_SDL2=OFF
- name: "CMake: Build"
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: "CMake: Install into AppImage scratch directory"
run: cmake --install build
- name: Download AppImage LinuxDeploy
working-directory: ${{github.workspace}}
run: |
wget --no-verbose https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && \
chmod +x linuxdeploy-x86_64.AppImage
- name: Package AppImage
working-directory: ${{github.workspace}}
shell: bash
run: |
./linuxdeploy-x86_64.AppImage --appimage-extract-and-run \
--appimage-extract-and-run \
--appdir="$APP_DIR" \
--custom-apprun=packaging/appimage/AppRun \
--desktop-file=packaging/commander.desktop \
--icon-file="${APP_DIR}/usr/share/icons/hicolor/32x32/apps/commander.png" \
--output=appimage
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: appimage-x86_64-sdl1
path: Commander-*.AppImage
linux_appimage_x86_64_sdl2:
# The vendored SDL_ttf version that we need requires SDL 2.0.10+,
# not available on older versions of Ubuntu.
runs-on: ubuntu-20.04
steps:
- name: Install APT packages (build dependencies) - SDL2
run: sudo apt-get install -y -qq libsdl2-dev libsdl2-image-dev
- uses: actions/checkout@v2
- name: "CMake: Create Build Directory"
run: cmake -E make_directory ${{github.workspace}}/build
- name: "CMake: Configure for AppImage - SDL2"
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPPU_X=2 -DPPU_Y=2 \
-DCMAKE_INSTALL_PREFIX=$APP_DIR/usr -DRES_DIR='"usr/share/commander/res/"'
- name: "CMake: Build"
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: "CMake: Install into AppImage scratch directory"
run: cmake --install build
- name: Download AppImage LinuxDeploy
working-directory: ${{github.workspace}}
run: |
wget --no-verbose https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && \
chmod +x linuxdeploy-x86_64.AppImage
- name: Package AppImage
working-directory: ${{github.workspace}}
shell: bash
run: |
./linuxdeploy-x86_64.AppImage --appimage-extract-and-run \
--appimage-extract-and-run \
--appdir="$APP_DIR" \
--custom-apprun=packaging/appimage/AppRun \
--desktop-file=packaging/commander.desktop \
--icon-file="${APP_DIR}/usr/share/icons/hicolor/32x32/apps/commander.png" \
--output=appimage
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: appimage-x86_64-sdl2
path: Commander-*.AppImage