Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/report-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
workflow_dispatch:
inputs:
fork:
description: 'Fork to target'
description: "Fork to target"
required: true
type: string
branch:
description: 'Branch to target'
description: "Branch to target"
required: true
type: string

Expand All @@ -24,7 +24,6 @@ jobs:
per_page: ${{ env.PER_PAGE }}
gitref: ${{ steps.env.outputs.gitref }}
date: ${{ steps.env.outputs.date }}
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
steps:
- name: Checkout Bevy main branch
uses: actions/checkout@v6
Expand All @@ -36,15 +35,13 @@ jobs:
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

native-run:
name: Native
needs: [get-environment]
uses: ./.github/workflows/workflow-native.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "${{ inputs.fork }}:${{ inputs.branch }}"
repository: ${{ inputs.fork }}
per_page: "${{ needs.get-environment.outputs.per_page }}"
Expand All @@ -56,7 +53,6 @@ jobs:
uses: ./.github/workflows/workflow-mobile.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "${{ inputs.fork }}:${{ inputs.branch }}"
repository: ${{ inputs.fork }}
secrets: inherit
Expand All @@ -67,7 +63,6 @@ jobs:
uses: ./.github/workflows/workflow-wasm.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "${{ inputs.fork }}:${{ inputs.branch }}"
repository: ${{ inputs.fork }}
secrets: inherit
12 changes: 0 additions & 12 deletions .github/workflows/report-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
outputs:
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
Expand All @@ -26,8 +24,6 @@ jobs:
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@v6
with:
ref: "results"
Expand All @@ -46,7 +42,6 @@ jobs:
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"
secrets: inherit
Expand All @@ -58,8 +53,6 @@ jobs:
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
Expand All @@ -71,7 +64,6 @@ jobs:
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
Expand Down Expand Up @@ -133,10 +125,6 @@ jobs:
grep . Windows-failures-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Windows-failures || true
grep . Windows-no_screenshots-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Windows-no_screenshots || true

- name: Save Percy results
run: |
curl 'https://percy.io/api/v1/builds?filter\[sha\]=${{ needs.get-environment.outputs.gitref }}' -H 'Authorization: Token token=${{ secrets.PERCY_TOKEN_MOBILE }}' | 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@v6
with:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/report-pr-by-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
per_page: ${{ env.PER_PAGE }}
gitref: ${{ steps.env.outputs.gitref }}
date: ${{ steps.env.outputs.date }}
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
steps:
- name: Checkout Bevy main branch
uses: actions/checkout@v6
Expand All @@ -70,15 +69,13 @@ jobs:
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

native-run:
name: Native
needs: [get-environment]
uses: ./.github/workflows/workflow-native.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "PR-${{ github.event.issue.title }}"
repository: "bevyengine/bevy"
per_page: "${{ needs.get-environment.outputs.per_page }}"
Expand All @@ -90,7 +87,6 @@ jobs:
uses: ./.github/workflows/workflow-mobile.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "PR-${{ github.event.issue.title }}"
repository: "bevyengine/bevy"
secrets: inherit
Expand All @@ -101,7 +97,6 @@ jobs:
uses: ./.github/workflows/workflow-wasm.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "PR-${{ github.event.issue.title }}"
repository: "bevyengine/bevy"
secrets: inherit
Expand All @@ -115,7 +110,7 @@ jobs:
- name: Comment with link to Pixel Eagle
run: |
ISSUE_NUMBER=${{ github.event.issue.number }}
COMMENT_BODY="All done! Check the results at: https://pixel-eagle.com/project/${{ needs.get-environment.outputs.pixeleagle_project }}?filter=PR-${{ github.event.issue.title }}"
COMMENT_BODY="All done! Check the results at: https://pixel-eagle.com/project/B25A040A-A980-4602-B90C-D480AB84076D?filter=PR-${{ github.event.issue.title }}"
gh issue comment $ISSUE_NUMBER --body "$COMMENT_BODY"
gh issue close $ISSUE_NUMBER --reason completed
env:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/report-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
pr:
description: 'PR to run'
description: "PR to run"
required: true
type: string

Expand All @@ -20,12 +20,11 @@ jobs:
per_page: ${{ env.PER_PAGE }}
gitref: ${{ steps.env.outputs.gitref }}
date: ${{ steps.env.outputs.date }}
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
steps:
- name: Checkout Bevy main branch
uses: actions/checkout@v6
with:
repository: 'bevyengine/bevy'
repository: "bevyengine/bevy"
- name: Switch to PR
run: |
git fetch origin pull/${{ inputs.pr }}/head:pr-${{ inputs.pr }}
Expand All @@ -35,15 +34,13 @@ jobs:
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

