Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI using github actions #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
39 changes: 39 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Linux

on:
pull_request:
push:
release:
types: [published]

jobs:
build_linux:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
architecture: [x64]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-12 g++-12

- name: Configure
run: |
export CC=gcc-12 && export CXX=g++-12
cmake -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}

- name: Build
working-directory: build
run: |
make -j$(nproc)

- name: Test
working-directory: build
run: |
ctest
33 changes: 33 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: MacOS

on:
pull_request:
push:
release:
types: [published]

jobs:
build_macos:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
architecture: [x64]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure
run: |
cmake -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}

- name: Build
working-directory: build
run: |
make -j$(sysctl -n hw.logicalcpu)

- name: Test
working-directory: build
run: |
ctest
42 changes: 42 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Windows

on:
pull_request:
push:
release:
types: [published]

jobs:
build_windows:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
architecture: [x64]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.architecture }}

- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3

- name: Configure
run: |
cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}

- name: Build
working-directory: build
shell: cmd
run: |
ninja

- name: Test
working-directory: build
run: |
ctest