test: Make json comparison order independent #1664
Workflow file for this run
This file contains hidden or 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: MSYS2 | |
on: [push, pull_request] | |
jobs: | |
mingw: | |
name: mingw | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
#fail-fast: false | |
include: | |
# Deprecate 32 bits - { icon: 'β¬', sys: mingw32 } | |
- { icon: 'π¦', sys: mingw64 } | |
- { icon: 'π¨', sys: ucrt64 } # Experimental! | |
- { icon: 'π§', sys: clang64 } # Experimental! | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
# see https://github.com/msys2/setup-msys2 | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: '${{ matrix.icon }} Setup MSYS2' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
cgal:p | |
nlohmann-json:p | |
- name: 'π§ Build TOOL' | |
run: | | |
MSYSTEM= cmake -G"Ninja" -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=D:/a/_temp/msys64/${{ matrix.sys }} -DSFCGAL_CONFIG_EXECUTABLE=D:/a/_temp/msys64/${{ matrix.sys }}/bin/sfcgal-config | |
MSYSTEM= cmake --build build | |
MSYSTEM= cmake --install build | |
echo "π Testing sfcgal-config --libs output..." | |
LIBS_OUTPUT=$(MSYSTEM= D:/a/_temp/msys64/${{ matrix.sys }}/bin/sfcgal-config --libs) | |
echo "Output: $LIBS_OUTPUT" | |
if [[ "$LIBS_OUTPUT" =~ -L[[:space:]]*-l ]]; then | |
echo "β ERROR: sfcgal-config --libs returned empty library path: $LIBS_OUTPUT" | |
exit 1 | |
elif [[ "$LIBS_OUTPUT" =~ -L.*/${{ matrix.sys }}/lib.*-lSFCGAL ]]; then | |
echo "β SUCCESS: sfcgal-config --libs returned valid path: $LIBS_OUTPUT" | |
else | |
echo "β οΈ WARNING: Unexpected format for sfcgal-config --libs: $LIBS_OUTPUT" | |
fi | |
MSYSTEM= ctest -V --output-on-failure --test-dir build |