Skip to content

Commit 7dd7342

Browse files
committed
use the CLI everywhere
1 parent 753a736 commit 7dd7342

File tree

7 files changed

+57
-89
lines changed

7 files changed

+57
-89
lines changed

.github/workflows/report-fork.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
workflow_dispatch:
66
inputs:
77
fork:
8-
description: 'Fork to target'
8+
description: "Fork to target"
99
required: true
1010
type: string
1111
branch:
12-
description: 'Branch to target'
12+
description: "Branch to target"
1313
required: true
1414
type: string
1515

@@ -24,7 +24,6 @@ jobs:
2424
per_page: ${{ env.PER_PAGE }}
2525
gitref: ${{ steps.env.outputs.gitref }}
2626
date: ${{ steps.env.outputs.date }}
27-
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
2827
steps:
2928
- name: Checkout Bevy main branch
3029
uses: actions/checkout@v5
@@ -36,15 +35,13 @@ jobs:
3635
run: |
3736
echo "gitref=`git rev-parse HEAD`" >> $GITHUB_OUTPUT
3837
echo "date=`date +%Y%m%d%H%M`" >> $GITHUB_OUTPUT
39-
echo "pixeleagle_project=B25A040A-A980-4602-B90C-D480AB84076D" >> $GITHUB_OUTPUT
4038
4139
native-run:
4240
name: Native
4341
needs: [get-environment]
4442
uses: ./.github/workflows/workflow-native.yml
4543
with:
4644
gitref: ${{ needs.get-environment.outputs.gitref }}
47-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
4845
branch: "${{ inputs.fork }}:${{ inputs.branch }}"
4946
repository: ${{ inputs.fork }}
5047
per_page: "${{ needs.get-environment.outputs.per_page }}"
@@ -56,7 +53,6 @@ jobs:
5653
uses: ./.github/workflows/workflow-mobile.yml
5754
with:
5855
gitref: ${{ needs.get-environment.outputs.gitref }}
59-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
6056
branch: "${{ inputs.fork }}:${{ inputs.branch }}"
6157
repository: ${{ inputs.fork }}
6258
secrets: inherit
@@ -67,7 +63,6 @@ jobs:
6763
uses: ./.github/workflows/workflow-wasm.yml
6864
with:
6965
gitref: ${{ needs.get-environment.outputs.gitref }}
70-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
7166
branch: "${{ inputs.fork }}:${{ inputs.branch }}"
7267
repository: ${{ inputs.fork }}
7368
secrets: inherit

.github/workflows/report-main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
outputs:
1313
gitref: ${{ steps.env.outputs.gitref }}
1414
date: ${{ steps.env.outputs.date }}
15-
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
1615
mobile_percy_project: ${{ steps.env.outputs.mobile_percy_project }}
1716
updated: ${{ steps.version-check.outputs.updated }}
1817
steps:
@@ -26,7 +25,6 @@ jobs:
2625
run: |
2726
echo "gitref=`git rev-parse HEAD`" >> $GITHUB_OUTPUT
2827
echo "date=`date +%Y%m%d%H%M`" >> $GITHUB_OUTPUT
29-
echo "pixeleagle_project=B25A040A-A980-4602-B90C-D480AB84076D" >> $GITHUB_OUTPUT
3028
echo "mobile_percy_project=dede4209/Bevy-Mobile-Example" >> $GITHUB_OUTPUT
3129
- uses: actions/checkout@v5
3230
with:
@@ -46,7 +44,6 @@ jobs:
4644
if: needs.get-environment.outputs.updated == 'true' || github.event_name == 'workflow_dispatch'
4745
with:
4846
gitref: ${{ needs.get-environment.outputs.gitref }}
49-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
5047
branch: "main"
5148
repository: "bevyengine/bevy"
5249
secrets: inherit
@@ -59,7 +56,6 @@ jobs:
5956
with:
6057
gitref: ${{ needs.get-environment.outputs.gitref }}
6158
mobile_percy_project: ${{ needs.get-environment.outputs.mobile_percy_project }}
62-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
6359
branch: "main"
6460
repository: "bevyengine/bevy"
6561
secrets: inherit
@@ -71,7 +67,6 @@ jobs:
7167
uses: ./.github/workflows/workflow-wasm.yml
7268
with:
7369
gitref: ${{ needs.get-environment.outputs.gitref }}
74-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
7570
branch: "main"
7671
repository: "bevyengine/bevy"
7772
secrets: inherit

