diff --git a/.github/workflows/windows-cmake.yml b/.github/workflows/windows-cmake.yml new file mode 100644 index 000000000..41744af11 --- /dev/null +++ b/.github/workflows/windows-cmake.yml @@ -0,0 +1,82 @@ +# Windows (MSYS2 / UCRT64) CMake CI for libretroshare on its own. +# +# Same standalone build as ubuntu-cmake.yml: libretroshare has its own top level +# CMakeLists.txt and pulls rnp, OpenPGP-SDK, BitDHT, rapidjson, restbed and +# udp-discovery-cpp through FetchContent, so no super-project and no submodules +# are involved. Only the MSYS2 packages below are installed. +# +# Windows earns its own job rather than a matrix entry: it is where portability +# breaks first, its dependencies come from pacman rather than apt, and it needs +# the two -include flags below, which the super-project's Windows job also +# carries -- librnp uses strlen and the fixed width integer types without +# including and , which this toolchain refuses. +# +# No Qt packages: this repository builds no GUI. +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +name: Windows UCRT64 CMake C/C++ CI + +on: + push: + paths-ignore: + - '**/*.md' + pull_request: + paths-ignore: + - '**/*.md' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + build: + name: Windows UCRT64 / CMake + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup MSYS2 (UCRT64) + uses: msys2/setup-msys2@40677d36a502eb2cf0fb808cc9dec31bf6152638 # v2.28.0 + with: + msystem: UCRT64 + update: true + install: >- + base-devel + git + mingw-w64-ucrt-x86_64-toolchain + mingw-w64-ucrt-x86_64-cmake + mingw-w64-ucrt-x86_64-ninja + mingw-w64-ucrt-x86_64-python + mingw-w64-ucrt-x86_64-doxygen + mingw-w64-ucrt-x86_64-openssl + mingw-w64-ucrt-x86_64-sqlcipher + mingw-w64-ucrt-x86_64-miniupnpc + mingw-w64-ucrt-x86_64-json-c + mingw-w64-ucrt-x86_64-bzip2 + mingw-w64-ucrt-x86_64-zlib + + - name: CMake configure + run: > + cmake -G Ninja -B Build-cmake -S . + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DCMAKE_BUILD_TYPE=Release + -DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=OFF + -DRS_SQLCIPHER=ON -DRS_BITDHT=ON + -DRS_BRODCAST_DISCOVERY=ON -DRS_MINIUPNPC=ON + -DRS_FORUM_DEEP_INDEX=OFF + -DCMAKE_C_FLAGS="-include string.h -include stdint.h" + -DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body" + + - name: CMake build + run: cmake --build Build-cmake -j3