adding windows CI
This commit is contained in:
48
.gitea/workflows/CI.yml
git.filemode.normal_file
48
.gitea/workflows/CI.yml
git.filemode.normal_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
|
||||
@@ -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
|
||||
@@ -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
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
||||
*.swp
|
||||
*.swx
|
||||
sandbox/test
|
||||
sandbox/build/
|
||||
sandbox/.xmake/
|
||||
|
||||
@@ -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
11
sandbox/xmake.lua
git.filemode.normal_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()
|
||||
Reference in New Issue
Block a user