From bba9fd4803b5a919301856eb38d5f7707edb36ba Mon Sep 17 00:00:00 2001 From: tbeu Date: Tue, 12 Mar 2024 21:15:08 +0100 Subject: [PATCH] Build with Cygwin via GitHub Actions [skip travis] [skip cirrus] [skip appveyor] --- .github/workflows/cmake.yml | 58 +++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ad501530..30751fcb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -90,8 +90,8 @@ jobs: "$MATDUMP" -V build-openbsd: - runs-on: ubuntu-latest name: openbsd-clang + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -120,8 +120,8 @@ jobs: ./build/matdump -v -f whos ./share/test_file.mat build-solaris: - runs-on: ubuntu-latest name: solaris-gcc + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -151,3 +151,57 @@ jobs: ./build/matdump -v ./share/test_file.mat ./build/matdump -v -f whos ./share/test_file.mat + build-cygwin: + name: ${{ matrix.toolchain }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + toolchain: + - windows-cygwin + configuration: + - Release + include: + - toolchain: windows-cygwin + os: windows-latest + compiler: gcc + steps: + - name: Set git to use LF + run: git config --global core.autocrlf input + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 5 + - name: Setup cygwin + uses: cygwin/cygwin-install-action@master + with: + packages: >- + cmake + gcc-core + gcc-g++ + libhdf5-devel + make + ninja + zlib-devel + - name: Configure + run: | + export PATH=/usr/bin:$PATH + cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G Ninja + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + env: + CYGWIN_NOWINPATH: 1 + - name: Build with ${{ matrix.compiler }} + run: | + export PATH=/usr/bin:$PATH + cmake --build build -- -j8 + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + - name: Test + run: | + for file in ./share/*.mat; do + ./build/bin/matdump -d "$file" d + ./build/bin/matdump -v "$file" + ./build/bin/matdump -v -f whos "$file" + done + ./build/bin/matdump -v -H + ./build/bin/matdump -V + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'