mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-04-13 14:11:04 +00:00
Support win32 build
Also use sccache releases instead of building with cargo.
This commit is contained in:
parent
0f66be50dd
commit
3a786e6bb0
3 changed files with 12 additions and 15 deletions
|
@ -2,19 +2,21 @@ branches:
|
||||||
except:
|
except:
|
||||||
- dev
|
- dev
|
||||||
version: '{build}'
|
version: '{build}'
|
||||||
|
platform:
|
||||||
|
- x64
|
||||||
|
- x86
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2017
|
||||||
install:
|
install:
|
||||||
- cinst ninja
|
- cinst ninja
|
||||||
cache:
|
cache:
|
||||||
- '%USERPROFILE%\.cargo\bin'
|
|
||||||
- '%LOCALAPPDATA%\Mozilla\sccache'
|
- '%LOCALAPPDATA%\Mozilla\sccache'
|
||||||
build_script:
|
build_script:
|
||||||
- bash ./tools/import-upstream.sh
|
- bash ./tools/import-upstream.sh
|
||||||
- bash -c 'cd src; ./get-clang.sh'
|
- bash -c 'cd src; ./get-clang.sh'
|
||||||
- bash -c '~/.cargo/bin/sccache -s'
|
- bash -c '~/.cargo/bin/sccache -s'
|
||||||
- bash -c 'cd src; ./build.sh'
|
- bash -c 'cd src; EXTRA_FLAGS=target_cpu=\"$PLATFORM\" ./build.sh'
|
||||||
- bash -c '~/.cargo/bin/sccache -s'
|
- bash -c '~/.cargo/bin/sccache -s'
|
||||||
- ps: $env:BUILD_NAME="naiveproxy-$env:APPVEYOR_REPO_TAG_NAME-win64"
|
- ps: $env:BUILD_NAME="naiveproxy-$env:APPVEYOR_REPO_TAG_NAME-win-$env:PLATFORM"
|
||||||
- bash -c 'mkdir $BUILD_NAME'
|
- bash -c 'mkdir $BUILD_NAME'
|
||||||
- bash -c 'cp src/out/Release/naive.exe src/config.json LICENSE USAGE.txt $BUILD_NAME'
|
- bash -c 'cp src/out/Release/naive.exe src/config.json LICENSE USAGE.txt $BUILD_NAME'
|
||||||
- bash -c '7z a $BUILD_NAME.zip $BUILD_NAME'
|
- bash -c '7z a $BUILD_NAME.zip $BUILD_NAME'
|
||||||
|
|
|
@ -6,16 +6,16 @@ mkdir -p "$TMPDIR"
|
||||||
|
|
||||||
if [ "$1" = debug ]; then
|
if [ "$1" = debug ]; then
|
||||||
out=out/Debug
|
out=out/Debug
|
||||||
flags='
|
flags="$EXTRA_FLAGS
|
||||||
is_debug=true
|
is_debug=true
|
||||||
is_component_build=true'
|
is_component_build=true"
|
||||||
else
|
else
|
||||||
out=out/Release
|
out=out/Release
|
||||||
flags='
|
flags="$EXTRA_FLAGS
|
||||||
is_official_build=true
|
is_official_build=true
|
||||||
use_jumbo_build=true
|
use_jumbo_build=true
|
||||||
exclude_unwind_tables=true
|
exclude_unwind_tables=true
|
||||||
symbol_level=0'
|
symbol_level=0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if which ccache >/dev/null 2>&1; then
|
if which ccache >/dev/null 2>&1; then
|
||||||
|
|
|
@ -31,14 +31,9 @@ fi
|
||||||
|
|
||||||
# sccache (Windows)
|
# sccache (Windows)
|
||||||
if [ "$ARCH" = Windows ]; then
|
if [ "$ARCH" = Windows ]; then
|
||||||
export PATH="$PATH:$HOME/.cargo/bin"
|
sccache_url="https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-pc-windows-msvc.tar.gz"
|
||||||
if ! which cargo >/dev/null 2>&1; then
|
mkdir -p ~/.cargo/bin
|
||||||
curl -OJ https://win.rustup.rs/
|
curl -L "$sccache_url" | tar xzf - --strip=1 -C ~/.cargo/bin
|
||||||
./rustup-init.exe -y -v --no-modify-path
|
|
||||||
fi
|
|
||||||
if ! which sccache >/dev/null 2>&1; then
|
|
||||||
cargo install --git https://github.com/mozilla/sccache.git
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# gn
|
# gn
|
||||||
|
|
Loading…
Add table
Reference in a new issue