19
19
- name : Install dependencies
20
20
run : |
21
21
sudo apt-get update
22
- sudo apt-get install --quiet -y libsdl2-ttf-dev
22
+ sudo apt-get install --quiet -y libsdl2-dev libsdl2- ttf-dev
23
23
sudo apt-get install --quiet -y libsdl2-mixer-dev libsdl2-image-dev
24
24
curl -L https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz -o SDL2.tar.gz
25
25
tar -zxvf SDL2.tar.gz
42
42
check-latest : true
43
43
44
44
- name : Checkout SDL
45
- uses : actions/checkout@v2
45
+ uses : actions/checkout@v4
46
46
with :
47
47
path : sdl
48
48
@@ -81,38 +81,29 @@ jobs:
81
81
test "${SDL2_VERSION}" = "$VER" || exit 1
82
82
83
83
macos :
84
- runs-on : macos-12
84
+ runs-on : macos-13
85
85
timeout-minutes : 60
86
86
env :
87
- SDL2_VERSION : 2.0.16
87
+ SDL2_VERSION : 2.30.11
88
+ CFLAGS : -fpermissive -std=c99
88
89
steps :
89
90
- name : Checkout V
90
- uses : actions/checkout@v2
91
+ uses : actions/checkout@v4
91
92
with :
92
93
repository : vlang/v
93
94
94
95
- name : Build local v
95
- run : make -j4 && ./v symlink
96
+ run : make && ./v symlink
96
97
97
98
- name : Install dependencies
98
99
run : |
99
100
brew install sdl2_ttf sdl2_mixer sdl2_image
100
- curl -L https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz -o SDL2.tar.gz
101
- tar -zxvf SDL2.tar.gz
102
-
103
- - name : Build SDL
104
- run : |
105
- cd SDL2-${SDL2_VERSION}
106
- mkdir build
107
- cd build
108
- ../configure --prefix /tmp/sdl2-${SDL2_VERSION}
109
- make
110
- make install
111
101
112
102
- name : Checkout SDL
113
- uses : actions/checkout@v2
103
+ uses : actions/checkout@v4
114
104
with :
115
105
path : sdl
106
+ ref : 2.30.0
116
107
117
108
- name : Link local SDL folder in ~/.vmodules/sdl
118
109
run : |
@@ -128,7 +119,7 @@ jobs:
128
119
129
120
- name : Build sdl shared
130
121
run : |
131
- export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/ sdl2-config --cflags --libs)"
122
+ export CFLAGS="$(sdl2-config --cflags --libs)"
132
123
v -shared -g sdl
133
124
134
125
- name : Run tests
@@ -137,13 +128,13 @@ jobs:
137
128
- name : Build sdl examples
138
129
run : |
139
130
v shader sdl/examples/sdl_opengl_and_sokol
140
- export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/ sdl2-config --cflags --libs)"
131
+ export CFLAGS="$(sdl2-config --cflags --libs)"
141
132
v run sdl/examples/versions
142
133
v should-compile-all sdl/examples/
143
134
144
135
- name : Test SDL version
145
136
run : |
146
- export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/ sdl2-config --cflags --libs)"
137
+ export CFLAGS="$(sdl2-config --cflags --libs)"
147
138
VER="$(v run sdl/examples/version)"
148
139
echo "${SDL2_VERSION} == $VER ?"
149
140
test "${SDL2_VERSION}" = "$VER" || exit 1
@@ -161,7 +152,7 @@ jobs:
161
152
check-latest : true
162
153
163
154
- name : Checkout SDL
164
- uses : actions/checkout@v2
155
+ uses : actions/checkout@v4
165
156
with :
166
157
path : sdl
167
158
@@ -190,14 +181,13 @@ jobs:
190
181
VFLAGS : -cc tcc -no-retry-compilation
191
182
SDL2_VERSION : 2.0.16
192
183
steps :
193
-
194
184
- name : Install V
195
185
uses : vlang/setup-v@v1
196
186
with :
197
187
check-latest : true
198
188
199
189
- name : Checkout SDL
200
- uses : actions/checkout@v2
190
+ uses : actions/checkout@v4
201
191
with :
202
192
path : sdl
203
193
0 commit comments