Skip to content

build: clean up some android things #4121

build: clean up some android things

build: clean up some android things #4121

name: Build Artifacts (FreeBSD Binary)
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
pull_request:
branches: [master, develop]
paths-ignore:
- '**/*.md'
- '.circleci/**'
- '.cirrus.yml'
push:
branches: [master, develop]
paths-ignore:
- '**/*.md'
- '.circleci/**'
- '.cirrus.yml'
release:
types: [published]
schedule:
- cron: '0 16 * * *'
concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
env:
CACHE_EPOCH: 130-2
GOPROXY: direct
jobs:
freebsd-binary-release:
strategy:
fail-fast: false
matrix:
arch:
- 'amd64'
- 'aarch64'
- 'i386'
abi:
- '13'
- '14'
runs-on: ubuntu-20.04
env:
ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- name: Checkout with shallow submodules
run: |
# unshallow must come first otherwise submodule may be get unshallowed
git fetch --tags --unshallow
git submodule update --init --depth 1
- name: Cache toolchain
id: toolchain-cache
uses: actions/cache@v4
with:
path: |
third_party/llvm-build/Release+Asserts
key: ${{ runner.os }}-toolchain-${{ hashFiles('CLANG_REVISION') }}-v${{ env.CACHE_EPOCH }}
- name: Cache sysroot
id: sysroot-cache
uses: actions/cache@v4
with:
path: |
freebsd-${{ matrix.abi }}-${{ matrix.arch }}-toolchain
key: freebsd-sysroot-${{ matrix.abi }}-${{ matrix.arch }}-${{ hashFiles('scripts/install-sysroot-freebsd.py') }}-v1
- uses: actions/setup-go@v5
with:
go-version: '>=1.20.0'
cache-dependency-path: |
tools/go.sum
third_party/boringssl/src/go.sum
- name: Build build tool
run: |
cd tools
go build
- name: "Install dependency: prebuilt clang and clang-tidy binaries"
if: ${{ steps.toolchain-cache.outputs.cache-hit != 'true' }}
run: |
./scripts/download-clang-prebuilt-binaries.py
rm -f third_party/llvm-build/Release+Asserts/*.tgz
- name: "Install dependency: sysroot"
if: ${{ steps.sysroot-cache.outputs.cache-hit != 'true' }}
run: |
./scripts/install-sysroot-freebsd.py ${{ matrix.abi }} ${{ matrix.arch }}
rm -f *.txz *.xz
- name: Populate depedencies
run: |
sudo apt-get update -qq
sudo apt-get install -y cmake ninja-build libglib2.0-dev-bin gettext
# required by unpacking pkg file
sudo apt-get install -y zstd
- name: Populate dependencie (cmake, overwrite)
run: |
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.29.8/cmake-3.29.8-linux-x86_64.tar.gz
sudo tar -C /usr/local --strip-components=1 -xf cmake-3.29.8-linux-x86_64.tar.gz
cmake --version
rm -f *.tar.gz
- name: Build Binary
run: |
./tools/build --system freebsd --arch ${{ matrix.arch }} --freebsd-abi ${{ matrix.abi }} \
--sysroot $PWD/freebsd-${{ matrix.abi }}-${{ matrix.arch }}-toolchain \
-build-benchmark -build-test
- name: Upload dist tarball (including debuginfo)
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} yass*.tgz