diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00e1487..0daa999 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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.