Skip to content

Install dependencies #3

Install dependencies

Install dependencies #3

Workflow file for this run

name: Build SharedGL for Linux and Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release, RelWithDebInfo]
c_compiler: [clang, cl]
arch: [x64, Win32]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
arch: Win32
steps:
- uses: actions/checkout@v3
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install dependenices
run: >
if [[ ${{ matrix.os }} == "ubuntu-latest" ]]; then
sudo apt-get install -y libepoxy-dev libsdl2-dev libx11-dev
fi
# removed -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }}
- 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
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}