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
47 changes: 47 additions & 0 deletions .github/workflows/clang-libcpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Clang (libc++)

on:
push:
paths-ignore:
- 'doc/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'doc/**'
branches: [ main ]

jobs:
build:
name: Clang 21 libc++ -x- ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Install Clang 21 and libc++
run: |
# https://github.com/actions/runner-images/issues/7192
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt-get update && sudo apt-get -y upgrade --fix-missing
sudo apt-get install -y build-essential cmake ninja-build
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main"
sudo apt-get update
sudo apt-get install -y clang-21 libc++-21-dev libc++abi-21-dev

- name: Configure
run: >
cmake -S . -B build -G Ninja
-DCMAKE_CXX_COMPILER=clang++-21
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
-DCMAKE_CXX_FLAGS=-stdlib=libc++

- name: Build
run: cmake --build build --parallel --config ${{ matrix.config }}

- name: Test
run: ctest --test-dir build --output-on-failure
46 changes: 46 additions & 0 deletions .github/workflows/clang-libstdcpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Clang (libstdc++)

on:
push:
paths-ignore:
- 'doc/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'doc/**'
branches: [ main ]

jobs:
build:
name: Clang 21 libstdc++ -x- ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Install Clang 21
run: |
# https://github.com/actions/runner-images/issues/7192
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt-get update && sudo apt-get -y upgrade --fix-missing
sudo apt-get install -y build-essential cmake ninja-build
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main"
sudo apt-get update
sudo apt-get install -y clang-21

- name: Configure
run: >
cmake -S . -B build -G Ninja
-DCMAKE_CXX_COMPILER=clang++-21
-DCMAKE_BUILD_TYPE=${{ matrix.config }}

- name: Build
run: cmake --build build --parallel --config ${{ matrix.config }}

- name: Test
run: ctest --test-dir build --output-on-failure
41 changes: 41 additions & 0 deletions .github/workflows/clang-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Clang (macOS)

on:
push:
paths-ignore:
- 'doc/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'doc/**'
branches: [ main ]

jobs:
build:
name: Clang (Homebrew) -x- ${{ matrix.config }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
config: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Install LLVM and CMake
run: |
brew install llvm cmake ninja
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH

- name: Configure
run: >
cmake -S . -B build -G Ninja
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++
-DCMAKE_OSX_SYSROOT=$(xcrun --show-sdk-path)
-DCMAKE_BUILD_TYPE=${{ matrix.config }}

- name: Build
run: cmake --build build --parallel --config ${{ matrix.config }}

- name: Test
run: ctest --test-dir build --output-on-failure
45 changes: 45 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: GCC

on:
push:
paths-ignore:
- 'doc/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'doc/**'
branches: [ main ]

jobs:
build:
name: GCC 15 -x- ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Install GCC 15
run: |
# https://github.com/actions/runner-images/issues/7192
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt-get update && sudo apt-get -y upgrade --fix-missing
sudo apt-get install -y build-essential cmake ninja-build
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y g++-15

- name: Configure
run: >
cmake -S . -B build -G Ninja
-DCMAKE_CXX_COMPILER=g++-15
-DCMAKE_BUILD_TYPE=${{ matrix.config }}

- name: Build
run: cmake --build build --parallel --config ${{ matrix.config }}

- name: Test
run: ctest --test-dir build --output-on-failure
141 changes: 0 additions & 141 deletions .github/workflows/main.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: MSVC

on:
push:
paths-ignore:
- 'doc/**'
branches: [ main ]
pull_request:
paths-ignore:
- 'doc/**'
branches: [ main ]

jobs:
build:
name: MSVC Preview -x- ${{ matrix.config }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Install MSVC Build Tools Preview
shell: pwsh
run: |
$url = "https://aka.ms/vs/18/insiders/vs_buildtools.exe"
Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\vs_buildtools.exe" -UseBasicParsing
$process = Start-Process -Wait -PassThru -FilePath "$env:TEMP\vs_buildtools.exe" `
-ArgumentList "--quiet --wait --norestart --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.26100 --add Microsoft.VisualStudio.Component.VC.CMake.Project --includeRecommended"
$exitCode = $process.ExitCode
Write-Output "VS installer exit code: $exitCode"
if ($exitCode -notin 0,3010,3015) { throw "VS Installer failed: $exitCode" }

- name: Set up MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: '18'

- name: Configure
shell: pwsh
run: >
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.config }}

- name: Build
shell: pwsh
run: cmake --build build --parallel --config ${{ matrix.config }}

- name: Test
shell: pwsh
run: ctest --test-dir build --output-on-failure
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
![Build & Test](https://github.com/GabrielDosReis/ipr/actions/workflows/main.yml/badge.svg)
![MSVC](https://github.com/GabrielDosReis/ipr/actions/workflows/msvc.yml/badge.svg)
![GCC](https://github.com/GabrielDosReis/ipr/actions/workflows/gcc.yml/badge.svg)
![Clang (libstdc++)](https://github.com/GabrielDosReis/ipr/actions/workflows/clang-libstdcpp.yml/badge.svg)
![Clang (libc++)](https://github.com/GabrielDosReis/ipr/actions/workflows/clang-libcpp.yml/badge.svg)
![Clang (macOS)](https://github.com/GabrielDosReis/ipr/actions/workflows/clang-macos.yml/badge.svg)
![Analysis](https://github.com/GabrielDosReis/ipr/actions/workflows/analysis.yml/badge.svg)
![Docs](https://github.com/GabrielDosReis/ipr/actions/workflows/docs.yaml/badge.svg)

Expand Down
Loading