Skip to content

Commit

Permalink
Add macOs environment
Browse files Browse the repository at this point in the history
  • Loading branch information
MPogotsky committed Sep 12, 2024
1 parent bb1d1d1 commit 3ffbb54
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/test-xapi-cpp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: Test xapi-cpp

on:
Expand All @@ -10,18 +8,21 @@ on:

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
build_type: [Release]
c_compiler: [gcc, clang]
include:
- c_compiler: gcc
cpp_compiler: g++
os: ubuntu-latest
- c_compiler: clang
cpp_compiler: clang++
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
Expand All @@ -32,15 +33,22 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install dependencies
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo add-apt-repository ppa:mhier/libboost-latest -y
sudo apt install libboost-system1.83-dev
sudo apt install libboost-url1.83-dev
sudo apt install libboost-json1.83-dev
sudo apt install libjsoncpp-dev libssl-dev libgtest-dev
sudo apt install libssl-dev libgtest-dev
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install boost
brew install openssl
- name: Configure CMake
run: >
Expand All @@ -64,7 +72,7 @@ jobs:
-S ${{ github.workspace }}
cmake --build ${{ steps.strings.outputs.build-output-dir }}
sudo cmake --install ${{ steps.strings.outputs.build-output-dir }}
- name: Compile Examples
run: |
cd ${{ github.workspace }}/examples
Expand All @@ -73,4 +81,3 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-S ${{ github.workspace }}/examples
cmake --build ${{ github.workspace }}/examples/build

0 comments on commit 3ffbb54

Please sign in to comment.