mingw-w64-${{env.arch}}-gettext #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: wget-for-windows CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
bits: [64] | |
ftype: [static-lite] | |
fail-fast: false | |
name: mingw${{matrix.bits}}-wintls-winhashes-${{matrix.ftype}} | |
runs-on: windows-latest | |
env: | |
mingw: mingw${{matrix.bits}} | |
build_type: wintls-winhashes-${{matrix.ftype}} | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Set up ENVs for MSYS2 to inherit | |
shell: bash | |
run: | | |
arch="x86_64" | |
BRoot="${PWD}" | |
BDir="build/${build_type}/${mingw}" | |
CDir="${BDir}-config" | |
echo arch="$arch" >> $GITHUB_ENV | |
echo BRoot="$BRoot" >> $GITHUB_ENV | |
echo BDir="$BDir" >> $GITHUB_ENV | |
echo CDir="$CDir" >> $GITHUB_ENV | |
- name: Set up MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{env.mingw}} | |
release: false | |
install: >- | |
base-devel | |
gperf | |
autoconf | |
automake | |
autoconf-archive | |
git | |
python | |
libcares-devel | |
mingw-w64-${{env.arch}}-gcc | |
mingw-w64-${{env.arch}}-gettext | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate configure | |
run: | | |
./bootstrap --skip-po | |
sed -i "s/-dirty\b//p" configure | |
- name: Install win-iconv | |
run: | | |
wget https://github.com/win-iconv/win-iconv/archive/refs/tags/v0.0.8.tar.gz | |
tar -xvzf v0.0.8.tar.gz | |
cd win-iconv-0.0.8 | |
make -E CFLAGS=-Os -E prefix=/$mingw install | |
- name: configure | |
run: | | |
mkdir -p $BDir | |
mkdir -p $CDir | |
cd $CDir | |
export CFLAGS+=" -Wall -D_WIN32_WINNT=0x0600 -DGNULIB_defined_ESOCK -Os" | |
LDFLAGS="-static -s" $BRoot/configure --prefix=$BRoot/$BDir --disable-debug --disable-rpath --disable-nls --without-libpsl --without-metalink --disable-pcre --disable-pcre2 --with-winidn --enable-threads=windows | |
- name: Build | |
run: | | |
cd $CDir | |
echo -e "all:\n\n" > gnulib_po/Makefile | |
make | |
- name: Show compiled wget info | |
run: | | |
ls -l $CDir/src/wget.exe | |
SHA=$(sha1sum $CDir/src/wget.exe | cut -b 1-40) | |
echo SHA="$SHA" >> $GITHUB_ENV | |
$CDir/src/wget -V | |
- name: Upload wget | |
uses: actions/upload-artifact@v4 | |
if: ${{success()}} || ${{failure()}} | |
with: | |
name: wget-${{env.mingw}}-${{env.build_type}}_${{env.SHA}} | |
path: | | |
${{env.CDir}}/src/wget.exe |