2020-08-24 00:49:42 +08:00
|
|
|
name: cygwin
|
|
|
|
|
2023-07-23 00:47:02 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
# since master is a symbolic reference to main, don't run for both
|
|
|
|
branches-ignore:
|
|
|
|
- 'master'
|
2020-08-24 00:49:42 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
fedora-build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: fedora:latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- target: x86_64-pc-cygwin
|
|
|
|
pkgarch: 64
|
|
|
|
name: Fedora cross ${{ matrix.target }}
|
|
|
|
|
|
|
|
steps:
|
2023-07-22 20:23:15 +08:00
|
|
|
- uses: actions/checkout@v3
|
2020-08-24 00:49:42 +08:00
|
|
|
|
|
|
|
# install build tools
|
2023-07-22 21:00:17 +08:00
|
|
|
- name: Install build tools
|
|
|
|
run: |
|
|
|
|
dnf install -y autoconf automake make patch perl mingw${{ matrix.pkgarch }}-gcc-c++ mingw${{ matrix.pkgarch }}-winpthreads-static mingw${{ matrix.pkgarch }}-zlib-static
|
2020-08-24 00:49:42 +08:00
|
|
|
|
2020-10-28 00:29:45 +08:00
|
|
|
# enable 'dnf copr'
|
2023-07-22 21:00:17 +08:00
|
|
|
- name: Enable 'dnf copr'
|
|
|
|
run: |
|
|
|
|
dnf install -y dnf-plugins-core
|
2020-08-24 00:49:42 +08:00
|
|
|
|
|
|
|
# install cross-cygwin toolchain and libs from copr
|
2023-07-22 21:00:17 +08:00
|
|
|
- name: Install cross-cygwin toolchain and libs and cocom from copr
|
|
|
|
run: |
|
|
|
|
dnf copr enable -y yselkowitz/cygwin
|
|
|
|
dnf install -y cygwin${{ matrix.pkgarch }}-gcc-c++ cygwin${{ matrix.pkgarch }}-gettext cygwin${{ matrix.pkgarch }}-libbfd cygwin${{ matrix.pkgarch }}-libiconv cygwin${{ matrix.pkgarch }}-zlib cocom
|
2020-08-24 00:49:42 +08:00
|
|
|
|
|
|
|
# install doc tools
|
2023-07-22 21:00:17 +08:00
|
|
|
- name: Install doc tools
|
|
|
|
run: |
|
|
|
|
dnf install -y dblatex docbook2X docbook-xsl xmlto python3 python3-lxml python3-ply
|
|
|
|
fmtutil-sys --byfmt pdflatex && texhash
|
2020-08-24 00:49:42 +08:00
|
|
|
|
|
|
|
# build
|
2023-07-22 21:00:17 +08:00
|
|
|
- name: Configure, build and install
|
|
|
|
run: |
|
|
|
|
mkdir build install
|
|
|
|
(cd winsup && ./autogen.sh)
|
|
|
|
(cd build && ../configure --target=${{ matrix.target }} --prefix=$(realpath $(pwd)/../install) )
|
|
|
|
make -C build
|
|
|
|
make -C build/*/newlib info man
|
|
|
|
make -C build install
|
|
|
|
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:
|
2022-09-01 21:07:26 +08:00
|
|
|
- target: x86_64-pc-cygwin
|
|
|
|
pkgarch: x86_64
|
2021-04-30 03:16:48 +08:00
|
|
|
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
|
2023-07-22 20:23:15 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-30 03:16:48 +08:00
|
|
|
|
|
|
|
# install cygwin and build tools
|
|
|
|
- name: Install Cygwin
|
|
|
|
uses: cygwin/cygwin-install-action@master
|
|
|
|
with:
|
|
|
|
platform: ${{ matrix.pkgarch }}
|
|
|
|
packages: >-
|
|
|
|
autoconf,
|
|
|
|
automake,
|
2023-07-04 20:59:14 +08:00
|
|
|
busybox,
|
2021-04-30 03:16:48 +08:00
|
|
|
cocom,
|
2023-07-11 22:40:09 +08:00
|
|
|
cygutils-extra,
|
2021-04-30 03:16:48 +08:00
|
|
|
dblatex,
|
|
|
|
dejagnu,
|
|
|
|
docbook-xml45,
|
|
|
|
docbook-xsl,
|
|
|
|
docbook2X,
|
|
|
|
gcc-g++,
|
|
|
|
gettext-devel,
|
|
|
|
libiconv,
|
|
|
|
libiconv-devel,
|
2023-02-14 21:52:39 +08:00
|
|
|
libzstd-devel,
|
2021-04-30 03:16:48 +08:00
|
|
|
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 &&
|
2022-09-01 21:07:26 +08:00
|
|
|
export MAKEFLAGS=-j$(nproc) &&
|
2021-04-30 03:16:48 +08:00
|
|
|
make &&
|
|
|
|
make install &&
|
|
|
|
(cd */newlib; make info man) &&
|
2022-09-01 21:07:26 +08:00
|
|
|
(cd */newlib; make install-info install-man)
|
|
|
|
shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}'
|
|
|
|
|
|
|
|
# test
|
|
|
|
- name: Test Cygwin
|
|
|
|
run: >-
|
|
|
|
export PATH=/usr/bin:$(cygpath ${SYSTEMROOT})/system32 &&
|
|
|
|
export MAKEFLAGS=-j$(nproc) &&
|
|
|
|
cd build &&
|
2023-07-04 20:59:14 +08:00
|
|
|
(export PATH=${{ matrix.target }}/winsup/testsuite/testinst/bin:${PATH} && cmd /c $(cygpath -wa ${{ matrix.target }}/winsup/cygserver/cygserver) &) &&
|
2023-07-23 04:04:28 +08:00
|
|
|
(cd ${{ matrix.target }}/winsup; make check AM_COLOR_TESTS=always)
|
2021-04-30 03:16:48 +08:00
|
|
|
shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}'
|
2023-07-09 03:53:54 +08:00
|
|
|
|
|
|
|
# upload test logs to facilitate investigation of problems
|
|
|
|
- name: Upload test logs
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: testlogs
|
|
|
|
path: |
|
|
|
|
build/${{ matrix.target }}/winsup/testsuite/**/*.log
|
|
|
|
build/${{ matrix.target }}/winsup/testsuite/**/*.trs
|
|
|
|
if: ${{ !cancelled() }}
|
2023-07-22 20:23:15 +08:00
|
|
|
|
|
|
|
# workaround problems with actions/checkout post-run step using cygwin git
|
|
|
|
- name: Avoid actions/checkout post-run step using Cygwin git
|
|
|
|
run: bash -c 'rm /usr/bin/git.exe'
|