diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71ea4b49..840efd0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -42,7 +42,7 @@ jobs: check-latest: true - name: Checkout SDL - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: sdl @@ -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: | @@ -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 @@ -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 @@ -161,7 +152,7 @@ jobs: check-latest: true - name: Checkout SDL - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: sdl @@ -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