Skip to content

Daily CI

Daily CI #173

Workflow file for this run

name: Daily CI
on:
workflow_dispatch:
schedule:
- cron: '5 16 * * *'
permissions:
contents: write
env:
WORKSPACE: ${{ github.workspace }}
LLVM_SOURCE_DIR: ${{ github.workspace }}/repos/llvm-project
TEST_SUITE_SOURCE_DIR: ${{ github.workspace }}/repos/llvm-test-suite
CPU2017_DIR: ${{ github.workspace }}/repos/cpu2017
CPU2006_DIR: ${{ github.workspace }}/repos/cpu2006
BUILDS_DIR: ${{ github.workspace }}/build-daily
LOG_FILE: ${{ github.workspace }}/build-daily/daily-ci.log
FAILED_TESTS: ${{ github.workspace }}/failed-tests.txt
jobs:
configure:
runs-on: [self-hosted, llvm-ci]
steps:
- uses: actions/checkout@v4
with:
clean: false
fetch-depth: 0
- name: Cleanup old builds
run: |
if [ -d "${BUILDS_DIR}" ]; then
rm -rf ${BUILDS_DIR}/*
else
mkdir -p ${BUILDS_DIR}
fi
- name: Update repos
run: |
cd ${WORKSPACE}
sh scripts/fetch-upstream.sh 2>&1 | tee -a ${LOG_FILE}
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "Update repos failed! Check logs."
exit 1
fi
llvm:
needs: configure
runs-on: [self-hosted, llvm-ci]
steps:
- name: Build LLVM Release mode
run: |
cd ${WORKSPACE}
sh scripts/build-llvm-release.sh 2>&1 | tee -a ${LOG_FILE}
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "Build LLVM failed! Check logs."
exit 1
fi
- name: Run LLVM tests
run: |
cd ${BUILDS_DIR}/build-llvm
ninja check-llvm check-lldb -j10 -v 2>&1 | tee -a ${LOG_FILE}
test-suite:
needs: llvm
runs-on: [self-hosted, llvm-ci]
steps:
- name: Build LLVM test suite LSX
env:
BUILD_DIR: build-test-suite-lsx
FLAG: "-mlsx"
run: |
cd ${WORKSPACE}
sh scripts/build-test-suite.sh 2>&1 | tee -a ${LOG_FILE}
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "Build LLVM test suite LSX failed! Check logs."
exit 1
fi
- name: Run LLVM test suite LSX
env:
BUILD_DIR: build-test-suite-lsx
run: |
cd ${WORKSPACE}
sh scripts/run-test-suite.sh 2>&1 | tee -a ${LOG_FILE}
- name: Build LLVM test suite LASX
env:
BUILD_DIR: build-test-suite-lasx
FLAG: "-mlasx"
run: |
cd ${WORKSPACE}
sh scripts/build-test-suite.sh 2>&1 | tee -a ${LOG_FILE}
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "Build LLVM test suite LASX failed! Check logs."
exit 1
fi
- name: Run LLVM test suite LASX
env:
BUILD_DIR: build-test-suite-lasx
run: |
cd ${WORKSPACE}
sh scripts/run-test-suite.sh 2>&1 | tee -a ${LOG_FILE}
results:
needs: test-suite
runs-on: [self-hosted, llvm-ci]
steps:
- name: Generate results
id: check
run: |
if rg -U '(?s)Failed Tests.*?\nTesting Time' ${LOG_FILE}; then
rg -U '(?s)Failed Tests.*?\nTesting Time' ${LOG_FILE} | rg -v "Testing" > ${FAILED_TESTS}
else
echo "" > ${FAILED_TESTS}
fi
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "$(date +'%Y %m %d') failed tests updated [bot]" || exit 0
echo "COMMITTED=true" >> $GITHUB_OUTPUT
- name: Push changes
if: steps.check.outputs.COMMITTED == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Trigger report failed tests
if: steps.check.outputs.COMMITTED == 'true'
run: |
gh workflow run 178464575