Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix macos ci, use the 2.30.0 version as the default master branch #912

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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.26.0
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.26.0
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
Loading