-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.17 KB
/
compile-tests.yml
File metadata and controls
43 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Compilation Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build with ${{ matrix.compiler }}
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install -y ${{ matrix.compiler }} cmake make libdrm-dev libgbm-dev libfreetype6-dev libharfbuzz-dev nasm
- 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 }}-${{ matrix.compiler }}-fetchcontent-${{ hashFiles('**/yoyoeditor/CMakeLists.txt') }}
- name: Configure with CMake
run: |
mkdir -p ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
CC=${{ matrix.compiler }} cmake -DCMAKE_BUILD_TYPE=Debug -DSDL_UNIX_CONSOLE_BUILD=ON ..
- name: Build with ${{ matrix.compiler }}
run: |
cd ${{ github.workspace }}/build
cmake --build . --parallel