-
Notifications
You must be signed in to change notification settings - Fork 0
180 lines (160 loc) · 6.12 KB
/
linux.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: Linux Build
on:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
- '.github/workflows/windows.yml'
env:
FREEALUT_VERSION: 1.1.0
OPENAL_VERSION: 1.23.1
SBCL_VERSION: 2.4.10
SDL_VERSION: 2.0.12
jobs:
build:
#if: ${{ false }} # disable for now
runs-on: ubuntu-20.04 # 20.04 glibc 2.31 - 22.10 glibc 2.36
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: APT deps
run: |
sudo apt-get update
sudo apt-get install -y libassimp5 sbcl libzstd-dev
- name: mkdir
run: |
mkdir -pv ~/Downloads
mkdir -pv ~/sbcl
mkdir -pv ~/quicklisp
mkdir -pv ~/.cache/common-lisp
shell: bash
- name: Cache SBCL Setup
id: cache
uses: actions/cache@v4
env:
cache-name: cache-sbcl-compressed-sdl
with:
path: |
~/Downloads/
~/quicklisp
~/.cache/common-lisp/
~/sbcl
key: "${{ env.SBCL_VERSION }}-${{ env.cache-name }}-${{ runner.os }}"
- name: Restore Path To Cached Files
run: |
echo $HOME/sbcl/bin >> $GITHUB_PATH
if: steps.cache.outputs.cache-hit == 'true'
# I believe I do this to have it less dynlink than ubuntu's default
- name: Build SDL ${{ env.SDL_VERSION }}
run: |
cd ~/Downloads
wget https://www.libsdl.org/release/SDL2-${{ env.SDL_VERSION }}.tar.gz
tar xzf SDL2-${{ env.SDL_VERSION }}.tar.gz
cd SDL2-${{ env.SDL_VERSION }}
./configure
make
if: steps.cache.outputs.cache-hit != 'true'
- name: Install SDL ${{ env.SDL_VERSION }}
run: |
cd ~/Downloads/SDL2-${{ env.SDL_VERSION }}
sudo make install prefix=/usr
# Ubuntu's version links OpenAL with libsndio.so
- name: Build OpenAL ${{ env.OPENAL_VERSION }}
run: |
cd ~/Downloads
wget https://openal-soft.org/openal-releases/openal-soft-${{ env.OPENAL_VERSION }}.tar.bz2
tar xjf openal-soft-${{ env.OPENAL_VERSION }}.tar.bz2
cd openal-soft-${{ env.OPENAL_VERSION }}
cd build
cmake --install-prefix=/usr -DALSOFT_EXAMPLES=OFF ..
make
if: steps.cache.outputs.cache-hit != 'true'
- name: Install OpenAL ${{ env.OPENAL_VERSION }}
run: |
cd ~/Downloads/openal-soft-${{ env.OPENAL_VERSION }}/build
sudo make install
# Just building it because this builds against OpenAL
- name: Build Freealut ${{ env.FREEALUT_VERSION }}
run: |
cd ~/Downloads
wget http://deb.debian.org/debian/pool/main/f/freealut/freealut_${{ env.FREEALUT_VERSION }}.orig.tar.gz
tar xzf freealut_${{ env.FREEALUT_VERSION }}.orig.tar.gz
cd freealut-${{ env.FREEALUT_VERSION }}
sh autogen.sh
./configure
make
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Freealut ${{ env.FREEALUT_VERSION }}
run: |
cd ~/Downloads/freealut-${{ env.FREEALUT_VERSION }}
sudo make install prefix=/usr
- name: Download SBCL ${{ env.SBCL_VERSION }}
run: |
cd ~/Downloads
wget http://downloads.sourceforge.net/project/sbcl/sbcl/${{ env.SBCL_VERSION }}/sbcl-${{ env.SBCL_VERSION }}-source.tar.bz2
tar xjf sbcl-${{ env.SBCL_VERSION }}-source.tar.bz2
if: steps.cache.outputs.cache-hit != 'true'
- name: Install SBCL ${{ env.SBCL_VERSION }}
run: |
cd ~/Downloads/sbcl-${{ env.SBCL_VERSION }}
sh make.sh --with-sb-core-compression
unset SBCL_HOME
INSTALL_ROOT=~/sbcl ./install.sh
if: steps.cache.outputs.cache-hit != 'true'
- name: Install quicklisp
run: |
cd ~/Downloads
export PATH="$HOME/sbcl/bin:${PATH}"
wget https://beta.quicklisp.org/quicklisp.lisp
sbcl --non-interactive \
--eval '(load "quicklisp.lisp")' \
--eval '(quicklisp-quickstart:install)' \
--eval '(ql-util:without-prompting (ql:add-to-init-file))' \
--eval '(ql:update-all-dists)'
if: steps.cache.outputs.cache-hit != 'true'
- name: Get LISP deps
run: |
cd ~/quicklisp/local-projects/
(test -d cl-openal) || git clone -b fixalut --depth=1 https://github.com/azimut/cl-openal
( cd cl-openal/ ; git pull )
(test -d nepal) || git clone --depth=1 https://github.com/azimut/nepal
( cd nepal/ ; git pull )
(test -d rocketman) || git clone --depth=1 https://github.com/azimut/rocketman
( cd rocketman/ ; git pull )
(test -d cepl) || git clone --depth=1 https://github.com/azimut/cepl
( cd cepl/ ; git pull )
(test -d glsl-spec) || git clone --depth=1 https://github.com/azimut/glsl-spec
( cd glsl-spec/ ; git pull )
(test -d cepl.fond) || git clone --depth=1 https://github.com/cbaggers/cepl.fond
( cd cepl.fond/ ; git pull )
(test -d cm) || git clone --depth=1 https://github.com/ormf/cm
( cd cm/ ; git pull )
- name: Build Binary
run: |
export PATH="$HOME/sbcl/bin:${PATH}"
cd bin/
make tar scenic.AppImage
- name: Dev Release
uses: marvinpinto/action-automatic-releases@latest
if: "!startsWith(github.ref, 'refs/tags/')"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-linux"
prerelease: true
title: "Development Linux Build"
files: |
bin/scenic.AppImage
bin/scenic-Linux.tgz
- name: Stable Release
uses: marvinpinto/action-automatic-releases@latest
if: "startsWith(github.ref, 'refs/tags/')"
with:
prerelease: false
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: |
bin/scenic.AppImage
# - name: DEBUG SHELL
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}