/
githubmirror
/
libexpat
Обзор
Документация
Войти
/
githubmirror
/
libexpat
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/windows-build.yml
159 строк
6 KB
Sebastian Pipping
Limit CI runtime and package installation runtime
07 авг 2026, 21:11
07 авг 2026, 21:11
64d2c76
Код
Авторство
О чём код?
# __ __ _ # ___\ \/ /_ __ __ _| |_ # / _ \\ /| '_ \ / _` | __| # | __// \| |_) | (_| | |_ # \___/_/\_\ .__/ \__,_|\__| # |_| XML parser # # Copyright (c) 2025-2026 Sebastian Pipping <sebastian@pipping.org> # Copyright (c) 2026 Tania Somanna <tsomanna@qti.qualcomm.com> # Licensed under the MIT license: # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. name: Build on Windows on: pull_request: push: schedule: - cron: '0 2 * * 5' # Every Friday at 2am workflow_dispatch: permissions: contents: read jobs: windows_build: name: Build on Windows (${{ matrix.runs-on }}, ${{ matrix.cmake_platform }}, ${{ matrix.expat_char_type }}) timeout-minutes: 15 strategy: fail-fast: false matrix: include: - runs-on: windows-2022 cmake_build_type: Debug cmake_generator: Visual Studio 17 2022 cmake_platform: Win32 expat_char_type: char expat_dll: libexpatd.dll expat_sln: expat.sln - runs-on: windows-2022 cmake_build_type: Debug cmake_generator: Visual Studio 17 2022 cmake_platform: x64 expat_char_type: wchar_t expat_dll: libexpatwd.dll expat_sln: expat.sln - runs-on: windows-11-arm cmake_build_type: Debug cmake_generator: Visual Studio 17 2022 cmake_platform: ARM64 expat_char_type: wchar_t expat_dll: libexpatwd.dll expat_sln: expat.sln - runs-on: windows-2025-vs2026 cmake_build_type: Debug cmake_generator: Visual Studio 18 2026 cmake_platform: Win32 expat_char_type: char expat_dll: libexpatd.dll expat_sln: expat.slnx - runs-on: windows-2025-vs2026 cmake_build_type: Debug cmake_generator: Visual Studio 18 2026 cmake_platform: x64 expat_char_type: wchar_t expat_dll: libexpatwd.dll expat_sln: expat.slnx defaults: run: shell: bash runs-on: "${{ matrix.runs-on }}" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0 - name: Configure env: cmake_build_type: ${{ matrix.cmake_build_type }} cmake_generator: ${{ matrix.cmake_generator }} cmake_platform: ${{ matrix.cmake_platform }} expat_char_type: ${{ matrix.expat_char_type }} run: |- cmake_args=( -A "${cmake_platform}" -G "${cmake_generator}" -DCMAKE_BUILD_TYPE="${cmake_build_type}" -DEXPAT_CHAR_TYPE="${expat_char_type}" -DEXPAT_WARNINGS_AS_ERRORS=ON -D_EXPAT_MSVC_ASAN=ON -Wdev -Wdeprecated ) set -x cd expat mkdir build cmake -S . -B build "${cmake_args[@]}" - name: Build env: cmake_build_type: ${{ matrix.cmake_build_type }} expat_sln: ${{ matrix.expat_sln }} run: |- msbuild_args=( -m -property:Configuration="${cmake_build_type}" ) set -x cd expat/build MSBuild.exe "${msbuild_args[@]}" "${expat_sln}" - name: Run tests env: cmake_build_type: ${{ matrix.cmake_build_type }} expat_dll: ${{ matrix.expat_dll }} run: |- ctest_args=( --build-config "${cmake_build_type}" --output-on-failure --parallel 2 ) set -x cd expat/build # Copy ASan DLL in place find \ '/c/Program Files\Microsoft Visual Studio' \ -type f \ -name clang_rt.asan_dynamic-\*.dll \ -exec cp -v {} "tests/${cmake_build_type}/" \; cp -v "${cmake_build_type}/${expat_dll}" "tests/${cmake_build_type}/" ctest "${ctest_args[@]}" - name: Ensure that file libexpat.def.cmake is not missing any symbols run: | symbols_txt="${GITHUB_WORKSPACE}"/.github/workflows/data/exported-symbols-unversioned.txt while read line ; do symbol="$(tr -d '\r' <<<"${line}")" # drops trailing carriage return ( set -x ; grep -q -F " ${symbol} @" expat/lib/libexpat.def.cmake ) # i.e. fail CI if symbol is missing done < "${symbols_txt}"