Commit Graph

201 Commits

Author SHA1 Message Date
Álvaro Velad Galván 26d10492c5 ci: Add concurrency to "Measure Bundle Size" job (#9729) 2026-02-18 13:37:52 +01:00
Álvaro Velad Galván dd3f6829f7 ci: Exclude wrapper.js, deps.js, and cast-boot.js files from bundle size report (#9554) 2026-01-09 11:32:42 +01:00
Álvaro Velad Galván 69a6d23897 ci: Exclude .map, .d.ts and externs files from bundle size report (#9552) 2026-01-08 16:08:25 +01:00
Wojciech Tyczyński daa22f385f ci: Fix commenting on bundle size (again) (#9551) 2026-01-08 13:43:56 +01:00
Wojciech Tyczyński 10bf3115d2 ci: Fix commenting of bundle size (#9539)
PR number couldn't be retrieved properly before, so we were never
commenting. Move jobs to one file to mitigate it.
2025-12-23 14:55:29 +01:00
Joey Parrish 9094b9e11f ci: Fix shaka-bot issue comments (#9504)
Leaving issue comments was broken in #9482, which changed gh api's -F to
-f for security reasons. However, gh issue comment doesn't have -f, only
-F, and this is distinct from gh api's problematic -F.

This reverts back to -F for gh issue comment.
2025-12-15 20:49:29 +01:00
Shaunak 939a61e560 ci: bundle sizes on pull requests (#9422)
Closes https://github.com/shaka-project/shaka-player/issues/9332
2025-12-09 13:28:11 -08:00
Joey Parrish 876511bad6 chore: Use only raw fields in gh api calls (#9482)
Workflows using gh api should always use -f (raw field) instead of -F
(field including special characters) because a crafted message could be
used to read files from the host, which could lead to things like leaked
keys or other private information.

There is no known exploit, because these messages were not yet
controllable by an attacker as far as we know, but better safe than
sorry.

Discovered during a careful review of #9422, which adds new usage of gh
api.
2025-12-08 14:57:31 -08:00
Wojciech Tyczyński b2f6b88fe3 ci: Use python3 explicitly (#9288)
As python v3 is now necessary in our build pipeline, use python3
explicitly in CI and tutorials, as not all OSes symlink `python` to
`python3`.
2025-10-27 13:34:51 +01:00
Joey Parrish 3358226dcb ci: Stop testing on old versions of Safari (#9021)
The method of running old versions of Safari no longer works.

Apple no longer hosts all Safari installers. The one we referenced
before for Safari 15 is no longer available. We should probably be on
Safari 17 as our legacy version now, since the latest is Safari 18.

I found currently-available installers via
[mrmacintosh.com](https://mrmacintosh.com/macos-safari-full-installer-database-download-directly-from-apple/),
but the latest Safari 17 no longer runs on the latest macOS version. (At
least, not on my Google corporate mac.)

So it seems that the best thing to do is to just stop testing on old
versions of Safari.

----

Appendix:

Browser usage share of Safari versions according to
https://caniuse.com/usage-table as of 2025-08-25

| Safari iOS version | Usage share |
| ---- | ------ |
| 15.x |  0.47% |
| 16.x |  0.83% |
| 17.x |  0.86% |
| 18.x | 10.74% |

| Safari macOS version | Usage share |
| ---- | ------ |
| 15.x |  0.17% |
| 16.x |  0.27% |
| 17.x |  0.38% |
| 18.x |  1.59% |

The current version of Safari in macos-latest on GitHub is Safari 18.5.
2025-08-25 10:30:03 -07:00
Álvaro Velad Galván 95c23d41fd ci: Disable Safari-old while we investigate how to fix it (#9008) 2025-08-21 11:06:11 +02:00
Joey Parrish 7098f43f70 ci: Fix Java setup for deployment to npm (#8968) 2025-08-11 08:31:20 +02:00
Joey Parrish ce2a6fd2d6 chore: Fix Java version in one last appspot workflow (#8933)
This one used "npm run build" instead of "build/...py", so it didn't
come up in my first search.
2025-07-29 11:52:20 -07:00
Joey Parrish 486a3b7e9a chore: Fix Java version in appspot workflows (#8932) 2025-07-29 11:20:52 -07:00
Joey Parrish ddda658d39 chore: Update to the latest Closure Compiler (#8925)
- Bump to Java 21 to support the new compiler.
 - Removes externs now included in the compiler.
 - Removes compiler flag no longer supported.
- Adds onkeystatuseschange to MediaKeySession polyfills (now in compiler
externs).
- This new compiler now triggers a warning in the Closure Library, which
will get fixed in a follow-up to update the library.
2025-07-29 10:36:40 -07:00
Joey Parrish 8320fb6937 docs: Update docs and scripts on dependencies (#8924)
- Make Java version explicit (11) in workflows
 - Update/sync required Java version (11) in all docs and scripts
 - Update/sync required Node version (18) in all docs and scripts
 - Update/sync required Python version (3.5) in all docs and scripts
2025-07-28 23:13:53 -07:00
Álvaro Velad Galván c68e066d02 docs: Update docs api links to use Github pages (#8702) 2025-06-05 21:34:12 +02:00
Álvaro Velad Galván f6161d99fd ci: Add job to deploy nightly demo on GitHub Pages (#8667) 2025-05-30 10:19:31 +02:00
Álvaro Velad Galván b6a489ec17 ci: Allow detect when running in VM (#8380) 2025-04-02 13:50:03 +02:00
Álvaro Velad Galván 51db910192 ci: Add new shaka-bot argument to test on Android only (#8329) 2025-03-24 18:31:07 +01:00
Joey Parrish 3a47bd1c03 ci: Prevent leaked credentials (#8142)
Naive use of google-github-actions/auth and
google-github-actions/deploy-appengine can lead to leaked credentials.

In particular, uploading static content from the workspace root leads to
servable copies of the credentials file written by
google-github-actions/auth. This is exactly what the Shaka Player Demo
did. Making matters worse, google-github-actions/auth logs credential
filenames for all to see.

All uploaded credentials were expired before I uploaded this PR.

This fixes the leak by installing a gcloudignore file which prevents the
credentials from being uploaded.
2025-02-21 15:33:17 -08:00
Joey Parrish 9dbed29b97 ci: Handle screenshot updates with no changes (#8135)
If a maintainer requests screenshot updates in a new PR, but there are
no changes, simply don't create a PR.

Also adds logs to make it clear which path was taken.
2025-02-20 10:34:47 -08:00
Joey Parrish d5eab12cb6 ci: Only run Safari native layout tests in lab (#8120)
Native text layout in Safari renders differently on different devices,
OS versions, and with different OS a11y settings. Because this is so
inconsistent across devices, we now have a flag to explicity enable
native text layout tests on Safari. This flag will be used in our lab
only. Our lab tests on Safari will be the source of canonical results
for Safari layout tests.
2025-02-19 17:06:17 -08:00
Joey Parrish bbd16ca0d0 ci: Check if screenshot PR exists before creating new one (#8119)
This keeps the job from failing if a one-off PR for screenshots already
exists.
2025-02-19 10:19:05 -08:00
Joey Parrish f156cdc6c0 ci: Create a screenshot PR if no existing PR given (#8110) 2025-02-18 21:37:53 -08:00
Álvaro Velad Galván 9e0c05835f ci: Deploy nightly after push on main branch (#8069) 2025-02-13 06:25:52 +01:00
Álvaro Velad Galván 8c79388f81 build: Add new builds with only HLS or DASH (#8036)
Related to https://github.com/shaka-project/shaka-player/issues/8034

Compared to the current version without UI:

DASH -24,5% of size
HLS -19,5% of size
2025-02-07 13:38:58 +01:00
Joey Parrish fc33928f38 ci: Add Google TV Streamer in the lab (#8015) 2025-02-04 11:55:43 -08:00
Joey Parrish 2911f81623 ci: Fix secrets for version index workflow (#7906)
See also PR #7892 and #7900.
2025-01-17 11:11:02 -08:00
Joey Parrish db689f2fc8 ci: Fix trigger for version index workflow (#7900)
The `workflow_call` trigger is required to allow calling a workflow from
another with "uses:". The `schedule` trigger was always a workaround,
and should now be removed.

See also PR #7892.
2025-01-16 12:56:50 -08:00
Álvaro Velad Galván f31c6f015a ci: Fix demo index workflow runs too early when a release is made (#7892)
Fixes https://github.com/shaka-project/shaka-player/issues/7379
2025-01-16 10:59:25 +01:00
Álvaro Velad Galván 7407aca589 chore: Remove "Override Cast Receiver App ID" in the nightly workflow (#7894)
There is no need to do this anymore because we always use that ID in any
release
2025-01-15 20:23:42 +01:00
Joey Parrish 2fa04141f2 ci: Fix screenshot upload (#7876)
This is meant to fix errors like "Failed request: (409) Conflict: an
artifact with this name already exists on the workflow run" which occur
when more than one instance of a browser fails tests in the same run.

The change in behavior that led to the error likely began after updating
actions/upload-artifact.
2025-01-10 11:57:44 -08:00
Joey Parrish 984dbba65f ci: Update release-please-action (#7860)
google-github-actions/release-please-action has been deprecated and
replaced with googleapis/release-please-action.
2025-01-09 12:18:21 -08:00
Álvaro Velad Galván ae35e9bc31 ci: Increase "Build Player" timeout (#7850) 2025-01-08 20:15:30 +01:00
Joey Parrish 0313375837 ci: Update nodejs to a maintained version (#7784) 2024-12-19 22:10:35 -08:00
Joey Parrish de0f33c262 ci: Refactor screenshot workflow (#7773)
This workflow, triggerable only by maintainers, had some potential
security issues. This is a big refactor, and makes several changes:

 - Clean up description text (non-critical)
- Add granular permissions to set status (without this, the workflow was
broken since we changed default permissions)
- Split the update-pr job into commit-new-screenshots (unprivileged) and
update-pr (privileged as @shaka-bot)

The commit-new-screenshots job runs code that the PR author controls,
such as "npm ci" (controlled through package.json and
package-lock.json), and "./build/updateScreenshots.py" (easily edited to
do whatever). These steps could be used to do literally anything,
including modify tools in /usr/bin on the workflow VM that are needed by
the privileged steps.

By moving the privileged steps into a completely separate job, we can
ensure a clean slate without worrying about the VM's state. We only
transfer the .git/ folder between the two jobs. So the
commit-new-screenshots job will create the commit, and the update-pr job
will actually push that commit from a clean VM.

The job is once again functional, and for the first time, actually safe.
2024-12-18 08:26:15 -08:00
Shaka Bot 3d742fe160 chore: Sync common workflows (#7776)
This is an automated sync of common workflows for this organization.
The upstream source is:

https://github.com/shaka-project/shaka-github-tools/commit/be928d30615b0fed458e89efe538f75360557b0b

Co-authored-by: Shaka Bot <shaka-bot@users.noreply.github.com>
2024-12-18 11:42:41 +01:00
Joey Parrish 7da1698e9b ci: Do not persist credentials after checkout (#7772)
See https://github.com/actions/checkout/issues/485 and
https://johnstawinski.com/2024/01/11/playing-with-fire-how-we-executed-a-critical-supply-chain-attack-on-pytorch/

In short, it is a terrible idea to persist even our default credentials
after checkout. There's no call for that, so we will now set
`persist-credentials: false` on all checkout actions.

The only exceptions are for the release job, which wants to push a tag
and create a branch, each of which explicitly persist credentials now
and explain why in a comment.
2024-12-18 08:50:10 +01:00
Gary Katsevman 758c084e64 chore: update feature request and bug report templates (#7769)
minor nit
2024-12-16 15:08:36 -08:00
Joey Parrish 4302896623 ci: Use GitHub API directly to post PR coverage comments (#7758) 2024-12-13 09:30:52 -08:00
Joey Parrish 7dbdb372e4 ci: Update workflow permissions (#7731)
Now that default permissions are read-only, we must enable specific permissions for certain workflow jobs.

This fixes every job except "update screenshots", which has unresolved permissions issues.
2024-12-09 20:39:34 -08:00
Shaka Bot 51f09b6372 chore: Sync common workflows (#7730)
This is an automated sync of common workflows for this organization.
The upstream source is:
https://github.com/shaka-project/shaka-github-tools/commit/f0ad5ac78826f567c06076dbe8752eb2ec7f4579

Co-authored-by: Shaka Bot <shaka-bot@users.noreply.github.com>
2024-12-09 16:14:27 -08:00
Álvaro Velad Galván 1d44f70ce4 ci: Fix coverage workflow run (#7715) 2024-12-04 09:16:28 -08:00
Álvaro Velad Galván 287008f90b ci: Add new shaka-bot commands (#7626) 2024-11-20 09:52:26 +01:00
Álvaro Velad Galván 997515a114 ci: Switch to use macos-latest (#7592)
Closes https://github.com/shaka-project/shaka-player/issues/6508
2024-11-14 18:41:23 +01:00
Joey Parrish ef9ba4f095 ci: Fix auto-branch job (#7586)
This uses very explicit ref names for both source and destination, to
fix this error during branch creation:

>   TAG=v4.12.0
>   BRANCH=$(echo "$TAG" | sed -e 's/\.0$/.x/')
>   git push origin HEAD:"$BRANCH"
>
> error: The destination you provided is not a full refname (i.e.,
> starting with "refs/"). We tried to guess what you meant by:
>
> - Looking for a ref that matches 'v4.12.x' on the remote side.
> - Checking if the <src> being pushed ('HEAD')
>   is a ref in "refs/{heads,tags}/". If so we add a corresponding
>   refs/{heads,tags}/ prefix on the remote side.
>
> Neither worked, so we gave up. You must fully qualify the ref.
> hint: The <src> part of the refspec is a commit object.
> hint: Did you mean to create a new branch by pushing to
> hint: 'HEAD:refs/heads/v4.12.x'?
> error: failed to push some refs to
'https://github.com/shaka-project/shaka-player'
> Error: Process completed with exit code 1.
2024-11-13 08:50:01 -08:00
Joey Parrish aafb522b78 ci: Fix status reporting on PRs (#7574)
To report commit status on a PR, the head commit must be used, not the
merge of that head back into the target (e.g. into main).

I would prefer to make status reporting special, so that we can run
tests and other operations against the merge (for more realistic results
and to avoid test failures that only show up after a merge). But this is
the quickest way for me to fix this critical feedback.
2024-11-13 08:18:40 +01:00
Álvaro Velad Galván 5315218484 ci: Add timeouts to avoid hangs on "Build and Test" workflow (#7561) 2024-11-08 10:47:43 +01:00
Álvaro Velad Galván 42bf0ca7d9 ci: Test Opera against macos-latest (#7558) 2024-11-07 19:35:23 +01:00