Skip to content

Commit 60c69f8

Browse files
author
Paul Yang
authored
Merge pull request #2 from dongbeiouba/master
add windows ci; add release ci
2 parents f7adbe7 + bc4b231 commit 60c69f8

File tree

3 files changed

+184
-3
lines changed

3 files changed

+184
-3
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,58 @@ jobs:
4343
- name: build wget
4444
working-directory: ./wget
4545
run: |
46-
./bootstrap
46+
./bootstrap --skip-po --no-bootstrap-sync
4747
autoreconf -fi
4848
./configure --with-ssl=openssl --with-libssl-prefix=${RUNNER_TEMP}/tongsuo --disable-ntlm
4949
make -s -j4
50-
50+
build-on-windows:
51+
name: "build-windows-latest"
52+
runs-on: windows-latest
53+
timeout-minutes: 60
54+
steps:
55+
- uses: msys2/setup-msys2@v2
56+
with:
57+
location: ${{ runner.temp }}
58+
- name: install dependencies
59+
shell: msys2 {0}
60+
run: |
61+
pacman -S --noconfirm base-devel msys2-runtime-devel mingw-w64-x86_64-toolchain autoconf automake git gperf pkg-config autoconf-archive gcc
62+
ls -l ${RUNNER_TEMP}
63+
find ${RUNNER_TEMP} -type d -name openssl
64+
rm -rf ${RUNNER_TEMP}/msys64/mingw64/include/openssl
65+
ls -l ${RUNNER_TEMP}/msys64/mingw64/include/
66+
- name: checkout tongsuo
67+
uses: actions/checkout@v2
68+
with:
69+
repository: Tongsuo-Project/Tongsuo
70+
ref: 8.3-stable
71+
path: Tongsuo
72+
- name: Build Tongsuo
73+
working-directory: ./Tongsuo
74+
shell: msys2 {0}
75+
run: |
76+
./Configure mingw64 enable-ntls no-shared no-asm --prefix=${RUNNER_TEMP}/tongsuo
77+
make depend
78+
make -s -j4
79+
make install_sw
80+
- uses: actions/checkout@v3
81+
with:
82+
path: wget
83+
- name: build wget
84+
shell: msys2 {0}
85+
working-directory: ./wget
86+
run: |
87+
tongsuo_home=`cd ${RUNNER_TEMP}/tongsuo && pwd`
88+
./bootstrap --skip-po --no-bootstrap-sync
89+
autoreconf -fi
90+
CFLAGS="-D_WIN32_WINNT=0x0601" LIBS="-lbcrypt -lcrypt32" ./configure --host=mingw32 --with-ssl=openssl --with-libssl-prefix=${tongsuo_home} --disable-ntlm
91+
make -s -j4
92+
- name: debug
93+
if: ${{ failure() }}
94+
shell: msys2 {0}
95+
working-directory: ./wget
96+
run: |
97+
cat config.log
5198
Check:
5299
runs-on: ubuntu-latest
53100
timeout-minutes: 60
@@ -80,7 +127,7 @@ jobs:
80127
- name: build wget
81128
working-directory: ./wget
82129
run: |
83-
./bootstrap
130+
./bootstrap --skip-po --no-bootstrap-sync
84131
autoreconf -fi
85132
./configure --with-ssl=openssl --with-libssl-prefix=${RUNNER_TEMP}/tongsuo --disable-ntlm
86133
make -s -j4

