Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Jan 24, 2022
1 parent dd2211a commit fc8d927
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: flobernd
77 changes: 77 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: GitHub Actions CI

on: [push, pull_request]

jobs:
build-linux:
name: Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- { name: x86, flags: "-m32" }
- { name: x64, flags: "-m64" }
compiler:
- { name: GNU, CC: gcc-10, CXX: g++-10, }
- { name: LLVM, CC: clang-10, CXX: clang++-10 }
flavor: [ Debug, Release ]
mode:
- { name: default, args: "" }
- { name: NO_LIBC, args: -DZYAN_NO_LIBC=ON }

steps:
- name: Checkout
uses: actions/checkout@v2

- if: matrix.platform.name == 'x86'
name: Bootstrap
run: |
sudo dpkg --add-architecture i386
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get install -y g++-multilib g++-10-multilib
- name: Configure
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
mkdir build
cd build
cmake -DCMAKE_C_FLAGS=${{ matrix.platform.flags }} -DCMAKE_CXX_FLAGS=${{ matrix.platform.flags }} -DZYAN_DEV_MODE=ON ${{ matrix.mode.args }} ..
- name: Build
run: |
cmake --build build --config ${{ matrix.flavor }}
build-windows:
name: Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
platform:
- { name: x86, flags: "Win32" }
- { name: x64, flags: "x64" }
compiler:
- { name: MSVC }
flavor: [ Debug, Release ]
mode:
- { name: default, args: "" }
- { name: NO_LIBC, args: -DZYAN_NO_LIBC=ON }

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform.flags }} -DZYAN_DEV_MODE=ON ${{ matrix.mode.args }} ..
- name: Build
run: |
cmake --build build --config ${{ matrix.flavor }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Zyan Core Library for C

<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
<a href="https://github.com/zyantific/zycore-c/actions"><img src="https://github.com/zyantific/zycore-c/workflows/GitHub%20Actions%20CI/badge.svg" alt="GitHub Actions"></a>
<a href="https://discord.zyantific.com/"><img src="https://img.shields.io/discord/390136917779415060.svg?logo=discord&label=Discord" alt="Discord"></a>

Internal library providing platform independent types, macros and a fallback for environments without LibC.

## Features
Expand Down

0 comments on commit fc8d927

Please sign in to comment.