2020-08-24 00:49:42 +08:00
|
|
|
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
|
2020-10-28 00:29:45 +08:00
|
|
|
- run: dnf install -y autoconf automake make patch perl
|
2020-08-24 00:49:42 +08:00
|
|
|
- run: dnf install -y mingw${{ matrix.pkgarch }}-gcc-c++ mingw${{ matrix.pkgarch }}-winpthreads-static mingw${{ matrix.pkgarch }}-zlib-static
|
|
|
|
|
2020-10-28 00:29:45 +08:00
|
|
|
# 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
|
2020-08-24 00:49:42 +08:00
|
|
|
- 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
|
2020-10-28 00:29:45 +08:00
|
|
|
- run: cd winsup && ./autogen.sh
|
2020-08-24 00:49:42 +08:00
|
|
|
- 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
|
2021-04-30 03:16:48 +08:00
|
|
|
|
|
|
|
windows-build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- pkgarch: x86_64
|
|
|
|
- pkgarch: i686
|
|
|
|
name: Windows native ${{ matrix.pkgarch }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# checkout action uses the native git (we can avoid this messing up line
|
|
|
|
# endings, but this could still be dangerous e.g if we need symlinks in the
|
|
|
|
# repo)
|
|
|
|
- run: git config --global core.autocrlf input
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
# install cygwin and build tools
|
|
|
|
- name: Install Cygwin
|
|
|
|
uses: cygwin/cygwin-install-action@master
|
|
|
|
with:
|
|
|
|
platform: ${{ matrix.pkgarch }}
|
|
|
|
packages: >-
|
|
|
|
autoconf,
|
|
|
|
automake,
|
|
|
|
cocom,
|
|
|
|
dblatex,
|
|
|
|
dejagnu,
|
|
|
|
docbook-xml45,
|
|
|
|
docbook-xsl,
|
|
|
|
docbook2X,
|
|
|
|
gcc-g++,
|
|
|
|
gettext-devel,
|
|
|
|
libiconv,
|
|
|
|
libiconv-devel,
|
|
|
|
make,
|
|
|
|
mingw64-${{ matrix.pkgarch }}-gcc-g++,
|
|
|
|
mingw64-${{ matrix.pkgarch }}-zlib,
|
|
|
|
patch,
|
|
|
|
perl,
|
2021-12-30 08:33:28 +08:00
|
|
|
python39-lxml,
|
|
|
|
python39-ply,
|
2021-04-30 03:16:48 +08:00
|
|
|
texlive-collection-fontsrecommended,
|
|
|
|
texlive-collection-latexrecommended,
|
|
|
|
texlive-collection-pictures,
|
|
|
|
xmlto,
|
|
|
|
zlib-devel
|
|
|
|
|
|
|
|
# build
|
|
|
|
- name: Build Cygwin
|
|
|
|
run: >-
|
|
|
|
export PATH=/usr/bin:$(cygpath ${SYSTEMROOT})/system32 &&
|
|
|
|
mkdir build install &&
|
|
|
|
(cd winsup; ./autogen.sh) &&
|
|
|
|
cd build &&
|
|
|
|
../configure --prefix=$(realpath $(pwd)/../install) -v &&
|
|
|
|
export MAKEFLAGS=-j$(ncores) &&
|
|
|
|
make &&
|
|
|
|
make install &&
|
|
|
|
(cd */newlib; make info man) &&
|
|
|
|
(cd */newlib; make install-info install-man) &&
|
|
|
|
(cd */winsup; test "${{ matrix.pkgarch }}" != 'x86_64' || make check || true)
|
|
|
|
shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}'
|