2021-02-28 16:11:59 +03:00
|
|
|
name: Build
|
2021-02-28 06:44:08 +03:00
|
|
|
on:
|
|
|
|
push:
|
2021-02-28 13:04:59 +03:00
|
|
|
branches: [master]
|
2021-02-28 15:24:10 +03:00
|
|
|
paths-ignore: [README.md]
|
2021-02-28 06:44:08 +03:00
|
|
|
release:
|
2021-02-28 14:27:35 +03:00
|
|
|
types: [published]
|
2021-02-28 15:24:10 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-02-28 06:44:08 +03:00
|
|
|
jobs:
|
2021-02-28 13:04:59 +03:00
|
|
|
linux:
|
|
|
|
runs-on: ubuntu-latest
|
2021-02-28 12:42:42 +03:00
|
|
|
strategy:
|
2021-02-28 13:04:59 +03:00
|
|
|
fail-fast: false
|
2021-02-28 12:42:42 +03:00
|
|
|
matrix:
|
2021-02-28 13:04:59 +03:00
|
|
|
arch: [x64, x86, arm64, arm]
|
2021-02-28 12:42:58 +03:00
|
|
|
env:
|
|
|
|
EXTRA_FLAGS: 'target_cpu="${{ matrix.arch }}"'
|
2021-02-28 15:24:10 +03:00
|
|
|
BUNDLE: 'naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}'
|
2021-02-28 06:44:08 +03:00
|
|
|
steps:
|
2021-02-28 10:04:36 +03:00
|
|
|
- uses: actions/checkout@v2
|
2021-02-28 17:30:08 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ccache-${{ github.job }}-${{ matrix.arch }}-${{ hashFiles('CHROMIUM_VERSION') }}
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: src/out/sysroot-build/
|
|
|
|
key: sysroot-${{ github.job }}-${{ matrix.arch }}-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 18:32:09 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
src/third_party/llvm-build/Release+Asserts/
|
|
|
|
src/chrome/android/profiles/
|
|
|
|
src/chrome/build/pgo_profiles/
|
|
|
|
key: toolchain-linux-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 13:04:59 +03:00
|
|
|
- run: sudo apt update
|
2021-02-28 17:30:08 +03:00
|
|
|
- run: sudo apt install ninja-build pkg-config libnss3-dev qemu-user ccache
|
2021-02-28 13:04:59 +03:00
|
|
|
# libc6-i386 interferes with x86 build
|
|
|
|
- run: sudo apt remove libc6-i386
|
2021-02-28 10:53:55 +03:00
|
|
|
- run: ./get-clang.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ccache -s
|
2021-02-28 10:53:55 +03:00
|
|
|
- run: ./build.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ccache -s
|
2021-02-28 10:53:55 +03:00
|
|
|
- run: ./tests/basic.sh src/out/Release/naive
|
2021-02-28 15:24:10 +03:00
|
|
|
- run: mkdir ${{ env.BUNDLE }} && cp src/out/Release/naive src/config.json LICENSE USAGE.txt ${{ env.BUNDLE }}
|
|
|
|
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
|
2021-02-28 14:23:26 +03:00
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
if: ${{ github.event_name == 'release' }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ github.event.release.upload_url }}
|
2021-02-28 15:24:10 +03:00
|
|
|
asset_path: ${{ env.BUNDLE }}.tar.xz
|
|
|
|
asset_name: ${{ env.BUNDLE }}.tar.xz
|
2021-02-28 14:23:26 +03:00
|
|
|
asset_content_type: application/octet-stream
|
2021-02-28 11:41:34 +03:00
|
|
|
win:
|
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2021-02-28 10:53:55 +03:00
|
|
|
strategy:
|
2021-02-28 13:04:59 +03:00
|
|
|
fail-fast: false
|
2021-02-28 10:53:55 +03:00
|
|
|
matrix:
|
2021-02-28 13:04:59 +03:00
|
|
|
arch: [x64, x86, arm64]
|
2021-02-28 10:53:55 +03:00
|
|
|
env:
|
2021-02-28 11:41:34 +03:00
|
|
|
EXTRA_FLAGS: 'target_cpu="${{ matrix.arch }}"'
|
2021-02-28 15:24:10 +03:00
|
|
|
BUNDLE: 'naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}'
|
2021-02-28 10:53:55 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-02-28 17:30:08 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
2021-02-28 18:32:09 +03:00
|
|
|
path: ~/AppData/Local/Mozilla/sccache
|
2021-02-28 17:30:08 +03:00
|
|
|
key: ccache-${{ github.job }}-${{ matrix.arch }}-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 18:32:09 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
src/third_party/llvm-build/Release+Asserts/
|
|
|
|
src/chrome/build/pgo_profiles/
|
|
|
|
key: toolchain-win-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 11:41:34 +03:00
|
|
|
- run: cinst ninja
|
2021-02-28 10:04:36 +03:00
|
|
|
- run: ./get-clang.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ~/.cargo/bin/sccache -s
|
2021-02-28 10:04:36 +03:00
|
|
|
- run: ./build.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ~/.cargo/bin/sccache -s
|
2021-02-28 10:04:36 +03:00
|
|
|
- run: ./tests/basic.sh src/out/Release/naive
|
2021-02-28 13:04:59 +03:00
|
|
|
if: ${{ matrix.arch != 'arm64' }}
|
2021-02-28 15:24:10 +03:00
|
|
|
- run: mkdir ${{ env.BUNDLE }} && cp src/out/Release/naive.exe src/config.json LICENSE USAGE.txt ${{ env.BUNDLE }}
|
|
|
|
- run: 7z a ${{ env.BUNDLE }}.zip ${{ env.BUNDLE }}
|
2021-02-28 14:23:26 +03:00
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
if: ${{ github.event_name == 'release' }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ github.event.release.upload_url }}
|
2021-02-28 15:24:10 +03:00
|
|
|
asset_path: ${{ env.BUNDLE }}.zip
|
|
|
|
asset_name: ${{ env.BUNDLE }}.zip
|
2021-02-28 14:23:26 +03:00
|
|
|
asset_content_type: application/octet-stream
|
2021-02-28 13:04:59 +03:00
|
|
|
mac:
|
|
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
arch: [x64, arm64]
|
|
|
|
env:
|
|
|
|
EXTRA_FLAGS: 'target_cpu="${{ matrix.arch }}"'
|
2021-02-28 15:24:10 +03:00
|
|
|
BUNDLE: 'naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}'
|
2021-02-28 13:04:59 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-02-28 17:30:08 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
2021-02-28 18:32:09 +03:00
|
|
|
path: ~/Library/Caches/ccache
|
2021-02-28 17:30:08 +03:00
|
|
|
key: ccache-${{ github.job }}-${{ matrix.arch }}-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 18:32:09 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
src/third_party/llvm-build/Release+Asserts/
|
|
|
|
src/chrome/build/pgo_profiles/
|
|
|
|
key: toolchain-mac-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 19:51:38 +03:00
|
|
|
- run: brew install ninja ccache
|
2021-02-28 13:04:59 +03:00
|
|
|
- run: ./get-clang.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ccache -s
|
2021-02-28 13:04:59 +03:00
|
|
|
- run: ./build.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ccache -s
|
2021-02-28 13:04:59 +03:00
|
|
|
- run: ./tests/basic.sh src/out/Release/naive
|
|
|
|
if: ${{ matrix.arch != 'arm64' }}
|
2021-02-28 15:24:10 +03:00
|
|
|
- run: mkdir ${{ env.BUNDLE }} && cp src/out/Release/naive src/config.json LICENSE USAGE.txt ${{ env.BUNDLE }}
|
|
|
|
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
|
2021-02-28 14:23:26 +03:00
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
if: ${{ github.event_name == 'release' }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ github.event.release.upload_url }}
|
2021-02-28 15:24:10 +03:00
|
|
|
asset_path: ${{ env.BUNDLE }}.tar.xz
|
|
|
|
asset_name: ${{ env.BUNDLE }}.tar.xz
|
2021-02-28 14:23:26 +03:00
|
|
|
asset_content_type: application/octet-stream
|
2021-02-28 13:04:59 +03:00
|
|
|
openwrt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- arch: mipsel_24kc
|
|
|
|
target_cpu: mipsel
|
|
|
|
extra: 'mips_arch_variant="r2" mips_float_abi="soft" mips_tune="24kc" use_lld=false use_gold=false'
|
|
|
|
openwrt: 'target=ramips subtarget=rt305x abi=musl'
|
|
|
|
- arch: x86_64
|
|
|
|
target_cpu: x64
|
|
|
|
openwrt: 'target=x86 subtarget=64 abi=musl'
|
|
|
|
- arch: x86
|
|
|
|
target_cpu: x86
|
|
|
|
openwrt: 'target=x86 subtarget=generic abi=musl'
|
|
|
|
- arch: aarch64
|
|
|
|
target_cpu: arm64
|
|
|
|
openwrt: 'target=armvirt subtarget=64 abi=musl'
|
|
|
|
- arch: arm_cortex-a15_neon-vfpv4
|
|
|
|
target_cpu: arm
|
|
|
|
extra: 'arm_version=0 arm_cpu="cortex-a15" arm_fpu="neon-vfpv4" arm_float_abi="hard"'
|
|
|
|
openwrt: 'target=ipq806x subtarget=generic abi=musl_eabi'
|
|
|
|
- arch: arm_cortex-a9
|
|
|
|
target_cpu: arm
|
|
|
|
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_float_abi="soft" arm_use_neon=false'
|
|
|
|
openwrt: 'target=bcm53xx subtarget=generic abi=musl_eabi'
|
|
|
|
env:
|
|
|
|
EXTRA_FLAGS: |
|
|
|
|
target_cpu="${{ matrix.target_cpu }}"
|
|
|
|
${{ matrix.extra }}
|
|
|
|
use_allocator="none" use_allocator_shim=false
|
|
|
|
custom_toolchain="//build/toolchain/linux:clang_${{ matrix.target_cpu }}_openwrt"
|
|
|
|
OPENWRT_FLAGS: 'arch=${{ matrix.arch }} release=19.07.7 gcc_ver=7.5.0 ${{ matrix.openwrt }}'
|
2021-02-28 15:24:10 +03:00
|
|
|
BUNDLE: 'naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}'
|
2021-02-28 13:04:59 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-02-28 17:30:08 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ccache-${{ github.job }}-${{ matrix.arch }}-${{ hashFiles('CHROMIUM_VERSION') }}
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: src/out/sysroot-build/
|
|
|
|
key: openwrt-${{ github.job }}-${{ matrix.arch }}-19.07.7
|
2021-02-28 18:32:09 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
src/third_party/llvm-build/Release+Asserts/
|
|
|
|
src/chrome/android/profiles/
|
|
|
|
src/chrome/build/pgo_profiles/
|
|
|
|
key: toolchain-linux-${{ hashFiles('CHROMIUM_VERSION') }}
|
2021-02-28 13:04:59 +03:00
|
|
|
- run: sudo apt update
|
2021-02-28 17:30:08 +03:00
|
|
|
- run: sudo apt install ninja-build pkg-config libnss3-dev qemu-user ccache
|
2021-02-28 13:04:59 +03:00
|
|
|
# libc6-i386 interferes with x86 build
|
|
|
|
- run: sudo apt remove libc6-i386
|
|
|
|
- run: ./get-clang.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ccache -s
|
2021-02-28 13:04:59 +03:00
|
|
|
- run: ./build.sh
|
|
|
|
working-directory: src
|
2021-02-28 18:16:57 +03:00
|
|
|
- run: ccache -s
|
2021-02-28 14:23:26 +03:00
|
|
|
- run: ./tests/basic.sh src/out/Release/naive
|
2021-02-28 15:24:10 +03:00
|
|
|
- run: mkdir ${{ env.BUNDLE }} && cp src/out/Release/naive src/config.json LICENSE USAGE.txt ${{ env.BUNDLE }}
|
|
|
|
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
|
2021-02-28 14:23:26 +03:00
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
if: ${{ github.event_name == 'release' }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ github.event.release.upload_url }}
|
2021-02-28 15:24:10 +03:00
|
|
|
asset_path: ${{ env.BUNDLE }}.tar.xz
|
|
|
|
asset_name: ${{ env.BUNDLE }}.tar.xz
|
2021-02-28 14:23:26 +03:00
|
|
|
asset_content_type: application/octet-stream
|