Example report - main #698
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Example report - main | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */6 * * *' | |
concurrency: | |
group: ${{ github.repository }}-example-report | |
env: | |
PER_PAGE: 20 | |
jobs: | |
get-environment: | |
name: Get Environment | |
runs-on: ubuntu-latest | |
outputs: | |
per_page: ${{ env.PER_PAGE }} | |
gitref: ${{ steps.env.outputs.gitref }} | |
date: ${{ steps.env.outputs.date }} | |
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }} | |
mobile_percy_project: ${{ steps.env.outputs.mobile_percy_project }} | |
updated: ${{ steps.version-check.outputs.updated }} | |
steps: | |
- name: Checkout Bevy main branch | |
uses: actions/checkout@v4 | |
with: | |
repository: 'bevyengine/bevy' | |
ref: 'main' | |
- name: Get Environment | |
id: env | |
run: | | |
echo "gitref=`git rev-parse HEAD`" >> $GITHUB_OUTPUT | |
echo "date=`date +%Y%m%d%H%M`" >> $GITHUB_OUTPUT | |
echo "pixeleagle_project=B25A040A-A980-4602-B90C-D480AB84076D" >> $GITHUB_OUTPUT | |
echo "mobile_percy_project=dede4209/Bevy-Mobile-Example" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'results' | |
path: 'results' | |
- name: Check if current Bevy version already ran | |
id: version-check | |
run: | | |
gitref=`git rev-parse HEAD` | |
updated=`if ls results/*-$gitref 1> /dev/null 2>&1; then echo "false"; else echo "true"; fi` | |
echo "updated=$updated" >> $GITHUB_OUTPUT | |
native-run: | |
name: Native | |
needs: [get-environment] | |
uses: ./.github/workflows/workflow-native.yml | |
if: needs.get-environment.outputs.updated == 'true' || github.event_name == 'workflow_dispatch' | |
with: | |
gitref: ${{ needs.get-environment.outputs.gitref }} | |
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }} | |
branch: "main" | |
repository: "bevyengine/bevy" | |
per_page: "${{ needs.get-environment.outputs.per_page }}" | |
secrets: inherit | |
mobile-run: | |
name: Mobile | |
needs: [get-environment] | |
if: needs.get-environment.outputs.updated == 'true' || github.event_name == 'workflow_dispatch' | |
uses: ./.github/workflows/workflow-mobile.yml | |
with: | |
gitref: ${{ needs.get-environment.outputs.gitref }} | |
mobile_percy_project: ${{ needs.get-environment.outputs.mobile_percy_project }} | |
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }} | |
branch: "main" | |
repository: "bevyengine/bevy" | |
secrets: inherit | |
wasm-run: | |
name: Wasm | |
needs: [get-environment] | |
if: needs.get-environment.outputs.updated == 'true' || github.event_name == 'workflow_dispatch' | |
uses: ./.github/workflows/workflow-wasm.yml | |
with: | |
gitref: ${{ needs.get-environment.outputs.gitref }} | |
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }} | |
branch: "main" | |
repository: "bevyengine/bevy" | |
secrets: inherit | |
update-results: | |
name: Update Results | |
runs-on: ubuntu-latest | |
needs: [get-environment, native-run, mobile-run] | |
if: always() && (needs.get-environment.outputs.updated == 'true' || github.event_name == 'workflow_dispatch') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'results' | |
path: 'results' | |
- name: Download all status artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: status-* | |
- name: Concatenate status | |
run: | | |
set -x | |
mkdir results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }} | |
for report in status-Linux-* | |
do | |
(cat $report/successes; echo) >> Linux-successes-concat | |
(cat $report/failures; echo) >> Linux-failures-concat | |
(cat $report/no_screenshots; echo) >> Linux-no_screenshots-concat | |
done | |
# remove empty lines | |
grep . Linux-successes-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Linux-successes || true | |
grep . Linux-failures-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Linux-failures || true | |
grep . Linux-no_screenshots-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Linux-no_screenshots || true | |
for report in status-macOS-* | |
do | |
(cat $report/successes; echo) >> macOS-successes-concat | |
(cat $report/failures; echo) >> macOS-failures-concat | |
(cat $report/no_screenshots; echo) >> macOS-no_screenshots-concat | |
done | |
# remove empty lines | |
grep . macOS-successes-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/macOS-successes || true | |
grep . macOS-failures-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/macOS-failures || true | |
grep . macOS-no_screenshots-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/macOS-no_screenshots || true | |
- name: Save Percy results | |
run: | | |
curl 'https://percy.io/api/v1/projects/${{ needs.get-environment.outputs.mobile_percy_project }}/builds?filter\[sha\]=${{ needs.get-environment.outputs.gitref }}' | jq '.data[0].attributes' > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/mobile-percy | |
- name: Download all Pixel Eagle artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: pixeleagle-* | |
- name: Save Pixel Eagle results | |
run: | | |
mv pixeleagle-Linux/pixeleagle-Linux.json results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Linux-pixeleagle | |
mv pixeleagle-macOS/pixeleagle-macOS.json results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/macOS-pixeleagle | |
- name: Store results in git | |
run: | | |
cd results | |
git config user.name 'Workflow' | |
git config user.email '<>' | |
git add . | |
git commit -m "Update Results" | |
git push | |
- name: Upload Aggregated Status | |
uses: actions/upload-artifact@v4 | |
with: | |
name: aggregated-status | |
path: | | |
results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }} | |
update-website: | |
name: Update Website | |
needs: [get-environment, update-results] | |
if: always() && (needs.get-environment.outputs.updated == 'true' || github.event_name == 'workflow_dispatch') | |
uses: ./.github/workflows/workflow-rebuild-website.yml | |
permissions: | |
contents: read | |
pages: write | |
id-token: write |