Archived
1
0

macrolibx update to 1.2.1

This commit is contained in:
Adam Joly
2024-01-12 11:25:48 +01:00
parent 904013801a
commit a4aed04873
186 changed files with 4494 additions and 290004 deletions

View File

@ -0,0 +1,42 @@
name: Linux (clang)
on:
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64]
mode: [release]
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@v4
- 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
# Build the lib
- name: Build MacroLibX
run: make -j
# Build the test
- name: Build Test
run: cd test && clang main.c ../libmlx.so -lSDL2

View File

@ -0,0 +1,43 @@
name: Linux (gcc)
on:
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64]
mode: [release]
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@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get -y install mesa-common-dev libsdl2-2.0-0 libsdl2-dev build-essential libvulkan-dev
# Build the lib
- name: Build MacroLibX
run: make TOOLCHAIN=gcc -j
# Build the test
- name: Build Test
run: cd test && gcc main.c ../libmlx.so -lSDL2

View File

@ -0,0 +1,49 @@
name: macOS
on:
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
arch: [x86_64]
mode: [release]
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@v4
# Install system dependencies
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: 1.3.204.1
cache: true
- name: Install Dependancies
run: |
brew install SDL2
# Build the lib
- name: Build MacroLibX
run: make -j
# Build the test
- name: Build Test
run: cd test && clang main.c ../libmlx.so -lSDL2

75
MacroLibX/.github/workflows/windows.yml vendored Normal file
View File

@ -0,0 +1,75 @@
name: Windows (xmake)
on:
pull_request:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
arch: [x64]
mode: [release]
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@v4
# Install system dependencies
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: 1.3.204.1
cache: true
# 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
# Fetch xmake dephash
- name: Retrieve dependencies hash
id: dep_hash
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
# Cache xmake dependencies
- name: Retrieve cached xmake dependencies
uses: actions/cache@v3
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: Windows-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
# Setup compilation mode and install project dependencies
- name: Configure xmake and install dependencies
run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes
# Build the mlx
- name: Build MacroLibX
run: xmake --yes
# Build the test
- name: Build Test
run: xmake build --yes Test