drone: Add CI config

Signed-off-by: PeroSar <perosar1111@gmail.com>
This commit is contained in:
PeroSar 2022-05-02 16:08:15 +05:30
parent a7fe233b27
commit c55b294586
Signed by: PeroSar
GPG Key ID: 5C2D258445DA8B58
2 changed files with 39 additions and 0 deletions

32
.drone.yml Normal file
View File

@ -0,0 +1,32 @@
---
kind: pipeline
type: docker
name: Emerald
trigger:
event:
- custom
steps:
- name: build
image: ubuntu:20.04
commands:
- apt update -yqq && apt install software-properties-common -yqq >/dev/null 2>&1 && add-apt-repository ppa:ubuntu-toolchain-r/test -y && apt install build-essential flex texinfo curl xz-utils gcc-11 g++-11 -yqq >/dev/null 2>&1
- ln -sf $(which gcc-11) $(which gcc) && ln -sf $(which g++-11) $(which g++)
- bash emerald-binutils.sh && rm -rf build
- bash emerald-sysroot.sh
- bash emerald-gcc.sh
- env XZ_OPT="-9 -T0" tar -C /tmp -cJf aarch64-linux-android-emerald.tar.xz aarch64-linux-android-emerald
- bash emerald-get-relver.sh
- name: release
image: tystuyfzand/drone-gitea-release
settings:
gitea_server: https://tildegit.org
tag_file: tag.txt
title_file: title.txt
files: [ 'aarch64-linux-android-emerald.tar.xz' ]
environment:
PLUGIN_API_KEY:
from_secret: gitea_token

7
emerald-get-relver.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
GCC_VER=$(grep -P -m1 '^GCC_VER=' emerald-gcc.sh | cut -d= -f2)
BINUTILS_VER=$(grep -P -m1 '^BINUTILS_VER=' emerald-binutils.sh | cut -d= -f2)
echo "emerald: GCC v$GCC_VER, Binutils v$BINUTILS_VER" > title.txt
echo "$GCC_VER" > tag.txt