launcher update #1423
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 MinGW64 GCC) | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [] | |
jobs: | |
test-windows-gcc: | |
strategy: | |
matrix: | |
dep: ["pacman", "source", "static"] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
git | |
mingw-w64-ucrt-x86_64-gcc | |
mingw-w64-ucrt-x86_64-cmake | |
mingw-w64-ucrt-x86_64-meson | |
mingw-w64-ucrt-x86_64-ninja | |
make | |
msystem: UCRT64 | |
# - run: git submodule update --init | |
# if: matrix.dep == 'submodule' | |
- name: Install dependencies | |
if: matrix.dep == 'pacman' | |
run: pacman -S --noconfirm mingw-w64-ucrt-x86_64-msgpack-cxx mingw-w64-ucrt-x86_64-spdlog mingw-w64-ucrt-x86_64-asio mingw-w64-ucrt-x86_64-cli11 mingw-w64-ucrt-x86_64-utf8cpp | |
# msgpack-cxx はmingw64だけ無い | |
- name: Setup Meson | |
env: | |
CC: gcc | |
CXX: g++ | |
run: > | |
meson setup build | |
--buildtype=debug | |
$([[ ${{matrix.dep}} = pacman ]] && echo -Dwrap_mode=default) | |
-Dtest_wait=1000 | |
$([[ ${{matrix.dep}} = static ]] && echo -Ddefault_library=static) | |
--prefix=$(cygpath -m '${{github.workspace}}/build/install') | |
"-Dforce_fallback_for=['libcurl']" | |
- 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 == '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 | |
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=../../build/install | |
cmake --build build --config Debug | |
- name: Test building with pkg-config | |
working-directory: ${{github.workspace}}/.github/test | |
run: | | |
export PKG_CONFIG_PATH=$(cygpath -m '${{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 | |
run: | | |
export PKG_CONFIG_PATH=$(cygpath -m '${{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 | |
run: | | |
meson setup buildmc -Dcmake_prefix_path=$(cygpath -m '${{github.workspace}}\build\install') | |
meson compile -Cbuildmc |