-
-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: Add script and workflow to automatically update stub report
On every push to master, we now regenerate the tub eport and check if it's changed from the one currently published on the website. If it has, we push a new commit to the website
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Update AVM2 implementation report on website | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
# FIXME - remove before merging | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
crowdin: | ||
runs-on: ubuntu-latest | ||
|
||
if: github.repository == 'ruffle-rs/ruffle' | ||
|
||
strategy: | ||
max-parallel: 1 # Should be 1 to avoid parallel builds | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run website update script | ||
run: | | ||
./update-website.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
rm -rf /tmp/ruffle-website-update | ||
mkdir /tmp/ruffle-website-update | ||
|
||
cargo run --package stub-report /tmp/ruffle-website-update/implementation.json | ||
|
||
cd /tmp/ruffle-website-update/ | ||
git clone https://github.com/ruffle-rs/api-report | ||
cd api-report | ||
cargo run -- -s avm2_specification.json -i ../implementation.json -o ../report.json | ||
|
||
cd ../ | ||
|
||
git clone https://github.com/ruffle-rs/ruffle-rs.github.io | ||
cd ruffle-rs.github.io | ||
|
||
if cmp -s "../report.json" "src/app/compatibility/avm2/report.json"; then | ||
echo "Report is unchanged, exiting" | ||
exit 0 | ||
fi | ||
|
||
echo "Report is changed - pushing commit" | ||
cp ../report.json src/app/compatibility/avm2/report.json | ||
git add src/app/compatibility/avm2/report.json | ||
git commit -m "Update AVM2 report from https://github.com/ruffle-rs/ruffle/commit/${GITHUB_SHA}" |