Skip to content

Commit

Permalink
ci: fix macos ci, use the 2.30.0 version as the default master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman authored and larpon committed Jan 14, 2025
1 parent 8bff2a0 commit 9663edf
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
check-latest: true

- name: Checkout SDL
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sdl

Expand Down Expand Up @@ -78,38 +78,29 @@ jobs:
test "${SDL2_VERSION}" = "$VER" || exit 1
macos:
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 60
env:
SDL2_VERSION: 2.0.10
SDL2_VERSION: 2.30.11
CFLAGS: -fpermissive -std=c99
steps:
- name: Checkout V
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: vlang/v

- name: Build local v
run: make -j4 && ./v symlink
run: make && ./v symlink

- name: Install dependencies
run: |
brew install sdl2_ttf sdl2_mixer sdl2_image
curl -L https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz -o SDL2.tar.gz
tar -zxvf SDL2.tar.gz
- name: Build SDL
run: |
cd SDL2-${SDL2_VERSION}
mkdir build
cd build
../configure --prefix /tmp/sdl2-${SDL2_VERSION}
make
make install
- name: Checkout SDL
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sdl
ref: 2.30.0

- name: Link local SDL folder in ~/.vmodules/sdl
run: |
Expand All @@ -125,7 +116,7 @@ jobs:
- name: Build sdl shared
run: |
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
export CFLAGS="$(sdl2-config --cflags --libs)"
v -shared -g sdl
- name: Run tests
Expand All @@ -134,13 +125,13 @@ jobs:
- name: Build sdl examples
run: |
v shader sdl/examples/sdl_opengl_and_sokol
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
export CFLAGS="$(sdl2-config --cflags --libs)"
v run sdl/examples/versions
v should-compile-all sdl/examples/
- name: Test SDL version
run: |
export CFLAGS="$(/tmp/sdl2-${SDL2_VERSION}/bin/sdl2-config --cflags --libs)"
export CFLAGS="$(sdl2-config --cflags --libs)"
VER="$(v run sdl/examples/version)"
echo "${SDL2_VERSION} == $VER ?"
test "${SDL2_VERSION}" = "$VER" || exit 1
Expand All @@ -158,7 +149,7 @@ jobs:
check-latest: true

- name: Checkout SDL
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sdl

Expand Down Expand Up @@ -187,14 +178,13 @@ jobs:
VFLAGS: -cc tcc -no-retry-compilation
SDL2_VERSION: 2.0.10
steps:

- name: Install V
uses: vlang/setup-v@v1
with:
check-latest: true

- name: Checkout SDL
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sdl

Expand Down

0 comments on commit 9663edf

Please sign in to comment.