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