Skip to content

Commit

Permalink
Add Cygwin GitHub Action.
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Mar 11, 2024
1 parent ac95411 commit cd60628
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cwin-auto.yml
Original file line number Diff line number Diff line change
@@ -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}'
50 changes: 50 additions & 0 deletions .github/workflows/cwin-cmake.yml
Original file line number Diff line number Diff line change
@@ -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}'

0 comments on commit cd60628

Please sign in to comment.