Skip to content

Commit b3b823c

Browse files
larponspytheman
andauthored
ci: fix macos ci, use the 2.30.0 version as the default master branch (#913)
Co-authored-by: Delyan Angelov <[email protected]>
1 parent 6f75fd8 commit b3b823c

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

.github/workflows/ci.yml

+14-24
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
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
2323
sudo apt-get install --quiet -y libsdl2-mixer-dev libsdl2-image-dev
2424
curl -L https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz -o SDL2.tar.gz
2525
tar -zxvf SDL2.tar.gz
@@ -39,7 +39,7 @@ jobs:
3939
check-latest: true
4040

4141
- name: Checkout SDL
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4343
with:
4444
path: sdl
4545

@@ -78,38 +78,29 @@ jobs:
7878
test "${SDL2_VERSION}" = "$VER" || exit 1
7979
8080
macos:
81-
runs-on: macos-12
81+
runs-on: macos-13
8282
timeout-minutes: 60
8383
env:
84-
SDL2_VERSION: 2.28.0
84+
SDL2_VERSION: 2.30.11
85+
CFLAGS: -fpermissive -std=c99
8586
steps:
8687
- name: Checkout V
87-
uses: actions/checkout@v2
88+
uses: actions/checkout@v4
8889
with:
8990
repository: vlang/v
9091

9192
- name: Build local v
92-
run: make -j4 && ./v symlink
93+
run: make && ./v symlink
9394

9495
- name: Install dependencies
9596
run: |
9697
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
10898
10999
- name: Checkout SDL
110-
uses: actions/checkout@v2
100+
uses: actions/checkout@v4
111101
with:
112102
path: sdl
103+
ref: 2.30.0
113104

114105
- name: Link local SDL folder in ~/.vmodules/sdl
115106
run: |
@@ -125,7 +116,7 @@ jobs:
125116
126117
- name: Build sdl shared
127118
run: |
128-
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
119+
export CFLAGS="$(sdl2-config --cflags --libs)"
129120
v -shared -g sdl
130121
131122
- name: Run tests
@@ -134,13 +125,13 @@ jobs:
134125
- name: Build sdl examples
135126
run: |
136127
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)"
138129
v run sdl/examples/versions
139130
v should-compile-all sdl/examples/
140131
141132
- name: Test SDL version
142133
run: |
143-
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
134+
export CFLAGS="$(sdl2-config --cflags --libs)"
144135
VER="$(v run sdl/examples/version)"
145136
echo "${SDL2_VERSION} == $VER ?"
146137
test "${SDL2_VERSION}" = "$VER" || exit 1
@@ -158,7 +149,7 @@ jobs:
158149
check-latest: true
159150

160151
- name: Checkout SDL
161-
uses: actions/checkout@v2
152+
uses: actions/checkout@v4
162153
with:
163154
path: sdl
164155

@@ -187,14 +178,13 @@ jobs:
187178
VFLAGS: -cc tcc -no-retry-compilation
188179
SDL2_VERSION: 2.28.0
189180
steps:
190-
191181
- name: Install V
192182
uses: vlang/setup-v@v1
193183
with:
194184
check-latest: true
195185

196186
- name: Checkout SDL
197-
uses: actions/checkout@v2
187+
uses: actions/checkout@v4
198188
with:
199189
path: sdl
200190

0 commit comments

Comments
 (0)