-
-
Notifications
You must be signed in to change notification settings - Fork 226
51 lines (48 loc) · 1.8 KB
/
test-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
name: test-build
on: [push, pull_request]
jobs:
test-build:
runs-on: ubuntu-latest
env:
SDL_VERSION: 2.30.0
IMG_VERSION: 2.6.0
MIX_VERSION: 2.6.0
TTF_VERSION: 2.0.18
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.13.15'
- run: go version
- name: set PKG_CONFIG_PATH environment variable
run: |
echo "PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Download, build, and install SDL2 packages
run: |
wget https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-$SDL_VERSION.tar.gz
tar xf SDL2-$SDL_VERSION.tar.gz
cd SDL2-$SDL_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
wget https://github.com/libsdl-org/SDL_image/releases/download/release-$IMG_VERSION/SDL2_image-$IMG_VERSION.tar.gz
tar xf SDL2_image-$IMG_VERSION.tar.gz
cd SDL2_image-$IMG_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-$MIX_VERSION/SDL2_mixer-$MIX_VERSION.tar.gz
tar xf SDL2_mixer-$MIX_VERSION.tar.gz
cd SDL2_mixer-$MIX_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
wget https://github.com/libsdl-org/SDL_ttf/releases/download/release-$TTF_VERSION/SDL2_ttf-$TTF_VERSION.tar.gz
tar xf SDL2_ttf-$TTF_VERSION.tar.gz
cd SDL2_ttf-$TTF_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
- name: Test if Go-SDL2 works with the SDL2 packages
run: |
go build ./{sdl,img,mix,ttf}