Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: yep_item_exists #6

feat: yep_item_exists

feat: yep_item_exists #6

name: Compilation Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CMAKE_FLAGS: -DSDL_UNIX_CONSOLE_BUILD=ON
jobs:
build-linux:
name: Build with ${{ matrix.compiler }}
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
include:
- compiler: gcc
cc: gcc
- compiler: clang
cc: clang
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install -y ${{ matrix.compiler }} cmake make
- name: Checkout code
uses: actions/checkout@v4
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdrm-dev libgbm-dev libfreetype6-dev libharfbuzz-dev nasm
- name: Cache Fetchcontent
id: cache-fetchcontent
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build/_deps/*-src
key: ${{ runner.os }}-${{ matrix.compiler }}-fetchcontent-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.compiler }}-fetchcontent-
- name: Configure with CMake
run: |
mkdir -p ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
CC=${{ matrix.cc }} cmake ${{ env.CMAKE_FLAGS }} ..
- name: Build
run: |
cd ${{ github.workspace }}/build
cmake --build . --parallel
build-msvc:
name: Build with MSVC
runs-on: windows-2025
steps:
- 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: windows-msvc-fetchcontent-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
windows-msvc-fetchcontent-
- uses: ilammy/[email protected]
- name: Install pkgconfig with Chocolatey
run: choco install pkgconfiglite -y
- name: Set up NASM
uses: ilammy/setup-nasm@v1
- name: Configure with CMake
run: |
New-Item -ItemType Directory -Force -Path "${{ github.workspace }}\build"
cd ${{ github.workspace }}\build
cmake ${{ env.CMAKE_FLAGS }} -DCMAKE_ASM_NASM_COMPILER=nasm ..
- name: Build with MSVC
run: |
cd ${{ github.workspace }}\build
cmake --build . --config Debug --parallel