liba 0.1.15

An algorithm library based on C/C++
Documentation
name: msys2
on:
  workflow_dispatch:
jobs:
  MSYS2:
    strategy:
      fail-fast: false
      matrix:
        include: [
          { triple: x64, sys: UCRT64 },
          { triple: x64, sys: MINGW64 },
          { triple: x86, sys: MINGW32 },
          { triple: x64, sys: CLANG64 },
          { triple: x86, sys: CLANG32 },
        ]
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
        with:
          lfs: true
          submodules: true
      - uses: msys2/setup-msys2@v2
        with:
          cache: false
          update: true
          location: D:\
          msystem: ${{ matrix.sys }}
          install: >-
            patch
          pacboy: >-
            toolchain:p
            cmake:p
            ninja:p
            lua:p
            cython:p
            python:p
            python-pip:p
            python-setuptools:p
      - name: Run debug
        shell: msys2 {0}
        env:
          MSYSTEM: ${{ matrix.sys }}
        run: env
      - name: Run cmake
        shell: msys2 {0}
        env:
          MSYSTEM: ${{ matrix.sys }}
        run: |
          set -x
          cmake -S . -B build -G Ninja -DPython_ROOT_DIR=D:/msys64/${{ matrix.sys }} \
            -DCMAKE_INSTALL_PREFIX=_ \
            -DBUILD_TESTING=1 \
            -DLIBA_WARNINGS=1 \
            -DLIBA_ANALYZER=1 \
            -DLIBA_PYTHON=1 \
            -DLIBA_JAVA=1 \
            -DLIBA_LUA=1 \
            -DLIBA_WITH_QUICKJS=1
      - name: Run ninja
        shell: msys2 {0}
        env:
          MSYSTEM: ${{ matrix.sys }}
          LIBA_OPENMP: ${{ !startsWith(matrix.sys, 'CLANG') }}
        run: |
          set -x
          cmake --build build --target package
      - name: Run ctest
        shell: msys2 {0}
        env:
          MSYSTEM: ${{ matrix.sys }}
          CTEST_OUTPUT_ON_FAILURE: 1
        run: |
          set -x
          cmake --build build --target test
      - name: Run example
        shell: msys2 {0}
        env:
          MSYSTEM: ${{ matrix.sys }}
        run: |
          set -x
          cmake --build build --config RelWithDebInfo --target install
          cmake -S example -B example/build -DCMAKE_PREFIX_PATH=$(pwd)/_
          cmake --build example/build -v
      - uses: actions/checkout@v4
        with:
          repository: microsoft/vcpkg
          path: _/vcpkg
      - name: Run vcpkg
        shell: msys2 {0}
        env:
          MSYSTEM: ${{ matrix.sys }}
        run: |
          set -x
          cmake -B build -DLIBA_VCPKG=$(pwd)/_/vcpkg
          _/vcpkg/bootstrap-vcpkg.sh -disableMetrics
          _/vcpkg/vcpkg install liba[ipo,pkgconfig]:${{ matrix.triple }}-mingw-static
          _/vcpkg/vcpkg install liba[ipo,pkgconfig]:${{ matrix.triple }}-mingw-dynamic