Skip to content

Commit

Permalink
Updated ci testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Oct 16, 2024
1 parent 838d126 commit b059628
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 37 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/build.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs:
build-and-test:
name: ${{ matrix.os }} Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# For more specific OS versions, you can specify them explicitly:
# os: [ubuntu-20.04, windows-2019, macos-11]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: "3.20.0" # Specify the minimum version you need

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
choco install -y ninja
choco install -y llvm # Clang on Windows if needed
# choco install -y visualstudio2019community
shell: pwsh

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install ninja
brew install llvm
- name: Configure CMake
run: |
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
# Or specify other options as needed
- name: Build
run: cmake --build build

- name: Run tests
run: ctest --test-dir build --output-on-failure

0 comments on commit b059628

Please sign in to comment.