Skip to content

Commit a796f0d

Browse files
use docker to build linux
1 parent 17aea74 commit a796f0d

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727

2828
- name: Build SDL
2929
run: |
30-
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
31-
tar xvfz release-2.30.7.tar.gz
30+
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.32.8.tar.gz
31+
tar xvfz release-2.32.8.tar.gz
3232
mkdir build
3333
cd build
34-
cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
34+
cmake ../SDL-release-2.32.8 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
3535
cmake --build . --config Release
3636
sudo cmake --install .
3737
@@ -114,11 +114,11 @@ jobs:
114114
#
115115
# - name: Build SDL
116116
# run: |
117-
# wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
118-
# tar xvfz release-2.30.7.tar.gz
117+
# wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.32.8.tar.gz
118+
# tar xvfz release-2.32.8.tar.gz
119119
# mkdir build
120120
# cd build
121-
# cmake ../SDL-release-2.30.7 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
121+
# cmake ../SDL-release-2.32.8 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
122122
# cmake --build . --config Release
123123
# sudo cmake --install .
124124
#
@@ -182,16 +182,25 @@ jobs:
182182

183183

184184
build-linux:
185-
runs-on: ubuntu-22.04
185+
runs-on: ubuntu-latest
186+
container:
187+
image: electronstudio/ubuntu16-modern:latest
188+
options: --user root
189+
volumes:
190+
# override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc
191+
- /tmp:/__e/node20
186192
strategy:
187193
# You can use PyPy versions in python-version.
188194
# For example, pypy2 and pypy3
189195
matrix:
190196
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14.0-rc.1', 'pypy-3.10', 'pypy-3.11' ]
191197
raylib-platform: ['Desktop', 'SDL', 'DRM']
192198
steps:
193-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
194-
- uses: actions/checkout@v4
199+
- name: fix node
200+
run: |
201+
ln -s /usr/local/bin /__e/node20/bin
202+
203+
- uses: actions/checkout@v2
195204
with:
196205
submodules: recursive
197206

@@ -203,19 +212,15 @@ jobs:
203212
# The target architecture (x86, x64) of the Python interpreter.
204213
architecture: x64
205214

206-
- name: install prereqs
207-
run: |
208-
sudo apt update
209-
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
210215
- name: Build SDL
211216
run: |
212-
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
213-
tar xvfz release-2.30.7.tar.gz
217+
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.32.8.tar.gz
218+
tar xvfz release-2.32.8.tar.gz
214219
mkdir build
215220
cd build
216-
cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
221+
cmake ../SDL-release-2.32.8 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
217222
cmake --build . --config Release
218-
sudo cmake --install .
223+
cmake --install .
219224
220225
# Runs a set of commands using the runners shell
221226
- name: Build raylib
@@ -225,12 +230,12 @@ jobs:
225230
cd build
226231
cmake -DPLATFORM=${{ matrix.raylib-platform }} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ..
227232
make -j2
228-
sudo make install
233+
make install
229234
- name: Copy extras
230235
run: |
231-
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
232-
sudo cp physac/src/physac.h /usr/local/include/
233-
sudo cp raygui/src/raygui.h /usr/local/include/
236+
cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
237+
cp physac/src/physac.h /usr/local/include/
238+
cp raygui/src/raygui.h /usr/local/include/
234239
- name: Build raylib-python-cffi
235240
env:
236241
RAYLIB_PLATFORM: ${{ matrix.raylib-platform }}

0 commit comments

Comments
 (0)