summaryrefslogtreecommitdiffstats
path: root/.github/workflows/cygwin-auto.yml
blob: 13e08eb8aca1c7b202c0fe381e570e81b1ad11d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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

      - name: Get Sources
        uses: actions/checkout@v4.1.1

      - name: Install Cygwin
        uses: cygwin/cygwin-install-action@master
        with:
          packages: autoconf automake make gcc-fortran libtool zlib-devel m4 flex bison perl

      - name: Autotools Configure
        shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
        run: |
          export PATH=/usr/bin:$PATH
          sh ./autogen.sh
          mkdir build
          cd build
          ../configure \
            --enable-build-mode=${{ inputs.build_mode }} \
            --enable-shared \
            --enable-fortran

      - name: Autotools Build
        shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
        run: |
          export PATH=/usr/bin:$PATH
          cd build
          make -j3

      - name: Autotools Run Tests
        shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
        run: |
          export PATH=/usr/bin:$PATH
          cd build
#          make check -j ---- cache test fails

      - name: Autotools Install
        shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
        run: |
          export PATH=/usr/bin:$PATH
          cd build
          make install