fix: remove uses of strdup since it is not c99 strict #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
c_compiler: [gcc, clang] | |
include: | |
- os: ubuntu-latest | |
c_compiler: gcc | |
cpp_compiler: g++ | |
- os: ubuntu-latest | |
c_compiler: clang | |
cpp_compiler: clang++ | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set build variables | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Install Linux Dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: > | |
sudo apt-get install -y | |
libxrandr-dev | |
libxinerama-dev | |
libxcursor-dev | |
libxi-dev | |
libxkbcommon-dev | |
libgl-dev | |
libglu1-mesa-dev | |
libgles2-mesa-dev | |
libegl1-mesa-dev | |
mesa-utils | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-S ${{ github.workspace }} | |
- name: Build Project | |
run: > | |
cmake | |
--build ${{ steps.strings.outputs.build-output-dir }} | |
--config Release | |
--parallel 4 | |