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
57 changes: 57 additions & 0 deletions .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Linux Build (GCC & Clang)

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "master" ]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
build_type: [Release]
shared: [ON, OFF]
include:
- compiler: gcc
c: gcc
cxx: g++
- compiler: clang
c: clang
cxx: clang++

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install compilers
run: |
sudo apt-get update
if [[ "${{ matrix.compiler }}" == "clang" ]]; then
sudo apt-get install -y clang
else
sudo apt-get install -y build-essential
fi

- name: Configure CMake (Linux)
run: >
cmake -B build
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_C_COMPILER=${{ matrix.c }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DPYRO_COMMON_BUILD_TESTS=ON
-DPYRO_COMMON_SHARED_LIBRARY=${{ matrix.shared }}
-S .

- name: Build (Linux)
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4

- name: Run tests
working-directory: build
run: ctest --build-config ${{ matrix.build_type }}
40 changes: 40 additions & 0 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: macOS Build (AppleClang x86 & ARM)

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "master" ]

jobs:
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64, arm64]
build_type: [Release]
shared: [ON, OFF]

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure CMake (macOS)
run: >
cmake -B build
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DPYRO_COMMON_BUILD_TESTS=ON
-DPYRO_COMMON_SHARED_LIBRARY=${{ matrix.shared }}
-S .

- name: Build (macOS)
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4

- name: Run tests
working-directory: build
run: ctest --build-config ${{ matrix.build_type }}
112 changes: 0 additions & 112 deletions .github/workflows/cmake-multi-platform.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/cmake-windows-msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Windows Build (MSVC)

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "master" ]

jobs:
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
build_type: [Release]
shared: [ON, OFF]

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure CMake (MSVC)
run: >
cmake -B build
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_C_COMPILER=cl
-DCMAKE_CXX_COMPILER=cl
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DPYRO_COMMON_BUILD_TESTS=ON
-DPYRO_COMMON_SHARED_LIBRARY=${{ matrix.shared }}
-S .

- name: Build (MSVC)
run: cmake --build build --config ${{ matrix.build_type }} --parallel 4

- name: Run tests
working-directory: build
run: ctest --build-config ${{ matrix.build_type }}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![CMake on multiple platforms](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-multi-platform.yml)

## PyroshockStudios Common Utilities (PyroshockStudios © 2025)

[![Windows MSVC](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-windows-msvc.yml/badge.svg)](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-windows-msvc.yml)
[![Linux GCC & Clang](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-linux.yml/badge.svg)](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-linux.yml)
[![macOS ARM/x86](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-macos.yml/badge.svg)](https://github.com/PyroshockStudios/PyroCommon/actions/workflows/cmake-macos.yml)


### This repository contains many shared files used in PyroshockStudios projects
Loading