native-run:
name: Native
needs: [get-environment]
uses: ./.github/workflows/workflow-native.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "PR-${{ inputs.pr }}"
repository: "bevyengine/bevy"
per_page: "${{ needs.get-environment.outputs.per_page }}"
Expand All @@ -55,7 +52,6 @@ jobs:
uses: ./.github/workflows/workflow-mobile.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "PR-${{ inputs.pr }}"
repository: "bevyengine/bevy"
secrets: inherit
Expand All @@ -66,7 +62,6 @@ jobs:
uses: ./.github/workflows/workflow-wasm.yml
with:
gitref: ${{ needs.get-environment.outputs.gitref }}
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
branch: "PR-${{ inputs.pr }}"
repository: "bevyengine/bevy"
secrets: inherit
46 changes: 20 additions & 26 deletions .github/workflows/workflow-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ on:
required: true
type: string
default: "main"
mobile_percy_project:
required: false
type: string
pixeleagle_project:
required: true
type: string
branch:
required: true
type: string
Expand All @@ -32,15 +26,6 @@ on:
type: string
default: "main"
description: "Commit or branch name to run on"
mobile_percy_project:
required: false
type: string
description: "Percy project to send results to"
pixeleagle_project:
required: true
type: string
default: "B25A040A-A980-4602-B90C-D480AB84076D"
description: "Pixel Eagle project to send results to"
branch:
required: true
type: string
Expand All @@ -52,11 +37,16 @@ jobs:
outputs:
pixeleagle_run: ${{ steps.run.outputs.pixeleagle_run }}
steps:
- name: Install Pixel Eagle CLI
uses: vleue/PixelEagle-cli/install@1eeb51dcd4531350912a1d4542eb687589d212e2 # v0.2.1

- name: Create Run
id: run
run: |
run=`curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs -H 'Content-Type: application/json' -d '{"os":"mobile", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}' --oauth2-bearer ${{ secrets.PIXELEAGLE }} | jq '.id'`
run=`pixeleagle-cli new-run --metadata '{"os":"mobile", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}'`
echo "pixeleagle_run=$run" >> $GITHUB_OUTPUT
env:
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXELEAGLE }}

build-for-iOS:
runs-on: macos-latest
Expand Down Expand Up @@ -264,10 +254,6 @@ jobs:
git apply --ignore-whitespace $($_.FullName)
}

- name: Set Percy Token if needed
if: "${{ inputs.mobile_percy_project != '' }}"
run: echo "PERCY_TOKEN=${{ secrets.PERCY_TOKEN_MOBILE }}" >> $GITHUB_ENV

- name: Run Example
run: |
cd .github/start-mobile-example
Expand All @@ -280,9 +266,6 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
DEVICE: ${{ matrix.device }}
OS_VERSION: ${{ matrix.os_version }}
PERCY_COMMIT: ${{ inputs.gitref }}
PERCY_PARALLEL_NONCE: ${{ github.run_id }}
PERCY_PARALLEL_TOTAL: ${{ strategy.job-total }}

- name: Save screenshots
if: ${{ always() }}
Expand All @@ -291,27 +274,38 @@ jobs:
name: screenshots-${{ matrix.device }}-${{ matrix.os_version }}
path: .github/start-mobile-example/*.png

- name: Install Pixel Eagle CLI
uses: vleue/PixelEagle-cli/install@1eeb51dcd4531350912a1d4542eb687589d212e2 # v0.2.1

- name: Send to Pixel Eagle
run: |
cd .github/start-mobile-example
for screenshot in $(find . -type f -maxdepth 1 -name "*.png");
do
file=${screenshot:2}
name="${{ matrix.os }}-${{ matrix.device }}-${{ matrix.os_version }}-$file"
echo $name
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }}/screenshots -F "data=@./$file" -F "screenshot=$name" --oauth2-bearer ${{ secrets.PIXELEAGLE }}
mv "$file" "$name"
done

pixeleagle-cli upload-screenshots ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }} *.png
env:
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXELEAGLE }}

mobile-check-result-pixel-eagle:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [take-screenshots, create-pixel-eagle-run]
if: always()
steps:
- name: Install Pixel Eagle CLI
uses: vleue/PixelEagle-cli/install@1eeb51dcd4531350912a1d4542eb687589d212e2 # v0.2.1

- name: Trigger screenshots comparison
run: |
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }}/compare/auto -H 'Content-Type: application/json' -d '{"os":"<equal>", "branch": "main"}' --oauth2-bearer ${{ secrets.PIXELEAGLE }} | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-mobile.json
pixeleagle-cli --format json compare-run ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }} --same os --filter branch:main --print-details | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-mobile.json
cat pixeleagle-mobile.json
env:
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXELEAGLE }}

- name: Upload Pixel Eagle status
uses: actions/upload-artifact@v5
Expand Down
Loading
Loading