-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (116 loc) · 3.83 KB
/
build.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Build with CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build_ubuntu_noble:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libglfw3-dev libopengl-dev cppcheck
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
${{github.workspace}}/build/tsor --help
- uses: actions/upload-artifact@v4
name: Upload artifact
with:
name: tsor_ubuntu_noble_amd64
path: ${{github.workspace}}/build/tsor
build_ubuntu_jammy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libglfw3-dev libopengl-dev cppcheck
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
${{github.workspace}}/build/tsor --help
- uses: actions/upload-artifact@v4
name: Upload artifact
with:
name: tsor_ubuntu_jammy_amd64
path: ${{github.workspace}}/build/tsor
build_ubuntu_focal:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libglfw3-dev libopengl-dev cppcheck
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
${{github.workspace}}/build/tsor --help
- uses: actions/upload-artifact@v4
name: Upload artifact
with:
name: tsor_ubuntu_focal_amd64
path: ${{github.workspace}}/build/tsor
build_appimage:
runs-on: ubuntu-22.04
needs: [build_ubuntu_noble, build_ubuntu_jammy, build_ubuntu_focal]
steps:
- uses: actions/checkout@v4
name: Get recipe
with:
sparse-checkout: |
AppImage.yml
docs/tsor.svg
sparse-checkout-cone-mode: false
path: ${{github.workspace}}/tsor
- uses: actions/checkout@v4
name: Get appimage-builder
with:
repository: 'AppImageCrafters/appimage-builder'
ref: '61c8ddde9ef44b85d7444bbe79d80b44a6a5576d'
path: ${{github.workspace}}/appimage-builder
- uses: actions/download-artifact@v4
name: Download focal build
with:
name: tsor_ubuntu_focal_amd64
path: ${{github.workspace}}/AppDir
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install patchelf zsync
pip install ${{github.workspace}}/appimage-builder
- name: Build AppImage
run: |
mkdir -p ${{github.workspace}}/AppDir/usr/share/icons
cp ${{github.workspace}}/tsor/docs/tsor.svg ${{github.workspace}}/AppDir/usr/share/icons/tsor.svg
chmod +x ${{github.workspace}}/AppDir/tsor
appimage-builder --recipe ${{github.workspace}}/tsor/AppImage.yml
chmod +x ${{github.workspace}}/tsor-latest-x86_64.AppImage
- uses: actions/upload-artifact@v4
name: Upload artifact
with:
name: tsor-latest-x86_64.AppImage
path: ${{github.workspace}}/tsor-latest-x86_64.AppImage