Skip to content

Commit

Permalink
Cleanup (#55)
Browse files Browse the repository at this point in the history
* more windows removal

* update url
  • Loading branch information
mockersf authored Jun 28, 2024
1 parent 554fe50 commit d22308d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 52 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/report-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,6 @@ jobs:
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-Windows-*
# do
# (cat $report/successes; echo) >> Windows-successes-concat
# (cat $report/failures; echo) >> Windows-failures-concat
# (cat $report/no_screenshots; echo) >> Windows-no_screenshots-concat
# done
# # remove empty lines
# grep . Windows-successes-concat > results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Windows-successes || true
# 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
for report in status-macOS-*
do
(cat $report/successes; echo) >> macOS-successes-concat
Expand All @@ -154,7 +143,6 @@ jobs:
- 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-Windows/pixeleagle-Windows.json results/${{ needs.get-environment.outputs.date }}-${{ needs.get-environment.outputs.gitref }}/Windows-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
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/upkeep-update-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
os: [ubuntu-latest, macos-14]

steps:

Expand Down Expand Up @@ -65,11 +65,6 @@ jobs:
if: runner.os == 'linux'
run: xvfb-run -s "-screen 0 1280x1024x24" cargo run -p example-showcase -- --page 1 --per-page 1 run --in-ci --ignore-stress-tests --screenshot-frame 0 --fixed-frame-time 0.02 --stop-frame 50

- name: Build an example (Windows)
if: runner.os == 'windows'
shell: pwsh
run: cargo run -p example-showcase -- --page 1 --per-page 1 run --in-ci --ignore-stress-tests --screenshot-frame 0 --fixed-frame-time 0.02 --stop-frame 50

- name: Build an example (macOS)
if: runner.os == 'macos'
run: cargo run -p example-showcase -- --page 1 --per-page 1 run --in-ci --ignore-stress-tests --screenshot-frame 0 --fixed-frame-time 0.02 --stop-frame 50
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/workflow-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:

- name: Send to Pixel Eagle
run: |
run=`curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs -H 'Content-Type: application/json' -d '{"device":"${{ matrix.device }}", "os":"${{ matrix.os }}-${{ matrix.os_version }}", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}' | jq '.id'`
run=`curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs -H 'Content-Type: application/json' -d '{"device":"${{ matrix.device }}", "os":"${{ matrix.os }}-${{ matrix.os_version }}", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}' | jq '.id'`
SAVEIFS=$IFS
Expand All @@ -187,17 +187,17 @@ jobs:
IFS=$SAVEIFS
# Upload screenshots with unknown hashes
curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs/$run/hashes -H 'Content-Type: application/json' -d "$hashes" | jq '.[]|[.name] | @tsv' |
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/hashes -H 'Content-Type: application/json' -d "$hashes" | jq '.[]|[.name] | @tsv' |
while IFS=$'\t' read -r name; do
name=`echo $name | tr -d '"'`
echo "Uploading $name"
curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs/$run/screenshots -F "data=@./$name" -F "screenshot=$name" -H "Authorization: Bearer ${{ secrets.PIXELEAGLE }}"
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/screenshots -F "data=@./$name" -F "screenshot=$name" -H "Authorization: Bearer ${{ secrets.PIXELEAGLE }}"
echo
done
IFS=$SAVEIFS
curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs/$run/compare/auto -H 'Content-Type: application/json' -d '{"os":"<equal>", "device":"<equal>", "branch": "main"}'
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/compare/auto -H 'Content-Type: application/json' -d '{"os":"<equal>", "device":"<equal>", "branch": "main"}'
mobile-check-result:
runs-on: ubuntu-latest
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/workflow-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,6 @@ jobs:
continue-on-error: true
run: xvfb-run -s "-screen 0 1280x1024x24" cargo run -p example-showcase -- --page ${{ matrix.page }} --per-page ${{ inputs.per_page }} run --screenshot-frame 400 --fixed-frame-time 0.0125 --stop-frame 450 --in-ci --ignore-stress-tests --report-details --show-logs

- name: Take Screenshots (Windows)
id: screenshots-windows
if: runner.os == 'windows'
continue-on-error: true
shell: pwsh
run: |
Add-Type -AssemblyName System.Windows.Forms
$screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
[Windows.Forms.Cursor]::Position = "$($screen.Width / 2),$($screen.Height / 2)"
cargo run -p example-showcase -- --page ${{ matrix.page }} --per-page ${{ inputs.per_page }} run --screenshot-frame 400 --fixed-frame-time 0.0125 --stop-frame 450 --in-ci --ignore-stress-tests --report-details --show-logs
- name: Take Screenshots (macOS)
id: screenshots-macos
if: runner.os == 'macos'
Expand Down Expand Up @@ -189,7 +177,6 @@ jobs:
include:
- os: Linux
- os: macOS
- os: Windows
steps:

- name: Download all artifacts
Expand All @@ -214,7 +201,7 @@ jobs:
run: |
project="B25A040A-A980-4602-B90C-D480AB84076D"
run=`curl https://pixel-eagle.vleue.com/$project/runs --json '{"os":"${{ matrix.os }}", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}' | jq '.id'`
run=`curl https://pixel-eagle.com/$project/runs --json '{"os":"${{ matrix.os }}", "gitref": "${{ inputs.gitref }}", "branch": "${{ inputs.branch }}"}' | jq '.id'`
SAVEIFS=$IFS
Expand All @@ -237,19 +224,19 @@ jobs:
IFS=$SAVEIFS
# Upload screenshots with unknown hashes
curl https://pixel-eagle.vleue.com/$project/runs/$run/hashes --json "$hashes" | jq '.[]|[.name] | @tsv' |
curl https://pixel-eagle.com/$project/runs/$run/hashes --json "$hashes" | jq '.[]|[.name] | @tsv' |
while IFS=$'\t' read -r name; do
name=`echo $name | tr -d '"'`
echo "Uploading $name"
curl https://pixel-eagle.vleue.com/$project/runs/$run/screenshots -F "data=@./$name" -F "screenshot=$name" -H "Authorization: Bearer ${{ secrets.PIXELEAGLE }}"
curl https://pixel-eagle.com/$project/runs/$run/screenshots -F "data=@./$name" -F "screenshot=$name" -H "Authorization: Bearer ${{ secrets.PIXELEAGLE }}"
echo
done
IFS=$SAVEIFS
cd ..
curl https://pixel-eagle.vleue.com/$project/runs/$run/compare/auto --json '{"os":"<equal>", "branch": "main"}' | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-${{ matrix.os }}.json
curl https://pixel-eagle.com/$project/runs/$run/compare/auto --json '{"os":"<equal>", "branch": "main"}' | jq '{project_id: .project_id, from: .from, to: .to}' > pixeleagle-${{ matrix.os }}.json
cat pixeleagle-${{ matrix.os }}.json
echo "created run $run"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/workflow-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:

- name: Send to Pixel Eagle
run: |
run=`curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs -H 'Content-Type: application/json' -d '{"api":"${{ matrix.api }}", "browser": "${{ matrix.browser }}", "os":"wasm", "gitref": "${{ inputs.gitref }}", "host-os": "${{ runner.os }}", "branch": "${{ inputs.branch }}"}' | jq '.id'`
run=`curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs -H 'Content-Type: application/json' -d '{"api":"${{ matrix.api }}", "browser": "${{ matrix.browser }}", "os":"wasm", "gitref": "${{ inputs.gitref }}", "host-os": "${{ runner.os }}", "branch": "${{ inputs.branch }}"}' | jq '.id'`
SAVEIFS=$IFS
Expand All @@ -146,14 +146,14 @@ jobs:
IFS=$SAVEIFS
# Upload screenshots with unknown hashes
curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs/$run/hashes -H 'Content-Type: application/json' -d "$hashes" | jq '.[]|[.name] | @tsv' |
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/hashes -H 'Content-Type: application/json' -d "$hashes" | jq '.[]|[.name] | @tsv' |
while IFS=$'\t' read -r name; do
name=`echo $name | tr -d '"'`
echo "Uploading $name"
curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs/$run/screenshots -F "data=@./screenshot-$name-${{ matrix.browser }}.png" -F "screenshot=$name" -H "Authorization: Bearer ${{ secrets.PIXELEAGLE }}"
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/screenshots -F "data=@./screenshot-$name-${{ matrix.browser }}.png" -F "screenshot=$name" -H "Authorization: Bearer ${{ secrets.PIXELEAGLE }}"
echo
done
IFS=$SAVEIFS
curl https://pixel-eagle.vleue.com/${{ inputs.pixeleagle_project }}/runs/$run/compare/auto -H 'Content-Type: application/json' -d '{"api":"<equal>", "browser":"<equal>", "host-os":"<equal>", "branch": "main"}'
curl https://pixel-eagle.com/${{ inputs.pixeleagle_project }}/runs/$run/compare/auto -H 'Content-Type: application/json' -d '{"api":"<equal>", "browser":"<equal>", "host-os":"<equal>", "branch": "main"}'
14 changes: 7 additions & 7 deletions src/screenshot/pixeleagle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn read_results(results: String) -> Vec<ScreenshotData> {
};

let screenshots = ureq::get(&format!(
"https://pixel-eagle.vleue.com/{}/runs/{}/compare/{}",
"https://pixel-eagle.com/{}/runs/{}/compare/{}",
target.project_id, target.from, target.to
))
.call()
Expand All @@ -61,15 +61,15 @@ fn comparison_to_screenshot_data(comparison: Comparison) -> Vec<ScreenshotData>
result.push(ScreenshotData {
example: screenshot.name.clone(),
screenshot: ImageUrl(format!(
"https://pixel-eagle.vleue.com/{}/screenshot/{}",
"https://pixel-eagle.com/{}/screenshot/{}",
comparison.project_id.clone(),
screenshot.hash.clone()
)),
changed: ScreenshotState::Changed,
tag: None,
diff_ratio: 0.0,
snapshot_url: SnapshotViewerUrl(format!(
"https://pixel-eagle.vleue.com/project/{}/run/{}/compare/{}?screenshot={}",
"https://pixel-eagle.com/project/{}/run/{}/compare/{}?screenshot={}",
comparison.project_id, comparison.from, comparison.to, screenshot.name
)),
});
Expand All @@ -79,15 +79,15 @@ fn comparison_to_screenshot_data(comparison: Comparison) -> Vec<ScreenshotData>
result.push(ScreenshotData {
example: screenshot.name.clone(),
screenshot: ImageUrl(format!(
"https://pixel-eagle.vleue.com/{}/screenshot/{}",
"https://pixel-eagle.com/{}/screenshot/{}",
comparison.project_id.clone(),
screenshot.hash.clone()
)),
changed: ScreenshotState::Similar,
tag: None,
diff_ratio: 0.0,
snapshot_url: SnapshotViewerUrl(format!(
"https://pixel-eagle.vleue.com/project/{}/run/{}/compare/{}?screenshot={}",
"https://pixel-eagle.com/project/{}/run/{}/compare/{}?screenshot={}",
comparison.project_id, comparison.from, comparison.to, screenshot.name
)),
});
Expand All @@ -97,7 +97,7 @@ fn comparison_to_screenshot_data(comparison: Comparison) -> Vec<ScreenshotData>
result.push(ScreenshotData {
example: screenshot.name.clone(),
screenshot: ImageUrl(format!(
"https://pixel-eagle.vleue.com/{}/screenshot/{}",
"https://pixel-eagle.com/{}/screenshot/{}",
comparison.project_id.clone(),
screenshot.hash.clone()
)),
Expand All @@ -111,7 +111,7 @@ fn comparison_to_screenshot_data(comparison: Comparison) -> Vec<ScreenshotData>
})
.unwrap(),
snapshot_url: SnapshotViewerUrl(format!(
"https://pixel-eagle.vleue.com/project/{}/run/{}/compare/{}?screenshot={}",
"https://pixel-eagle.com/project/{}/run/{}/compare/{}?screenshot={}",
comparison.project_id, comparison.from, comparison.to, screenshot.name
)),
});
Expand Down
4 changes: 2 additions & 2 deletions templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ <h1 class="display-5 fw-bold text-body-emphasis">Bevy Example Tester</h1>
<div class="feature col">
<div class="feature-icon d-inline-flex align-items-center justify-content-center fs-2 mb-3">
<img alt="Pixel Eagle" class="d-inline-block mr-3 position-relative top-1"
style="width: 27px; margin-right: 16px;" src="https://pixel-eagle.vleue.com/logo-50.png">Pixel
style="width: 27px; margin-right: 16px;" src="https://pixel-eagle.com/logo-50.png">Pixel
Eagle
</div>
<p>Stay pixel perfect.</p>
<a href="https://pixel-eagle.vleue.com/project/B25A040A-A980-4602-B90C-D480AB84076D" class="icon-link">
<a href="https://pixel-eagle.com/project/B25A040A-A980-4602-B90C-D480AB84076D" class="icon-link">
Bevy screenshots
<svg class="bi">
<use xlink:href="#chevron-right"></use>
Expand Down

0 comments on commit d22308d

Please sign in to comment.