mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
[GitHub CI] Build shadowsocksr-libev
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -13,6 +13,10 @@ jobs:
|
||||
|
||||
- name: C++
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
release: true
|
||||
install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-bzip2 mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls mingw-w64-x86_64-libsodium mingw-w64-x86_64-c-ares mingw-w64-x86_64-boost mingw-w64-x86_64-libmariadbclient unzip p7zip
|
||||
|
||||
- name: Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -16,6 +16,10 @@ jobs:
|
||||
|
||||
- name: C++
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
release: true
|
||||
install: install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-bzip2 mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls mingw-w64-x86_64-libsodium mingw-w64-x86_64-c-ares mingw-w64-x86_64-boost mingw-w64-x86_64-libmariadbclient unzip p7zip
|
||||
|
||||
- name: Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
||||
24
Other/shadowsocksr-libev/build.ps1
Normal file
24
Other/shadowsocksr-libev/build.ps1
Normal 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
|
||||
20
Other/shadowsocksr-libev/build.sh
Normal file
20
Other/shadowsocksr-libev/build.sh
Normal 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 $?
|
||||
0
Other/shadowsocksr-libev/deps.ps1
Normal file
0
Other/shadowsocksr-libev/deps.ps1
Normal file
Reference in New Issue
Block a user