Skip to content

GCC+LLD Build

GCC+LLD Build #351

name: GCC+LLD Build
on:
push:
branches: [ main ]
schedule:
- cron: '0 0 * * 0,4'
env:
GITHUB_EMAIL: ${{ secrets.EMAIL }}
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
GITHUB_USER: ${{ secrets.USERNAME }}
BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
CHAT_ID: ${{ secrets.CHAT }}
jobs:
build-arm64-tc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set build date
id: get-date
run: |
sudo ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
echo ::set-output name=date::$(/bin/date -u "+%Y%m%d")
- name: Setup
run: |
sudo apt-get update
sudo apt-get install -y flex bison ncurses-dev texinfo gcc gperf patch libtool automake g++ libncurses5-dev gawk subversion expat libexpat1-dev binutils-dev bc libcap-dev autoconf libgmp-dev build-essential pkg-config libmpc-dev libmpfr-dev autopoint gettext txt2man liblzma-dev libssl-dev libz-dev mercurial wget tar cmake zstd ninja-build lz4 liblz4-tool liblz4-dev lzma --fix-broken --fix-missing
- name: Build
run: |
chmod a+x build-*.sh
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="<b>Starting ARM64 GCC Build</b>"
./build-gcc.sh -a arm64
./build-lld.sh -a arm64
script_dir=$(pwd)
cd gcc-arm64
./bin/aarch64-elf-gcc -v 2>&1 | tee ../gcc-version
./bin/aarch64-elf-ld.lld -v 2>&1 | tee ../lld-arm64-version
bash "$script_dir/strip-binaries.sh"
cd ../ && cat lld-arm64-version >> gcc-version
- name: Create tarball
run: |
tar -cvf eva-gcc-arm64-$(/bin/date -u '+%d%m%Y').xz gcc-arm64/*
- uses: actions/upload-artifact@main
with:
name: aarch64-tarball
path: |
*.xz
gcc-version
build-arm-tc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set build date
id: get-date
run: |
sudo ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
echo ::set-output name=date::$(/bin/date -u "+%Y%m%d")
- name: Setup
run: |
sudo apt-get update
sudo apt-get install -y flex bison ncurses-dev texinfo gcc gperf patch libtool automake g++ libncurses5-dev gawk subversion expat libexpat1-dev binutils-dev bc libcap-dev autoconf libgmp-dev build-essential pkg-config libmpc-dev libmpfr-dev autopoint gettext txt2man liblzma-dev libssl-dev libz-dev mercurial wget tar cmake zstd ninja-build lz4 liblz4-tool liblz4-dev lzma --fix-broken --fix-missing
- name: Build
run: |
chmod a+x build-*.sh
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="<b>Starting ARM (32-bit) GCC Build</b>"
./build-gcc.sh -a arm
./build-lld.sh -a arm
script_dir=$(pwd)
bash "$script_dir/strip-binaries.sh"
- name: Create tarball
run: |
tar -cvf eva-gcc-arm-$(/bin/date -u '+%d%m%Y').xz gcc-arm/*
- uses: actions/upload-artifact@main
with:
name: arm-tarball
path: |
*.xz
publish-release:
needs: [build-arm64-tc,build-arm-tc]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restoring artifacts
uses: actions/download-artifact@main
with:
path: ${{ github.workspace }}
- name: Release Tag
id: release_tag
run: echo "TAG_NAME='$(date -u +%d%m%Y)'" >> $GITHUB_ENV
- name: Create Release
run: |
gh release create ${{ env.TAG_NAME }} -F aarch64-tarball/gcc-version */*.xz
send-day:
needs: [publish-release]
runs-on: ubuntu-latest
steps:
- name: Send telegram messages
run: |
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="It's $(date +%A) my dudes!"
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" -d chat_id="${CHAT_ID}" -d "disable_web_page_preview=true" -d "parse_mode=html" -d text="The year is $(date +'%j' | awk '{printf "%.2f\n", $0 / 365.25 * 100}')% complete. Time is flying."