.github/workflows/report-pr-by-issue.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ jobs:
5555
per_page: ${{ env.PER_PAGE }}
5656
gitref: ${{ steps.env.outputs.gitref }}
5757
date: ${{ steps.env.outputs.date }}
58-
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
5958
steps:
6059
- name: Checkout Bevy main branch
6160
uses: actions/checkout@v5
@@ -70,15 +69,13 @@ jobs:
7069
run: |
7170
echo "gitref=`git rev-parse HEAD`" >> $GITHUB_OUTPUT
7271
echo "date=`date +%Y%m%d%H%M`" >> $GITHUB_OUTPUT
73-
echo "pixeleagle_project=B25A040A-A980-4602-B90C-D480AB84076D" >> $GITHUB_OUTPUT
7472
7573
native-run:
7674
name: Native
7775
needs: [get-environment]
7876
uses: ./.github/workflows/workflow-native.yml
7977
with:
8078
gitref: ${{ needs.get-environment.outputs.gitref }}
81-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
8279
branch: "PR-${{ github.event.issue.title }}"
8380
repository: "bevyengine/bevy"
8481
per_page: "${{ needs.get-environment.outputs.per_page }}"
@@ -90,7 +87,6 @@ jobs:
9087
uses: ./.github/workflows/workflow-mobile.yml
9188
with:
9289
gitref: ${{ needs.get-environment.outputs.gitref }}
93-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
9490
branch: "PR-${{ github.event.issue.title }}"
9591
repository: "bevyengine/bevy"
9692
secrets: inherit
@@ -101,7 +97,6 @@ jobs:
10197
uses: ./.github/workflows/workflow-wasm.yml
10298
with:
10399
gitref: ${{ needs.get-environment.outputs.gitref }}
104-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
105100
branch: "PR-${{ github.event.issue.title }}"
106101
repository: "bevyengine/bevy"
107102
secrets: inherit
@@ -115,7 +110,7 @@ jobs:
115110
- name: Comment with link to Pixel Eagle
116111
run: |
117112
ISSUE_NUMBER=${{ github.event.issue.number }}
118-
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 }}"
113+
COMMENT_BODY="All done! Check the results at: https://pixel-eagle.com/project/B25A040A-A980-4602-B90C-D480AB84076D?filter=PR-${{ github.event.issue.title }}"
119114
gh issue comment $ISSUE_NUMBER --body "$COMMENT_BODY"
120115
gh issue close $ISSUE_NUMBER --reason completed
121116
env:

.github/workflows/report-pr.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
pr:
8-
description: 'PR to run'
8+
description: "PR to run"
99
required: true
1010
type: string
1111

@@ -20,12 +20,11 @@ jobs:
2020
per_page: ${{ env.PER_PAGE }}
2121
gitref: ${{ steps.env.outputs.gitref }}
2222
date: ${{ steps.env.outputs.date }}
23-
pixeleagle_project: ${{ steps.env.outputs.pixeleagle_project }}
2423
steps:
2524
- name: Checkout Bevy main branch
2625
uses: actions/checkout@v5
2726
with:
28-
repository: 'bevyengine/bevy'
27+
repository: "bevyengine/bevy"
2928
- name: Switch to PR
3029
run: |
3130
git fetch origin pull/${{ inputs.pr }}/head:pr-${{ inputs.pr }}
@@ -35,15 +34,13 @@ jobs:
3534
run: |
3635
echo "gitref=`git rev-parse HEAD`" >> $GITHUB_OUTPUT
3736
echo "date=`date +%Y%m%d%H%M`" >> $GITHUB_OUTPUT
38-
echo "pixeleagle_project=B25A040A-A980-4602-B90C-D480AB84076D" >> $GITHUB_OUTPUT
3937
4038
native-run:
4139
name: Native
4240
needs: [get-environment]
4341
uses: ./.github/workflows/workflow-native.yml
4442
with:
4543
gitref: ${{ needs.get-environment.outputs.gitref }}
46-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
4744
branch: "PR-${{ inputs.pr }}"
4845
repository: "bevyengine/bevy"
4946
per_page: "${{ needs.get-environment.outputs.per_page }}"
@@ -55,7 +52,6 @@ jobs:
5552
uses: ./.github/workflows/workflow-mobile.yml
5653
with:
5754
gitref: ${{ needs.get-environment.outputs.gitref }}
58-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
5955
branch: "PR-${{ inputs.pr }}"
6056
repository: "bevyengine/bevy"
6157
secrets: inherit
@@ -66,7 +62,6 @@ jobs:
6662
uses: ./.github/workflows/workflow-wasm.yml
6763
with:
6864
gitref: ${{ needs.get-environment.outputs.gitref }}
69-
pixeleagle_project: ${{ needs.get-environment.outputs.pixeleagle_project }}
7065
branch: "PR-${{ inputs.pr }}"
7166
repository: "bevyengine/bevy"
7267
secrets: inherit

