Skip to content

Commit 0101891

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

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
@@ -42,7 +42,7 @@ jobs:
4242
check-latest: true
4343

4444
- name: Checkout SDL
45-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
4646
with:
4747
path: sdl
4848

@@ -81,38 +81,29 @@ jobs:
8181
test "${SDL2_VERSION}" = "$VER" || exit 1
8282
8383
macos:
84-
runs-on: macos-12
84+
runs-on: macos-13
8585
timeout-minutes: 60
8686
env:
87-
SDL2_VERSION: 2.0.16
87+
SDL2_VERSION: 2.30.11
88+
CFLAGS: -fpermissive -std=c99
8889
steps:
8990
- name: Checkout V
90-
uses: actions/checkout@v2
91+
uses: actions/checkout@v4
9192
with:
9293
repository: vlang/v
9394

9495
- name: Build local v
95-
run: make -j4 && ./v symlink
96+
run: make && ./v symlink
9697

9798
- name: Install dependencies
9899
run: |
99100
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
111101
112102
- name: Checkout SDL
113-
uses: actions/checkout@v2
103+
uses: actions/checkout@v4
114104
with:
115105
path: sdl
106+
ref: 2.30.0
116107

117108
- name: Link local SDL folder in ~/.vmodules/sdl
118109
run: |
@@ -128,7 +119,7 @@ jobs:
128119
129120
- name: Build sdl shared
130121
run: |
131-
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
122+
export CFLAGS="$(sdl2-config --cflags --libs)"
132123
v -shared -g sdl
133124
134125
- name: Run tests
@@ -137,13 +128,13 @@ jobs:
137128
- name: Build sdl examples
138129
run: |
139130
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)"
141132
v run sdl/examples/versions
142133
v should-compile-all sdl/examples/
143134
144135
- name: Test SDL version
145136
run: |
146-
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
137+
export CFLAGS="$(sdl2-config --cflags --libs)"
147138
VER="$(v run sdl/examples/version)"
148139
echo "${SDL2_VERSION} == $VER ?"
149140
test "${SDL2_VERSION}" = "$VER" || exit 1
@@ -161,7 +152,7 @@ jobs:
161152
check-latest: true
162153

163154
- name: Checkout SDL
164-
uses: actions/checkout@v2
155+
uses: actions/checkout@v4
165156
with:
166157
path: sdl
167158

@@ -190,14 +181,13 @@ jobs:
190181
VFLAGS: -cc tcc -no-retry-compilation
191182
SDL2_VERSION: 2.0.16
192183
steps:
193-
194184
- name: Install V
195185
uses: vlang/setup-v@v1
196186
with:
197187
check-latest: true
198188

199189
- name: Checkout SDL
200-
uses: actions/checkout@v2
190+
uses: actions/checkout@v4
201191
with:
202192
path: sdl
203193

0 commit comments

Comments
 (0)