mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-28 12:20:33 +05:00
github: optimize
This commit is contained in:
parent
63fbf2857c
commit
647ee11917
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@ -22,9 +22,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- arch: lexra
|
|
||||||
tool: mips-linux
|
|
||||||
dir: rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001
|
|
||||||
- arch: arm64
|
- arch: arm64
|
||||||
tool: aarch64-unknown-linux-musl
|
tool: aarch64-unknown-linux-musl
|
||||||
- arch: arm
|
- arch: arm
|
||||||
@ -55,6 +52,12 @@ jobs:
|
|||||||
tool: i586-unknown-linux-musl
|
tool: i586-unknown-linux-musl
|
||||||
- arch: x86_64
|
- arch: x86_64
|
||||||
tool: x86_64-unknown-linux-musl
|
tool: x86_64-unknown-linux-musl
|
||||||
|
- arch: lexra
|
||||||
|
tool: mips-linux
|
||||||
|
dir: rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001
|
||||||
|
env:
|
||||||
|
LDFLAGS: '-lgcc_eh'
|
||||||
|
repo: 'bol-van/build'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -63,27 +66,30 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up build tools
|
- name: Set up build tools
|
||||||
env:
|
env:
|
||||||
REPO: 'spvkgn/musl-cross'
|
REPO: ${{ matrix.arch == 'lexra' && matrix.repo || 'spvkgn/musl-cross' }}
|
||||||
REPO_LEXRA: 'bol-van/build'
|
|
||||||
ARCH: ${{ matrix.arch }}
|
ARCH: ${{ matrix.arch }}
|
||||||
TOOL: ${{ matrix.tool }}
|
TOOL: ${{ matrix.tool }}
|
||||||
DIR: ${{ matrix.dir }}
|
DIR: ${{ matrix.arch == 'lexra' && matrix.dir || matrix.tool }}
|
||||||
run: |
|
run: |
|
||||||
DIR=${DIR:-$TOOL}
|
if [[ "$ARCH" == lexra ]]; then
|
||||||
[ "$ARCH" = lexra ] && sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -y libcap-dev
|
sudo apt install -y libcap-dev libc6:i386 zlib1g:i386
|
||||||
[ "$ARCH" = lexra ] && sudo apt install -y libc6:i386 zlib1g:i386
|
URL=https://github.com/$REPO/raw/refs/heads/master/$DIR.txz
|
||||||
|
else
|
||||||
|
sudo apt update -qq
|
||||||
|
sudo apt install -y libcap-dev
|
||||||
|
URL=https://github.com/$REPO/releases/download/latest/$TOOL.tar.xz
|
||||||
|
fi
|
||||||
mkdir -p $HOME/tools
|
mkdir -p $HOME/tools
|
||||||
URL=https://github.com/$REPO/releases/download/latest/$DIR.tar.xz
|
|
||||||
[ "$ARCH" = lexra ] && URL=https://github.com/$REPO_LEXRA/raw/refs/heads/master/$DIR.txz
|
|
||||||
wget -qO- $URL | tar -C $HOME/tools -xJ || exit 1
|
wget -qO- $URL | tar -C $HOME/tools -xJ || exit 1
|
||||||
[ -d "$HOME/tools/$DIR/bin" ] && echo "$HOME/tools/$DIR/bin" >> $GITHUB_PATH
|
[[ -d "$HOME/tools/$DIR/bin" ]] && echo "$HOME/tools/$DIR/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
ARCH: ${{ matrix.arch }}
|
ARCH: ${{ matrix.arch }}
|
||||||
TARGET: ${{ matrix.tool }}
|
TARGET: ${{ matrix.tool }}
|
||||||
|
LDFLAGS: ${{ matrix.env.LDFLAGS != '' && matrix.env.LDFLAGS || null }}
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
DEPS_DIR=$GITHUB_WORKSPACE/deps
|
DEPS_DIR=$GITHUB_WORKSPACE/deps
|
||||||
@ -93,10 +99,7 @@ jobs:
|
|||||||
export NM=$TARGET-nm
|
export NM=$TARGET-nm
|
||||||
export STRIP=$TARGET-strip
|
export STRIP=$TARGET-strip
|
||||||
export PKG_CONFIG_PATH=$DEPS_DIR/lib/pkgconfig
|
export PKG_CONFIG_PATH=$DEPS_DIR/lib/pkgconfig
|
||||||
export STAGING_DIR=/tmp
|
export STAGING_DIR=$RUNNER_TEMP
|
||||||
LDFLAGS=
|
|
||||||
[ "$ARCH" = lexra ] && LDFLAGS=-lgcc_eh
|
|
||||||
export LDFLAGS
|
|
||||||
|
|
||||||
# netfilter libs
|
# 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/libnfnetlink/libnfnetlink-1.0.2.tar.bz2 | tar -xj
|
||||||
|
Loading…
Reference in New Issue
Block a user