Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Update workflows to support macos (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
liudongmiao authored Feb 26, 2024
1 parent a4ee3c9 commit 364212a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake on a single platform
name: CMake on a ubuntu and macos

on:
push:
Expand All @@ -17,16 +17,23 @@ jobs:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
# https://github.com/actions/runner-images
os: [ubuntu-latest, ubuntu-20.04, macos-latest, macos-13]

steps:
- uses: actions/checkout@v3

- name: Update apt-get
run: sudo apt-get update
- name: Install libwebsockets on ubuntu
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo apt-get update && sudo apt-get install -y libwebsockets-dev

- name: Install libwebsockets
run: sudo apt-get install libwebsockets-dev
- name: Install libwebsockets on macos
if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install libwebsockets

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down

0 comments on commit 364212a

Please sign in to comment.