CI: Update deprecated github actions
[cygport.git] / .github / workflows / cygwin.yml
blobdab677ce28069449132d65e284bc815d56e3f1fa
1 name: Cygwin
2 on:
3   push:
4     branches:
5     - master
6     - 'cygport-*'
7     - 'topic/**'
8   workflow_dispatch:
10 env:
11   CASE_INSENSITIVE: 1
13 jobs:
14   cygport:
15     name: cygport
16     runs-on:  windows-latest
17     steps:
18     - name: Turn off line ending conversion in git
19       run: |
20         git config --global core.autocrlf false
21         git config --global core.eol lf
22     - uses: actions/checkout@v1
23       with:
24         submodules: true
25     - uses: actions/cache@v4
26       with:
27         path: C:\cygwin-packages
28         key: cygwin-packages-${{ hashFiles('C:\cygwin-packages\**') }}
29         restore-keys: cygwin-packages-
30     - name: Fetch Cygwin installer
31       run: |
32         Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile C:\setup.exe
33       shell: powershell
34       # installer should be cacheable
35     - name: Install Cygwin
36       run: |
37         c:\setup.exe -qgnO -s http://mirrors.kernel.org/sourceware/cygwin/ -l C:\cygwin-packages\ -P ^
38         R,^
39         aspell,^
40         automake,^
41         bison,^
42         cmake,^
43         cvs,^
44         diffstat,^
45         dos2unix,^
46         extra-cmake-modules,^
47         flex,^
48         flexdll,^
49         fontforge,^
50         gcc-g++,^
51         git,^
52         git-archive-all,^
53         gnome-common,^
54         gobject-introspection,^
55         help2man,^
56         httpd-devel,^
57         kf5-kdoctools,^
58         libGL-devel,^
59         libGeoIP-devel,^
60         libKF5XmlGui-devel,^
61         libQt5Core-devel,^
62         libQt5Svg-devel,^
63         libQtCore4-devel,^
64         libQtGui4-devel,^
65         libQtNetwork4-devel,^
66         libQtTest4-devel,^
67         libQtXml4-devel,^
68         libRmath,^
69         libSDL2-devel,^
70         libbz2-devel,^
71         libcairomm1.0-devel,^
72         libcrypt-devel,^
73         libgdk_pixbuf2.0-devel,^
74         libgirepository1.0-devel,^
75         libglibmm2.4-devel,^
76         libicu-devel,^
77         liblua-devel,^
78         liblzma-devel,^
79         libnotify-devel,^
80         libpango1.0-devel,^
81         libpcre2-devel,^
82         libqca-devel,^
83         libqca-qt5-devel,^
84         libtirpc-devel,^
85         libxfce4ui1-devel,^
86         libxfconf0-devel,^
87         lndir,^
88         lua,^
89         make,^
90         mate-common,^
91         mercurial,^
92         meson,^
93         mingw64-i686-gcc-core,^
94         mingw64-i686-qt5-base,^
95         mingw64-i686-qt5-tools,^
96         mm-common,^
97         monotone,^
98         ninja,^
99         ocaml,^
100         ocaml-dune,^
101         ocaml-findlib,^
102         patch,^
103         perl,^
104         perl-Module-Build,^
105         php-PEAR,^
106         python38-devel,^
107         python27-wheel,^
108         python37-pip,^
109         python37-setuptools,^
110         python37-wheel,^
111         python38-pip,^
112         python38-setuptools,^
113         python38-wheel,^
114         python38-pygments,^
115         python39-pip,^
116         python39-setuptools,^
117         python39-wheel,^
118         robodoc,^
119         ruby,^
120         ruby-rack,^
121         subversion,^
122         unzip,^
123         xfce4-dev-tools,^
124         xfce4-panel-devel
125       shell: cmd
126     - name: Set PATH
127       run: echo "PATH=C:\cygwin64\bin;C:\cygwin64\lib\lapack;%SYSTEMROOT%\system32" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
128     - name: Fixup Cygwin installation
129       run: |
130         bash --login
131         bash -c '/usr/sbin/alternatives --set python /usr/bin/python3.8'
132         bash -c '/usr/sbin/alternatives --set python3 /usr/bin/python3.8'
133         bash -c '/usr/sbin/alternatives --set python3-config /usr/bin/python3.8-config'
134         bash -c 'sed -i s#/usr/bin/python\$#/usr/bin/python3.9# /usr/bin/pip3.9'
135         bash -c 'git config --system --add safe.directory /cygdrive/d/a/cygport/cygport'
136         bash -c 'git config --system --add safe.directory /cygdrive/d/a/cygport/cygport/data/gnuconfig'
137       continue-on-error: true
138     - name: Build
139       run: |
140         bash -c 'meson _build && ninja -C _build'
141     - name: Test
142       run: |
143         bash -c 'meson test -C _build --print-errorlogs'
144     - name: Upload test logs
145       uses: actions/upload-artifact@v4
146       with:
147         name: testlogs
148         path: _build/meson-logs/*
149       if: ${{ !cancelled() }}