From 2b07d01c90eaa4fe9e19cb96dfef329c5876de71 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 | 47 +++++++++++++++++++++++++++++++++++-- CMakeLists.txt | 2 +- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ad501530..ffbf2462 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,46 @@ 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 + libhdf5-devel + make + ninja + zlib-devel + - name: Configure + run: | + export PATH=/usr/bin:$PATH + cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DMATIO_SHARED=OFF -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}' diff --git a/CMakeLists.txt b/CMakeLists.txt index a99f4047..3bf5e0e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ endif() project(matio VERSION 1.5.26 - LANGUAGES C CXX + LANGUAGES C ) string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)