aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/cygwin.yml
blob: f9a9a7ae5bf5c157beb3a5ff7ff82cc79ebafd1f (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
name: cygwin

on: push

jobs:
  fedora-build:
    runs-on: ubuntu-latest
    container: fedora:latest
    strategy:
      fail-fast: false
      matrix:
        include:
        - target: x86_64-pc-cygwin
          pkgarch: 64
        - target: i686-pc-cygwin
          pkgarch: 32
    name: Fedora cross ${{ matrix.target }}

    steps:
    - uses: actions/checkout@v2

    # install build tools
    - run: dnf install -y autoconf automake make patch perl
    - run: dnf install -y mingw${{ matrix.pkgarch }}-gcc-c++ mingw${{ matrix.pkgarch }}-winpthreads-static mingw${{ matrix.pkgarch }}-zlib-static

    # enable 'dnf copr'
    - run: dnf install -y dnf-plugins-core

    # cocom isn't packaged in Fedora, so we install from a copr
    - run: dnf copr enable -y jturney/cocom
    - run: dnf install -y cocom

    # install cross-cygwin toolchain and libs from copr
    - run: dnf copr enable -y yselkowitz/cygwin
    - run: dnf install -y cygwin${{ matrix.pkgarch }}-gcc-c++ cygwin${{ matrix.pkgarch }}-gettext cygwin${{ matrix.pkgarch }}-libbfd cygwin${{ matrix.pkgarch }}-libiconv cygwin${{ matrix.pkgarch }}-zlib

    # install doc tools
    - run: dnf install -y dblatex docbook2X docbook-xsl xmlto
    - run: dnf install -y python3 python3-lxml python3-ply

    # build
    - run: mkdir build install
    - run: cd winsup && ./autogen.sh
    - run: cd build && ../configure --target=${{ matrix.target }} --prefix=$(realpath $(pwd)/../install)
    - run: make -C build
    - run: make -C build/*/newlib info man
    - run: make -C build install
    - run: make -C build/*/newlib install-info install-man