Skip to content

Commit

Permalink
Add workflows for ubuntu and mac
Browse files Browse the repository at this point in the history
  • Loading branch information
phbasler committed Dec 5, 2024
1 parent 0715293 commit dd1fc97
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mac unit tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
mac-tests:
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name : installPackages
run : brew install eigen boost boost-python3 libomp gflags
- name : install python packages
run: pip3 install numpy setuptools --break-system-packages
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: cmake
run: mkdir build && cd build && cmake .. -DLIBCMAES_BUILD_PYTHON=On -DLIBCMAES_BUILD_TESTS=On -DLIBCMAES_USE_OPENMP=On
- name: compile
run: cd build && cmake --build . -j${{ steps.cpu-cores.outputs.count }}
- name: Run ctest
run: cd build && ctest -j${{ steps.cpu-cores.outputs.count }} --output-on-failure

34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ubuntu unit tests

on:
push:
branches: [ master]
pull_request:
branches: [ master, develop ]
workflow_dispatch:


jobs:
ubuntu-tests-fullSetup:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name : installPackages
run : sudo apt-get update && sudo apt-get install --no-install-recommends --yes libeigen3-dev libboost-all-dev libgflags-dev
- name : install python packages
run: pip3 install numpy
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: cmake
run: mkdir build && cd build && cmake .. -DLIBCMAES_BUILD_PYTHON=On -DLIBCMAES_BUILD_TESTS=On -DLIBCMAES_USE_OPENMP=On
- name: compile
run: cd build && cmake --build . -j${{ steps.cpu-cores.outputs.count }}
- name: Run ctest
run: cd build && ctest -j${{ steps.cpu-cores.outputs.count }} --output-on-failure


0 comments on commit dd1fc97

Please sign in to comment.