macos-12のciでbrewを使わない #328
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 (Windows Cygwin64) | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [] | |
env: | |
SHELLOPTS: igncr | |
jobs: | |
test-windows-cygwin: | |
strategy: | |
matrix: | |
dep: ["source", "static"] | |
runs-on: windows-latest | |
steps: | |
# Cygwinのgawkがcrlfを処理できないので、必要 (SHELLOPTSを設定しても意味ない) | |
# それはそれとしてymlのコマンドを処理するのにSHELLOPTSも必要 | |
- run: git config --global core.autocrlf input | |
- uses: actions/checkout@v4 | |
# - run: git submodule update --init | |
# if: matrix.dep == 'submodule' | |
- uses: cygwin/cygwin-install-action@master | |
with: | |
# platform: x86 | |
packages: >- | |
gcc-core | |
gcc-g++ | |
cmake | |
make | |
ninja | |
pkg-config | |
meson | |
# git -> error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none | |
# cygwinの中でもconfigを設定する? | |
- run: git config --global core.autocrlf input | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
- name: Setup Meson | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: > | |
meson setup build | |
--buildtype=debug | |
-Dtest_wait=1000 | |
$([[ ${{matrix.dep}} = static ]] && echo -Ddefault_library=static) | |
--prefix=$(cygpath -u '${{github.workspace}}/build/install') | |
- name: Compile | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: meson compile -C build || meson compile -C build | |
- name: Test | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: meson test -C build --print-errorlog | |
- name: Check Exported Symbol | |
if: matrix.dep == 'submodule' | |
shell: pwsh -command ". '{0}'" | |
run: | | |
${VS_INST_PATH} = & "${env:ProgramFiles(x86)}/Microsoft Visual Studio/Installer/vswhere.exe" -latest -property installationPath | |
Write-Output " <-> VS Install Path: ${VS_INST_PATH}" | |
Import-Module ${VS_INST_PATH}/Common7/Tools/Microsoft.VisualStudio.DevShell.dll | |
Enter-VsDevShell -VsInstallPath ${VS_INST_PATH} -SkipAutomaticLocation -DevCmdArguments '-arch=${{matrix.config.arch}} -no_logo' | |
C:\msys64\usr\bin\bash.exe -c "export PATH=\"/usr/bin:$PATH\" && dumpbin //exports build/*webcface*.dll | grep -A 10000 RVA | grep -B 10000 Summary | grep -v webcface | grep -v wcf" | |
C:\msys64\usr\bin\bash.exe -c "export PATH=\"/usr/bin:$PATH\" && [[ $(dumpbin //exports build/*webcface*.dll | grep -A 10000 RVA | grep -B 10000 Summary | grep -v webcface | grep -v wcf | wc -l) = 4 ]]" | |
- name: install | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: meson install -C build | |
- name: Test CMake with installed package | |
if: matrix.dep != 'static' | |
working-directory: ${{github.workspace}}/.github/test | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: | | |
cmake -B build -DCMAKE_PREFIX_PATH=../../build/install -GNinja | |
cmake --build build --config Debug | |
- name: Test building with pkg-config | |
working-directory: ${{github.workspace}}/.github/test | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: | | |
export PKG_CONFIG_PATH=$(cygpath -u '${{github.workspace}}\build\install\lib\pkgconfig') | |
g++ -std=c++20 test.cc $(pkg-config --cflags --libs webcface) | |
gcc -std=c99 test.c $(pkg-config --cflags --libs webcface) -lstdc++ | |
- name: Test building with Meson using pkg-config | |
working-directory: ${{github.workspace}}/.github/test | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: | | |
export PKG_CONFIG_PATH=$(cygpath -u '${{github.workspace}}\build\install\lib\pkgconfig') | |
meson setup buildm | |
meson compile -Cbuildm | |
- name: Test building with Meson using CMake | |
if: matrix.dep != 'static' | |
working-directory: ${{github.workspace}}/.github/test | |
shell: C:\cygwin\bin\bash.exe '{0}' | |
run: | | |
meson setup buildmc -Dcmake_prefix_path=$(cygpath -u '${{github.workspace}}\build\install') | |
meson compile -Cbuildmc |