.github/workflows/release.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
tags:
6+
- '*'
7+
env:
8+
TONGSUO_VERSION: 8.3.2
9+
10+
jobs:
11+
new_release:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
upload_url: ${{ steps.create_release.outputs.upload_url }}
15+
steps:
16+
- name: Create Release
17+
id: create_release
18+
uses: actions/create-release@v1
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
tag_name: ${{ github.ref }}
23+
release_name: Release ${{ github.ref }}
24+
body: |
25+
Changes in this Release
26+
- First Change
27+
- Second Change
28+
draft: true
29+
prerelease: true
30+
build_linux_macos:
31+
runs-on: ${{ matrix.builder }}
32+
needs: [new_release]
33+
timeout-minutes: 60
34+
strategy:
35+
matrix:
36+
builder: [macos-latest, ubuntu-latest]
37+
name: "build-${{ matrix.builder }}"
38+
steps:
39+
- name: install dependencies on Linux
40+
if: ${{ matrix.builder == 'ubuntu-latest' }}
41+
run: |
42+
sudo apt-get install -y automake autoconf autoconf-archive autopoint \
43+
flex texinfo gperf pkg-config make libhttp-daemon-perl \
44+
libio-socket-ssl-perl libidn2-dev gettext texlive python3 valgrind \
45+
language-pack-tr language-pack-ru
46+
- name: 'brew bundle'
47+
if: ${{ matrix.builder == 'macos-latest' }}
48+
run: |
49+
echo libtool automake autoconf autoconf-archive | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
50+
- name: 'brew install'
51+
if: ${{ matrix.builder == 'macos-latest' }}
52+
run: brew update && for i in 1 2 3; do brew bundle install --no-lock --file /tmp/Brewfile && break || sleep 1; done
53+
- name: build Tongsuo
54+
run: |
55+
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${TONGSUO_VERSION}.tar.gz"
56+
tar zxf "${TONGSUO_VERSION}.tar.gz"
57+
pushd "Tongsuo-${TONGSUO_VERSION}"
58+
./config --prefix=${RUNNER_TEMP}/tongsuo no-shared enable-ntls --release
59+
make -s -j4
60+
make install_sw
61+
popd
62+
- uses: actions/checkout@v3
63+
with:
64+
path: wget
65+
- name: build wget
66+
working-directory: ./wget
67+
run: |
68+
./bootstrap --skip-po --no-bootstrap-sync
69+
autoreconf -fi
70+
./configure --prefix=${RUNNER_TEMP}/wget --with-ssl=openssl --with-libssl-prefix=${RUNNER_TEMP}/tongsuo --disable-ntlm
71+
make -s -j4
72+
make install
73+
find ${RUNNER_TEMP}/wget -type f -name wget
74+
- name: upload artifact
75+
uses: actions/upload-release-asset@v1
76+
env:
77+
GITHUB_TOKEN: ${{ github.token }}
78+
with:
79+
upload_url: ${{ needs.new_release.outputs.upload_url }}
80+
asset_path: ${{ runner.temp }}/wget/bin/wget
81+
asset_name: wget-${{ runner.os }}
82+
asset_content_type: application/octet-stream
83+
build_windows:
84+
runs-on: windows-latest
85+
needs: [new_release]
86+
steps:
87+
- uses: msys2/setup-msys2@v2
88+
with:
89+
location: ${{ runner.temp }}
90+
- name: install dependencies
91+
shell: msys2 {0}
92+
run: |
93+
pacman -S --noconfirm base-devel msys2-runtime-devel mingw-w64-x86_64-toolchain autoconf automake git gperf pkg-config autoconf-archive gcc
94+
ls -l ${RUNNER_TEMP}
95+
find ${RUNNER_TEMP} -type d -name openssl
96+
rm -rf ${RUNNER_TEMP}/msys64/mingw64/include/openssl
97+
ls -l ${RUNNER_TEMP}/msys64/mingw64/include/
98+
- name: build Tongsuo
99+
shell: msys2 {0}
100+
run: |
101+
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${TONGSUO_VERSION}.tar.gz"
102+
tar zxf "${TONGSUO_VERSION}.tar.gz"
103+
pushd "Tongsuo-${TONGSUO_VERSION}"
104+
./Configure mingw64 enable-ntls no-shared --release --prefix=${RUNNER_TEMP}/tongsuo
105+
make depend
106+
make -s -j4
107+
make install_sw
108+
popd
109+
- uses: actions/checkout@v3
110+
with:
111+
path: wget
112+
- name: build wget
113+
shell: msys2 {0}
114+
working-directory: ./wget
115+
run: |
116+
runner_temp=`cd ${RUNNER_TEMP} && pwd`
117+
./bootstrap --skip-po --no-bootstrap-sync
118+
autoreconf -fi
119+
CFLAGS="-D_WIN32_WINNT=0x0601" LIBS="-lbcrypt -lcrypt32" ./configure --prefix=${runner_temp}/wget --host=mingw32 --with-ssl=openssl --with-libssl-prefix=${runner_temp}/tongsuo --disable-ntlm
120+
make -s -j4
121+
make install
122+
find ${RUNNER_TEMP}/wget -type f -name wget.exe
123+
- name: upload artifact
124+
uses: actions/upload-release-asset@v1
125+
env:
126+
GITHUB_TOKEN: ${{ github.token }}
127+
with:
128+
upload_url: ${{ needs.new_release.outputs.upload_url }}
129+
asset_path: ${{ runner.temp }}/wget/bin/wget.exe
130+
asset_name: wget-${{ runner.os }}.exe
131+
asset_content_type: application/octet-stream

bootstrap.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
# You should have received a copy of the GNU General Public License
1717
# along with this program. If not, see `https://www.gnu.org/licenses/'.
1818

19+
# mirrored from git://git.sv.gnu.org/gnulib.git
20+
GNULIB_URL=https://github.com/coreutils/gnulib
21+
1922
# gnulib library name
2023
source_base=lib
2124
tests_base=lib/tests

0 commit comments

Comments
 (0)