Skip to content

Hourly Build Status Dashboard Updater #2912

Hourly Build Status Dashboard Updater

Hourly Build Status Dashboard Updater #2912

name: Hourly Build Status Dashboard Updater
on:
schedule:
- cron: '0 * * * *' # Runs hourly
workflow_dispatch: # Allows manual triggering
jobs:
update-dashboard-data:
runs-on: ubuntu-latest
if: github.repository == 'qualcomm/eld'
steps:
- name: Checkout ELD
uses: actions/checkout@v4
with:
path: llvm-project/llvm/tools/eld
- name: Update Build Dashboard
shell: bash
run: |
cd llvm-project/llvm/tools/eld
DASH_DIR="$(mktemp -d)"
cp .github/workflows/scripts/record_builds.py ${DASH_DIR}/
git config user.name 'github-actions'
git config user.email 'github-actions@github.com'
git fetch --all
git checkout dashboard
cp -r dash ${DASH_DIR}/
cp build-status.db ${DASH_DIR}/dash/
cp ${DASH_DIR}/record_builds.py ${DASH_DIR}/dash/
git checkout documentation
cp -r ${DASH_DIR}/dash .
cd dash
python3 record_builds.py --workflow picolibc --emit
python3 record_builds.py --workflow musl --emit
python3 record_builds.py --workflow sanitizer --emit
python3 record_builds.py --workflow nightly --emit
python3 record_builds.py --workflow reverse_iterator --emit
python3 record_builds.py --workflow release --emit
rm -f record_builds.py build-status.db
rm -rf ${DASH_DIR}
cd ..
git add .
git commit -m "Update build status data for dashboard"
git push -f origin HEAD:refs/heads/documentation
continue-on-error: true
- name: Get Dependencies for Build Dashboard Screenshot
shell: bash
run: |
sudo apt install imagemagick
cd /tmp
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
continue-on-error: true
- name: Generate Build Dashboard Screenshot
shell: bash
run: |
DASH_DIR="$(mktemp -d)"
google-chrome --headless --password-store=basic --disable-features=DbusSecretPortal --screenshot=${DASH_DIR}/dashboard.png --window-size=1240,1240 --virtual-time-budget=2000 https://qualcomm.github.io/eld/dash/dash.html && mogrify -gravity North -chop 0x150 -gravity South -chop 0x85 ${DASH_DIR}/dashboard.png
ls -l ${DASH_DIR}/
cd llvm-project/llvm/tools/eld
git fetch --all
git checkout documentation
cd dash
cp -f ${DASH_DIR}/dashboard.png .
rm -rf ${DASH_DIR}
cd ..
git add .
git commit -m "Update Build Dashboard Screenshot"
git push -f origin HEAD:refs/heads/documentation
continue-on-error: true