add macos build action

This commit is contained in:
Martin Michelsen
2022-01-03 19:12:02 -08:00
committed by GitHub
parent 7bdf9f1e25
commit 1637bad599
+14 -3
View File
@@ -11,19 +11,30 @@ env:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Install libraries
- name: Install libraries (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y libevent-dev
- name: Install libraries (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: brew install libevent
- name: Install phosg
run: |
git clone https://github.com/fuzziqersoftware/phosg.git
cd phosg
cmake .
make
sudo make install
sudo apt-get install -y libevent-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}