webui-1.10 #1436
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Meson Test (MacOS Clang) | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
jobs: | |
test-macos-clang: | |
strategy: | |
matrix: | |
dep: ["brew", "source", "static"] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# - run: git submodule update --init | |
# if: matrix.dep == 'submodule' | |
- name: Install Homebrew dependencies | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
run: | | |
brew update --preinstall | |
brew install meson | |
if [[ ${{matrix.dep}} = brew ]]; then brew tap na-trium-144/webcface; fi | |
if [[ ${{matrix.dep}} = brew ]]; then brew install spdlog msgpack-cxx cli11 utf8cpp googletest opencv na-trium-144/webcface/imagemagick-no-openmp na-trium-144/webcface/curl-ws na-trium-144/webcface/crow-unix-socket || true; fi | |
# - name: Install Nasm | |
# if: matrix.dep == 'framework' | |
# env: | |
# HOMEBREW_NO_AUTO_UPDATE: 1 | |
# run: | | |
# brew update --preinstall | |
- name: Setup Meson | |
run: > | |
meson setup build | |
--buildtype=debug | |
$([[ ${{matrix.dep}} = brew ]] && echo "-Dwrap_mode=default") | |
-Dtest_wait=1000 | |
$([[ ${{matrix.dep}} = static ]] && echo -Ddefault_library=static) | |
--prefix=${{github.workspace}}/build/install | |
"-Dpkg_config_path=['$(brew --prefix)/opt/imagemagick-no-openmp/lib/pkgconfig','$(brew --prefix)/opt/curl-ws/lib/pkgconfig']" | |
"-Dcmake_prefix_path=['$(brew --prefix)/opt/crow-unix-socket']" | |
# "-DCMAKE_OSX_ARCHITECTURES=$([[ ${{matrix.dep}} = framework ]] && echo 'arm64;x86_64')" | |
# "-DWEBCFACE_FRAMEWORK=$([[ ${{matrix.dep}} != framework ]]; echo $?)" | |
- name: Compile | |
run: meson compile -C build || meson compile -C build | |
- name: Test | |
run: meson test -C build --print-errorlog | |
- name: Check Exported Symbol | |
if: matrix.dep == 'source' | |
run: | | |
bash -c "! nm -g --defined-only build/libwebcface.dylib | grep -v webcface | grep -v wcf | grep -v St" | |
bash -c "! nm -g --defined-only build/libwebcface.dylib | grep -v webcface | grep -v wcf | grep spdlog" | |
bash -c "! nm -g --defined-only build/libwebcface.dylib | grep -v webcface | grep -v wcf | grep crow" | |
bash -c "! nm -g --defined-only build/libwebcface.dylib | grep -v webcface | grep -v wcf | grep asio" | |
bash -c "! nm -g --defined-only build/libwebcface.dylib | grep -v webcface | grep -v wcf | grep utf8" | |
- name: install | |
run: meson install -C build | |
- name: Test CMake with installed package | |
if: matrix.dep != 'static' | |
working-directory: ${{github.workspace}}/.github/test | |
run: | | |
cmake -B build -DCMAKE_PREFIX_PATH=${{github.workspace}}/build/install | |
cmake --build build | |
- name: Test building with pkg-config | |
if: matrix.dep != 'framework' | |
working-directory: ${{github.workspace}}/.github/test | |
env: | |
PKG_CONFIG_PATH: ${{github.workspace}}/build/install/lib/pkgconfig | |
run: | | |
pkg-config --cflags --libs webcface | |
clang++ -std=c++17 test.cc $(pkg-config --cflags --libs webcface) | |
clang -std=c99 test.c $(pkg-config --cflags --libs webcface) -lc++ | |
- name: Test building with Meson using pkg-config | |
working-directory: ${{github.workspace}}/.github/test | |
env: | |
PKG_CONFIG_PATH: ${{github.workspace}}/build/install/lib/pkgconfig | |
run: | | |
meson setup buildm | |
meson compile -Cbuildm | |
- name: Test building with Meson using CMake | |
if: matrix.dep != 'static' | |
working-directory: ${{github.workspace}}/.github/test | |
run: | | |
meson setup buildmc -Dcmake_prefix_path=${{github.workspace}}/build/install | |
meson compile -Cbuildmc | |
test-macos-cross-clang: | |
strategy: | |
matrix: | |
dep: ["source"] | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
# - run: git submodule update --init | |
# if: matrix.dep == 'submodule' | |
- name: Install Homebrew dependencies | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
run: | | |
brew update --preinstall | |
brew install meson | |
- name: Setup Meson | |
run: > | |
meson setup build | |
--buildtype=debug | |
-Dtest_wait=1000 | |
--prefix=${{github.workspace}}/build/install | |
--cross-file scripts/cross/macos_arm64 | |
- name: Compile | |
run: meson compile -C build || meson compile -C build |