From cd606285669a3c8026a6c7c6990067690e7b0e15 Mon Sep 17 00:00:00 2001 From: Hyo-Kyung Lee Date: Sun, 10 Mar 2024 22:04:18 -0500 Subject: [PATCH] Add Cygwin GitHub Action. --- .github/workflows/cwin-auto.yml | 59 ++++++++++++++++++++++++++++++++ .github/workflows/cwin-cmake.yml | 50 +++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 .github/workflows/cwin-auto.yml create mode 100644 .github/workflows/cwin-cmake.yml diff --git a/.github/workflows/cwin-auto.yml b/.github/workflows/cwin-auto.yml new file mode 100644 index 00000000000..4402845518e --- /dev/null +++ b/.github/workflows/cwin-auto.yml @@ -0,0 +1,59 @@ +name: hdf5 dev autotools Cygwin + +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +permissions: + contents: read + +jobs: + cygwin_build_and_test: + name: "Cygwin ${{ inputs.build_mode }}" + runs-on: windows-latest + steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf input + + - uses: actions/checkout@v4 + + - name: Install Cygwin + uses: cygwin/cygwin-install-action@master + with: + packages: automake make gcc-fortran libjpeg-devel libtool zlib-devel + + - name: Autotools Configure + run: | + export PATH=/usr/bin:$PATH + ./autogen.sh + ./configure --enable-build-mode=${{ inputs.build_mode }} + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + + - name: Autotools Build + run: | + export PATH=/usr/bin:$PATH + make + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + + - name: Autotools Run Tests + run: | + export PATH=/usr/bin:$PATH + make check + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + + - name: Autotools Install + run: | + export PATH=/usr/bin:$PATH + make install + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + + - name: Autotools Uninstall + run: | + export PATH=/usr/bin:$PATH + make uninstall + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' diff --git a/.github/workflows/cwin-cmake.yml b/.github/workflows/cwin-cmake.yml new file mode 100644 index 00000000000..cc32f2c70b9 --- /dev/null +++ b/.github/workflows/cwin-cmake.yml @@ -0,0 +1,50 @@ +name: hdf5 dev CMake Cygwin + +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +jobs: + cygwin_build_and_test: + name: "Cygwin ${{ inputs.build_mode }}" + runs-on: windows-latest + steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf input + + - uses: actions/checkout@v4 + + - name: Install Cygwin + uses: cygwin/cygwin-install-action@master + with: + packages: cmake gcc-fortran make ninja perl zlib-devel + + - name: Configure + run: | + export PATH=/usr/bin:$PATH + mkdir build + cd build + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ + -D BUILD_SHARED_LIBS:BOOL=OFF \ + .. + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + + - name: Build + run: | + export PATH=/usr/bin:$PATH + cd build + ctest -T Build + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}' + + - name: Test + run: | + export PATH=/usr/bin:$PATH + cd build + ctest -T Test + shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'