Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,65 +26,65 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
build_type: [Debug, Release]
c_compiler: [gcc, clang]
build_type: [ Debug, Release ]
c_compiler: [ gcc, clang ]
include:
- c_compiler: gcc
cpp_compiler: g++
- c_compiler: clang
cpp_compiler: clang++

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=$GITHUB_WORKSPACE/build" >> "$GITHUB_OUTPUT"
echo "install-dir=$GITHUB_WORKSPACE/install/archlinux-latest-${{ matrix.c_compiler }}-${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=$GITHUB_WORKSPACE/build" >> "$GITHUB_OUTPUT"
echo "install-dir=$GITHUB_WORKSPACE/install/archlinux-latest-${{ matrix.c_compiler }}-${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"


- name: Install SDL windowing deps (Linux)
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm --needed \
base-devel cmake ninja pkgconf gcc clang git python3\
alsa-lib jack libpulse \
xorgproto libx11 libxext libxrandr libxcursor libxfixes libxi libxss libxtst \
libxkbcommon wayland wayland-protocols \
libdrm mesa mesa-utils

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
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
-G "Ninja Multi-Config"
- name: Install SDL windowing deps (Linux)
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm --needed \
base-devel cmake ninja pkgconf gcc clang git python3\
alsa-lib jack libpulse \
xorgproto libx11 libxext libxrandr libxcursor libxfixes libxi libxss libxtst \
libxkbcommon wayland wayland-protocols \
libdrm mesa mesa-utils

- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
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
-G "Ninja Multi-Config"

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Install
run: >
cmake --install ${{ steps.strings.outputs.build-output-dir }}
--config ${{ matrix.build_type }}
--prefix "${{ steps.strings.outputs.install-dir }}"
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}

- name: Upload install folder
uses: actions/upload-artifact@v4
with:
name: archlinux-latest-${{ matrix.c_compiler }}-${{ matrix.build_type }}-install-${{ github.sha }}
path: ${{ steps.strings.outputs.install-dir }}/
- name: Install
run: >
cmake --install ${{ steps.strings.outputs.build-output-dir }}
--config ${{ matrix.build_type }}
--prefix "${{ steps.strings.outputs.install-dir }}"

- name: Upload install folder
uses: actions/upload-artifact@v4
with:
name: archlinux-latest-${{ matrix.c_compiler }}-${{ matrix.build_type }}-install-${{ github.sha }}
path: ${{ steps.strings.outputs.install-dir }}/
78 changes: 39 additions & 39 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [windows-latest]
build_type: [Debug, Release]
c_compiler: [gcc, clang, cl]
os: [ windows-latest ]
build_type: [ Debug, Release ]
c_compiler: [ gcc, clang, cl ]
include:
- os: windows-latest
c_compiler: cl
Expand All @@ -38,45 +38,45 @@ jobs:
cpp_compiler: clang++

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "install-dir=${{ github.workspace }}/install/${{ matrix.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "install-dir=${{ github.workspace }}/install/${{ matrix.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
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
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
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: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Install
run: >
cmake --install ${{ steps.strings.outputs.build-output-dir }}
--config ${{ matrix.build_type }}
--prefix "${{ steps.strings.outputs.install-dir }}"
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}

- name: Upload install folder
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}-install-${{ github.sha }}
path: ${{ steps.strings.outputs.install-dir }}/
- name: Install
run: >
cmake --install ${{ steps.strings.outputs.build-output-dir }}
--config ${{ matrix.build_type }}
--prefix "${{ steps.strings.outputs.install-dir }}"

- name: Upload install folder
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}-install-${{ github.sha }}
path: ${{ steps.strings.outputs.install-dir }}/
Loading