mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-29 21:40:52 +03:00
github: fix optimization for size
This commit is contained in:
parent
15879c82f6
commit
127bec2f14
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@ -92,6 +92,7 @@ jobs:
|
||||
for i in libmnl libnfnetlink libnetfilter_queue ; do
|
||||
(
|
||||
cd $i-*
|
||||
CFLAGS="-Os -flto=auto" \
|
||||
./configure --prefix= --host=$TARGET --enable-static --disable-shared --disable-dependency-tracking
|
||||
make install -j$(nproc) DESTDIR=$DEPS_DIR
|
||||
)
|
||||
@ -103,6 +104,7 @@ jobs:
|
||||
xargs -I{} wget -qO- https://github.com/madler/zlib/archive/refs/tags/{}.tar.gz | tar -xz
|
||||
(
|
||||
cd zlib-*
|
||||
CFLAGS="-Os -flto=auto" \
|
||||
./configure --prefix= --static
|
||||
make install -j$(nproc) DESTDIR=$DEPS_DIR
|
||||
)
|
||||
@ -113,8 +115,8 @@ jobs:
|
||||
install -Dm644 -t $DEPS_DIR/include/sys /usr/include/x86_64-linux-gnu/sys/queue.h /usr/include/sys/capability.h
|
||||
|
||||
# zapret
|
||||
CFLAGS="$CFLAGS -static-libgcc -static -I$DEPS_DIR/include" \
|
||||
LDFLAGS="$LDFLAGS -L$DEPS_DIR/lib" \
|
||||
CFLAGS="-DZAPRET_GH_VER=${{ github.ref_name }} -DZAPRET_GH_HASH=${{ github.sha }} -static-libgcc -static -I$DEPS_DIR/include" \
|
||||
LDFLAGS="-L$DEPS_DIR/lib" \
|
||||
make -C zapret -j$(nproc)
|
||||
tar -C zapret/binaries/my -cJf zapret-linux-$ARCH.tar.xz .
|
||||
|
||||
@ -170,7 +172,7 @@ jobs:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
export CFLAGS="-DZAPRET_GH_VER=${{ github.ref_name }} -DZAPRET_GH_HASH=${{ github.sha }}"
|
||||
settarget $TARGET-freebsd11 make bsd -j$(nproc) || exit 1
|
||||
settarget $TARGET-freebsd11 make bsd -j$(nproc)
|
||||
tar -C binaries/my -cJf zapret-freebsd-$ARCH.tar.xz .
|
||||
|
||||
- name: Upload artifacts
|
||||
@ -203,9 +205,9 @@ jobs:
|
||||
- name: Build ip2net, mdig
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
export CFLAGS="-DZAPRET_GH_VER=${{ github.ref_name }} -DZAPRET_GH_HASH=${{ github.sha }}"
|
||||
mkdir -p output
|
||||
cd zapret
|
||||
export CFLAGS="-DZAPRET_GH_VER=${{ github.ref_name }} -DZAPRET_GH_HASH=${{ github.sha }}"
|
||||
mingw32-make -C ip2net win
|
||||
mingw32-make -C mdig win
|
||||
cp -a {ip2net/ip2net,mdig/mdig}.exe ../output
|
||||
@ -319,8 +321,6 @@ jobs:
|
||||
export STRIP=$TOOLCHAIN/bin/llvm-strip
|
||||
export PKG_CONFIG_PATH=$DEPS_DIR/lib/pkgconfig
|
||||
|
||||
export CFLAGS="-DZAPRET_GH_VER=${{ github.ref_name }} -DZAPRET_GH_HASH=${{ github.sha }}"
|
||||
|
||||
# netfilter libs
|
||||
wget -qO- https://www.netfilter.org/pub/libnfnetlink/libnfnetlink-1.0.2.tar.bz2 | tar -xj
|
||||
wget -qO- https://www.netfilter.org/pub/libmnl/libmnl-1.0.5.tar.bz2 | tar -xj
|
||||
@ -330,7 +330,7 @@ jobs:
|
||||
for i in libmnl libnfnetlink libnetfilter_queue ; do
|
||||
(
|
||||
cd $i-*
|
||||
CFLAGS="$CFLAGS -Wno-implicit-function-declaration" \
|
||||
CFLAGS="-Os -flto=auto -Wno-implicit-function-declaration" \
|
||||
./configure --prefix= --host=$TARGET --enable-static --disable-shared --disable-dependency-tracking
|
||||
make install -j$(nproc) DESTDIR=$DEPS_DIR
|
||||
)
|
||||
@ -338,7 +338,8 @@ jobs:
|
||||
done
|
||||
|
||||
# zapret
|
||||
CFLAGS="$CFLAGS -I$DEPS_DIR/include" LDFLAGS="$LDFLAGS -L$DEPS_DIR/lib" \
|
||||
CFLAGS="-DZAPRET_GH_VER=${{ github.ref_name }} -DZAPRET_GH_HASH=${{ github.sha }} -I$DEPS_DIR/include" \
|
||||
LDFLAGS="-L$DEPS_DIR/lib" \
|
||||
make -C zapret android -j$(nproc)
|
||||
zip zapret-android-$ABI.zip -j zapret/binaries/my/*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user