Build Cygwin on windows-2022 with newer python. [buildall]
[rsync.git] / .github / workflows / build.yml
1 name: build
2
3 on:
4   push:
5     branches: [ master ]
6     paths-ignore: [ .cirrus.yml ]
7   pull_request:
8     branches: [ master ]
9     paths-ignore: [ .cirrus.yml ]
10   schedule:
11     - cron: '42 8 * * *'
12
13 jobs:
14
15   ubuntu-build:
16     runs-on: ubuntu-20.04
17     steps:
18     - uses: actions/checkout@v2
19     - name: prep
20       run: |
21         sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl wget
22         wget -O git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
23         echo "/usr/local/bin" >>$GITHUB_PATH
24     - name: configure
25       run: ./configure --with-rrsync
26     - name: make
27       run: make
28     - name: install
29       run: sudo make install
30     - name: info
31       run: rsync --version
32     - name: check
33       run: sudo RSYNC_EXPECT_SKIPPED=crtimes make check
34     - name: check30
35       run: sudo RSYNC_EXPECT_SKIPPED=crtimes make check30
36     - name: check29
37       run: sudo RSYNC_EXPECT_SKIPPED=crtimes make check29
38     - name: ssl file list
39       run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
40     - name: save artifact
41       uses: actions/upload-artifact@v2
42       with:
43         name: ubuntu-bin
44         path: |
45           rsync
46           rsync-ssl
47           rsync.1
48           rsync-ssl.1
49           rsyncd.conf.5
50           rrsync.1
51           rrsync
52
53   macos-build:
54     runs-on: macos-latest
55     steps:
56     - uses: actions/checkout@v2
57     - name: prep
58       run: |
59         brew install automake openssl xxhash zstd lz4 wget
60         sudo pip3 install commonmark
61         wget -O git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
62         echo "/usr/local/bin" >>$GITHUB_PATH
63     - name: configure
64       run: CPPFLAGS=-I/usr/local/opt/openssl/include/ LDFLAGS=-L/usr/local/opt/openssl/lib/ ./configure --with-rrsync
65     - name: make
66       run: make
67     - name: install
68       run: sudo make install
69     - name: info
70       run: rsync --version
71     - name: check
72       run: sudo RSYNC_EXPECT_SKIPPED=acls-default,chmod-temp-dir,chown-fake,devices-fake,dir-sgid,protected-regular,xattrs-hlink,xattrs make check
73     - name: ssl file list
74       run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
75     - name: save artifact
76       uses: actions/upload-artifact@v2
77       with:
78         name: macos-bin
79         path: |
80           rsync
81           rsync-ssl
82           rsync.1
83           rsync-ssl.1
84           rsyncd.conf.5
85           rrsync.1
86           rrsync
87
88   cygwin-build:
89     runs-on: windows-2022
90     if: (github.event_name == 'schedule' || contains(github.event.head_commit.message, '[buildall]'))
91     steps:
92     - uses: actions/checkout@v2
93     - name: cygwin
94       run: choco install -y --no-progress cygwin cyg-get
95     - name: prep
96       run: |
97         cyg-get make autoconf automake gcc-core attr libattr-devel python39 python39-pip libzstd-devel liblz4-devel libssl-devel libxxhash0 libxxhash-devel
98         curl.exe -o git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
99         echo "C:/tools/cygwin/bin" >>$Env:GITHUB_PATH
100     - name: commonmark
101       run: bash -c 'python3 -mpip install --user commonmark'
102     - name: configure
103       run: bash -c './configure --with-rrsync'
104     - name: make
105       run: bash -c 'make'
106     - name: install
107       run: bash -c 'make install'
108     - name: info
109       run: bash -c '/usr/local/bin/rsync --version'
110     - name: check
111       run: bash -c 'RSYNC_EXPECT_SKIPPED=acls-default,acls,chown,devices,dir-sgid,protected-regular make check'
112     - name: ssl file list
113       run: bash -c 'PATH="/usr/local/bin:$PATH" rsync-ssl --no-motd download.samba.org::rsyncftp/ || true'
114     - name: save artifact
115       uses: actions/upload-artifact@v2
116       with:
117         name: cygwin-bin
118         path: |
119           rsync.exe
120           rsync-ssl
121           rsync.1
122           rsync-ssl.1
123           rsyncd.conf.5
124           rrsync.1
125           rrsync