.github/workflows/workflow-mobile.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ on:
1414
mobile_percy_project:
1515
required: false
1616
type: string
17-
pixeleagle_project:
18-
required: true
19-
type: string
2017
branch:
2118
required: true
2219
type: string
@@ -36,11 +33,6 @@ on:
3633
required: false
3734
type: string
3835
description: "Percy project to send results to"
39-
pixeleagle_project:
40-
required: true
41-
type: string
42-
default: "B25A040A-A980-4602-B90C-D480AB84076D"
43-
description: "Pixel Eagle project to send results to"
4436
branch:
4537
required: true
4638
type: string
@@ -52,11 +44,18 @@ jobs:
5244
outputs:
5345
pixeleagle_run: ${{ steps.run.outputs.pixeleagle_run }}
5446
steps:
47+
- name: Download Pixel Eagle CLI
48+
run: |
49+
curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
50+
chmod 755 pixeleagle-cli
51+
5552
- name: Create Run
5653
id: run
5754
run: |
58-
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'`
55+
run=`./pixeleagle-cli new-run --metadata '{"os":"mobile", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}'`
5956
echo "pixeleagle_run=$run" >> $GITHUB_OUTPUT
57+
env:
58+
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXELEAGLE }}
6059

6160
build-for-iOS:
6261
runs-on: macos-latest
@@ -273,25 +272,38 @@ jobs:
273272

274273
- name: Send to Pixel Eagle
275274
run: |
275+
curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
276+
chmod 755 pixeleagle-cli
277+
276278
cd .github/start-mobile-example
277279
for screenshot in $(find . -type f -maxdepth 1 -name "*.png");
278280
do
279281
file=${screenshot:2}
280282
name="${{ matrix.os }}-${{ matrix.device }}-${{ matrix.os_version }}-$file"
281-
echo $name
282-
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 }}
283+
mv "$file" "$name"
283284
done
284285
286+
../../pixeleagle-cli upload-screenshots ${{ needs.create-pixel-eagle-run.outputs.pixeleagle_run }} *.png
287+
env:
288+
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXELEAGLE }}
289+
285290
mobile-check-result-pixel-eagle:
286291
runs-on: ubuntu-latest
287292
timeout-minutes: 30
288293
needs: [take-screenshots, create-pixel-eagle-run]
289294
if: always()
290295
steps:
296+
- name: Download Pixel Eagle CLI
297+
run: |
298+
curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
299+
chmod 755 pixeleagle-cli
300+
291301
- name: Trigger screenshots comparison
292302
run: |
293-
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
303+
./pixeleagle-cli 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
294304
cat pixeleagle-mobile.json
305+
env:
306+
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXELEAGLE }}
295307

296308
- name: Upload Pixel Eagle status
297309
uses: actions/upload-artifact@v5

.github/workflows/workflow-native.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
gitref:
1111
required: true
1212
type: string
13-
pixeleagle_project:
14-
required: true
15-
type: string
1613
branch:
1714
required: true
1815
type: string
@@ -37,11 +34,6 @@ on:
3734
type: string
3835
default: "main"
3936
description: "Git reference to use"
40-
pixeleagle_project:
41-
required: true
42-
type: string
43-
default: "B25A040A-A980-4602-B90C-D480AB84076D"
44-
description: "Pixeleagle project ID"
4537
branch:
4638
required: true
4739
type: string
@@ -267,16 +259,23 @@ jobs:
267259
- name: Send to Pixel Eagle
268260
if: steps.gather-examples.outcome == 'success'
269261
run: |
270-
curl -O https://pixel-eagle.com/assets/pixeleagle
271-
chmod 755 pixeleagle
262+
if [ "$RUNNER_OS" == "Windows" ]; then
263+
curl -sL -o pixeleagle-cli.zip https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-pc-windows-msvc.zip
264+
unzip pixeleagle-cli.zip
265+
elif [ "$RUNNER_OS" == "macOS" ]; then
266+
curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-aarch64-apple-darwin.tar.gz | tar xz
267+
else
268+
curl -sL https://github.com/vleue/PixelEagle-cli/releases/download/v0.1.0/pixeleagle-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
269+
fi
270+
chmod 755 pixeleagle-cli
272271
273-
run=`./pixeleagle new-run --metadata '{"os":"${{ matrix.os }}", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}'`
272+
run=`./pixeleagle-cli new-run --metadata '{"os":"${{ matrix.os }}", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}'`
274273
275274
cd screenshots-${{ matrix.os }}
276275
277-
../pixeleagle upload-screenshots $run */*.png
276+
../pixeleagle-cli upload-screenshots $run */*.png
278277
279-
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/compare/auto --json '{"os":"<equal>", "branch": "main"}' --oauth2-bearer ${{ secrets.PIXELEAGLE }} | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-${{ matrix.os }}.json
278+
../pixeleagle-cli compare-run $run --same os --filter branch:main --print-details | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-${{ matrix.os }}.json
280279
cat pixeleagle-${{ matrix.os }}.json
281280
282281
echo "created run $run"

0 commit comments

Comments
 (0)