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
…#907)

Co-authored-by: Delyan Angelov <delian66@gmail.com>
  • Loading branch information
larpon and spytheman authored Jan 14, 2025
1 parent 5a1d7b0 commit 0101891
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --quiet -y libsdl2-ttf-dev
sudo apt-get install --quiet -y libsdl2-dev libsdl2-ttf-dev
sudo apt-get install --quiet -y libsdl2-mixer-dev libsdl2-image-dev
curl -L https://www.libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz -o SDL2.tar.gz
tar -zxvf SDL2.tar.gz
Expand All @@ -42,7 +42,7 @@ jobs:
check-latest: true

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

Expand Down Expand Up @@ -81,38 +81,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.16
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 @@ -128,7 +119,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 @@ -137,13 +128,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 @@ -161,7 +152,7 @@ jobs:
check-latest: true

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

Expand Down Expand Up @@ -190,14 +181,13 @@ jobs:
VFLAGS: -cc tcc -no-retry-compilation
SDL2_VERSION: 2.0.16
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 0101891

Please sign in to comment.