Skip to content

source yoyoengine from fetchcontent, and re-add compile tests #1

source yoyoengine from fetchcontent, and re-add compile tests

source yoyoengine from fetchcontent, and re-add compile tests #1

Workflow file for this run

name: Compilation Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-gcc:
name: Build with GCC
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install -y gcc cmake make
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Fetchcontent
id: cache-fetchcontent
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build/_deps/*-src
key: ${{ runner.os }}-fetchcontent-${{ hashFiles('**/yoyoeditor/CMakeLists.txt') }}
- name: Configure with CMake
run: |
mkdir -p ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
CC=gcc cmake -DBUILD_LUA_RUNTIME=OFF ..
- name: Build with GCC
run: |
cd ${{ github.workspace }}/build
make -j${nproc}
build-clang:
name: Build with Clang
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install -y clang cmake make
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Fetchcontent
id: cache-fetchcontent
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build/_deps/*-src
key: ${{ runner.os }}-fetchcontent-${{ hashFiles('**/yoyoeditor/CMakeLists.txt') }}
- name: Configure with CMake
run: |
mkdir -p ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
CC=clang cmake -DBUILD_LUA_RUNTIME=OFF ..
- name: Build with Clang
run: |
cd ${{ github.workspace }}/build
make -j${nproc}