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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
name: cygwin
on:
push:
# since master is a symbolic reference to main, don't run for both
branches-ignore:
- 'master'
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:
- uses: actions/checkout@v3
# 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
- run: fmtutil-sys --byfmt pdflatex && texhash
# 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
windows-build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-cygwin
pkgarch: x86_64
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@v3
# install cygwin and build tools
- name: Install Cygwin
uses: cygwin/cygwin-install-action@master
with:
platform: ${{ matrix.pkgarch }}
packages: >-
autoconf,
automake,
busybox,
cocom,
cygutils-extra,
dblatex,
dejagnu,
docbook-xml45,
docbook-xsl,
docbook2X,
gcc-g++,
gettext-devel,
libiconv,
libiconv-devel,
libzstd-devel,
make,
mingw64-${{ matrix.pkgarch }}-gcc-g++,
mingw64-${{ matrix.pkgarch }}-zlib,
patch,
perl,
python39-lxml,
python39-ply,
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$(nproc) &&
make &&
make install &&
(cd */newlib; make info man) &&
(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 &&
(export PATH=${{ matrix.target }}/winsup/testsuite/testinst/bin:${PATH} && cmd /c $(cygpath -wa ${{ matrix.target }}/winsup/cygserver/cygserver) &) &&
(cd ${{ matrix.target }}/winsup; make check AM_COLOR_TESTS=always || true)
shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}'
# 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() }}
# 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'
|