adding windows CI
Some checks failed
Windows / build (windows-x86_64) (push) Failing after 19s
Windows / build (ubuntu-latest) (push) Failing after 1m31s
Windows / build (macos-x86_64) (push) Failing after 3m10s

This commit is contained in:
2026-01-18 15:55:18 +01:00
parent e64ba6870b
commit 394d2dc358
6 changed files with 61 additions and 75 deletions

48
.gitea/workflows/CI.yml git.filemode.normal_file
View File

@@ -0,0 +1,48 @@
name: Windows
on:
repository_dispatch:
types: [create-pull-request]
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-x86_64, macos-x86_64, ubuntu-latest]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- name: Get current date as package key
id: cache_key
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v6
# Force xmake to a specific folder (for cache)
- name: Set xmake env
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
# Install xmake
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
# Update xmake repository (in order to have the file that will be cached)
- name: Update xmake repository
run: xmake repo --update
# Build the mlx
- name: Build MacroLibX
run: xmake --yes

View File

@@ -1,34 +0,0 @@
name: Linux
on:
repository_dispatch:
types: [create-pull-request]
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get -y install mesa-common-dev clang libsdl2-2.0-0 libsdl2-dev build-essential libvulkan-dev
- name: Build
run: cd sandbox && make

View File

@@ -1,31 +0,0 @@
name: MacOS
on:
repository_dispatch:
types: [create-pull-request]
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-x86_64]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install system dependencies
run: brew install SDL2 vulkan-headers
- name: Build
run: cd sandbox && make

2
.gitignore vendored
View File

@@ -2,3 +2,5 @@
*.swp *.swp
*.swx *.swx
sandbox/test sandbox/test
sandbox/build/
sandbox/.xmake/

View File

@@ -1,10 +0,0 @@
NAME = ./test
CC = clang
all : $(NAME)
$(NAME):
$(CC) -o $(NAME) main.c -lvulkan -lSDL2 -g
.PHONY: all

11
sandbox/xmake.lua git.filemode.normal_file
View File

@@ -0,0 +1,11 @@
add_requires("libsdl2", { configs = { sdlmain = false } })
add_requires("vulkan-headers")
target("test")
set_kind("binary")
add_linkdirs("./")
add_files("main.c", { languages = "c99" })
add_defines("SDL_MAIN_HANDLED")
add_packages("libsdl2", "vulkan-headers")
add_syslinks("vulkan")
target_end()