[GitHub CI] Build shadowsocksr-libev

This commit is contained in:
Connection Refused
2021-09-23 15:08:20 +08:00
parent abab4af684
commit bc5092d58a
5 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/shadowsocksrr/shadowsocksr-libev -b 'Akkariiin/develop' src
if ( -Not $? ) {
Pop-Location
exit $lastExitCode
}
Push-Location src
msys2 ..\build.sh
if ( -Not $? ) {
Pop-Location
rm -Recurse -Force src
exit $lastExitCode
}
cp -Force '.\ssr-local.exe' '..\release\ssr-local.exe'
Pop-Location
rm -Recurse -Force src
Pop-Location
exit $lastExitCode

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
git submodule update --init || exit $?
cd libudns
./autogen.sh || exit $?
./configure || exit $?
make -j2 || exit $?
cd ..
./autogen.sh || exit $?
CFLAGS+="-fstack-protector" ./configure --disable-documentation --with-ev="${PWD}/libev-mingw/build"
sed -i "s/%I/%z/g" src/utils.h
sed -i "s/^const/extern const/g" src/tls.h
sed -i "s/^const/extern const/g" src/http.h
make -j2
gcc $(find src/ -name "ss_local-*.o") $(find . -name "*.a" ! -name "*.dll.a") "${PWD}/libev-mingw/build/lib/libev.a" -o ssr-local -fstack-protector -static -lpcre -lssl -lcrypto -lws2_32 -s
exit $?

View File