shaka-player 4.6.15 → 4.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/appspot.yaml +4 -4
- package/.github/workflows/build-and-test.yaml +6 -6
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +29 -7
- package/.github/workflows/demo-version-index.yaml +3 -3
- package/.github/workflows/nightly-demo.yaml +4 -4
- package/.github/workflows/release-please.yaml +24 -23
- package/.github/workflows/report-incremental-coverage.yaml +1 -1
- package/.github/workflows/selenium-lab-tests.yaml +30 -18
- package/.github/workflows/sync-labels.yaml +1 -1
- package/.github/workflows/talk-to-shaka-bot.yaml +1 -1
- package/.github/workflows/update-issues.yaml +1 -1
- package/.github/workflows/update-screenshots.yaml +25 -38
- package/CHANGELOG.md +51 -0
- package/README.md +2 -4
- package/demo/demo.less +1 -5
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +3 -4
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +12 -10
- package/dist/shaka-player.compiled.debug.d.ts +12 -10
- package/dist/shaka-player.compiled.debug.externs.js +78 -64
- package/dist/shaka-player.compiled.debug.js +167 -162
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +78 -64
- package/dist/shaka-player.compiled.js +1096 -1089
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +12 -10
- package/dist/shaka-player.ui.debug.d.ts +12 -10
- package/dist/shaka-player.ui.debug.externs.js +78 -64
- package/dist/shaka-player.ui.debug.js +177 -172
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +78 -64
- package/dist/shaka-player.ui.js +1256 -1249
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/faq.md +25 -0
- package/docs/tutorials/offline.md +3 -0
- package/externs/shaka/player.js +32 -19
- package/karma.conf.js +4 -0
- package/lib/abr/simple_abr_manager.js +21 -26
- package/lib/cast/cast_proxy.js +1 -3
- package/lib/cast/cast_sender.js +8 -11
- package/lib/cea/cea608_memory.js +1 -1
- package/lib/cea/ts_cea_parser.js +10 -1
- package/lib/dash/dash_parser.js +3 -0
- package/lib/hls/hls_parser.js +18 -16
- package/lib/media/drm_engine.js +6 -3
- package/lib/media/media_source_engine.js +19 -1
- package/lib/media/playhead.js +3 -3
- package/lib/media/presentation_timeline.js +23 -0
- package/lib/media/segment_utils.js +10 -1
- package/lib/media/streaming_engine.js +1 -13
- package/lib/player.js +21 -4
- package/lib/polyfill/media_capabilities.js +20 -1
- package/lib/polyfill/mediasource.js +37 -14
- package/lib/text/vtt_text_parser.js +51 -51
- package/lib/transmuxer/h264.js +3 -3
- package/lib/transmuxer/h265.js +3 -3
- package/lib/transmuxer/ts_transmuxer.js +42 -3
- package/lib/util/manifest_parser_utils.js +1 -0
- package/lib/util/mp4_parser.js +57 -0
- package/lib/util/platform.js +4 -0
- package/lib/util/stream_utils.js +2 -3
- package/lib/util/ts_parser.js +99 -10
- package/package.json +1 -1
- package/test/cast/cast_proxy_unit.js +0 -46
- package/test/cast/cast_sender_unit.js +26 -26
- package/test/cea/cea608_memory_unit.js +3 -2
- package/test/hls/hls_live_unit.js +52 -0
- package/test/hls/hls_parser_integration.js +86 -0
- package/test/media/drm_engine_unit.js +16 -0
- package/test/media/media_source_engine_integration.js +1 -1
- package/test/media/playhead_unit.js +1 -1
- package/test/player_integration.js +13 -0
- package/test/player_unit.js +13 -1
- package/test/test/assets/6339/a.mp4 +0 -0
- package/test/test/assets/6339/master.mpd +37 -0
- package/test/test/assets/6339/v.mp4 +0 -0
- package/test/test/assets/hls-text-offset/index.m3u8 +8 -0
- package/test/test/assets/hls-text-offset/playlist-video.m3u8 +22 -0
- package/test/test/assets/hls-text-offset/playlist-vtt.m3u8 +22 -0
- package/test/test/assets/hls-text-offset/video-0000000069.ts +0 -0
- package/test/test/assets/hls-text-offset/video-0000000070.ts +0 -0
- package/test/test/assets/hls-text-offset/video-0000000071.ts +0 -0
- package/test/test/assets/hls-text-offset/video-0000000072.ts +0 -0
- package/test/test/assets/hls-text-offset/video-0000000073.ts +0 -0
- package/test/test/assets/hls-text-offset/video-069.ts +0 -0
- package/test/test/assets/hls-text-offset/video-070.ts +0 -0
- package/test/test/assets/hls-text-offset/video-071.ts +0 -0
- package/test/test/assets/hls-text-offset/video-072.ts +0 -0
- package/test/test/assets/hls-text-offset/video-073.ts +0 -0
- package/test/test/assets/hls-text-offset/vtt-069.vtt +5 -0
- package/test/test/assets/hls-text-offset/vtt-070.vtt +5 -0
- package/test/test/assets/hls-text-offset/vtt-071.vtt +2 -0
- package/test/test/assets/hls-text-offset/vtt-072.vtt +2 -0
- package/test/test/assets/hls-text-offset/vtt-073.vtt +5 -0
- package/test/test/assets/hls-ts-raw-aac/fileSequence0.ts +0 -0
- package/test/test/assets/hls-ts-raw-aac/fileSequence1.ts +0 -0
- package/test/test/assets/hls-ts-raw-aac/fileSequence2.ts +0 -0
- package/test/test/assets/hls-ts-raw-aac/fileSequence3.ts +0 -0
- package/test/test/assets/hls-ts-raw-aac/index.m3u8 +4 -0
- package/test/test/assets/hls-ts-raw-aac/playlist.m3u8 +14 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000024.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000025.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000026.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000027.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000028.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000029.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000030.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000031.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000032.ts +0 -0
- package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000033.ts +0 -0
- package/test/test/assets/hls-ts-rollover/playlist.m3u8 +39 -0
- package/test/test/externs/jasmine.js +2 -1
- package/test/text/vtt_text_parser_unit.js +12 -59
- package/test/transmuxer/transmuxer_integration.js +38 -0
- package/lib/polyfill/storage_estimate.js +0 -57
|
@@ -15,24 +15,24 @@ jobs:
|
|
|
15
15
|
appspot:
|
|
16
16
|
runs-on: ubuntu-latest
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
19
|
with:
|
|
20
20
|
ref: ${{ inputs.ref }}
|
|
21
21
|
fetch-depth: 0
|
|
22
22
|
persist-credentials: false
|
|
23
23
|
|
|
24
|
-
- uses: actions/setup-node@
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
25
|
with:
|
|
26
26
|
node-version: 16
|
|
27
27
|
registry-url: 'https://registry.npmjs.org'
|
|
28
28
|
|
|
29
29
|
- uses: ./.github/workflows/custom-actions/prep-for-appspot
|
|
30
30
|
|
|
31
|
-
- uses: google-github-actions/auth@
|
|
31
|
+
- uses: google-github-actions/auth@v2
|
|
32
32
|
with:
|
|
33
33
|
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
|
|
34
34
|
|
|
35
|
-
- uses: google-github-actions/deploy-appengine@
|
|
35
|
+
- uses: google-github-actions/deploy-appengine@v2
|
|
36
36
|
with:
|
|
37
37
|
project_id: shaka-player-demo
|
|
38
38
|
version: ${{ inputs.subdomain }}
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
runs-on: ubuntu-latest
|
|
26
26
|
steps:
|
|
27
27
|
- name: Checkout code
|
|
28
|
-
uses: actions/checkout@
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
29
|
with:
|
|
30
30
|
ref: ${{ inputs.ref || github.ref }}
|
|
31
31
|
|
|
@@ -89,7 +89,7 @@ jobs:
|
|
|
89
89
|
run: sudo apt -y update && sudo apt -y install ffmpeg
|
|
90
90
|
|
|
91
91
|
- name: Checkout code
|
|
92
|
-
uses: actions/checkout@
|
|
92
|
+
uses: actions/checkout@v4
|
|
93
93
|
with:
|
|
94
94
|
ref: ${{ inputs.ref || github.ref }}
|
|
95
95
|
|
|
@@ -128,7 +128,7 @@ jobs:
|
|
|
128
128
|
|
|
129
129
|
# Some CI images (self-hosted or otherwise) don't have the minimum Java
|
|
130
130
|
# version necessary for the compiler (Java 11).
|
|
131
|
-
- uses: actions/setup-java@
|
|
131
|
+
- uses: actions/setup-java@v4
|
|
132
132
|
with:
|
|
133
133
|
distribution: zulu
|
|
134
134
|
java-version: 11
|
|
@@ -178,7 +178,7 @@ jobs:
|
|
|
178
178
|
fi
|
|
179
179
|
|
|
180
180
|
- name: Upload coverage reports
|
|
181
|
-
uses: actions/upload-artifact@
|
|
181
|
+
uses: actions/upload-artifact@v4
|
|
182
182
|
if: ${{ always() && steps.coverage.outputs.coverage_found }}
|
|
183
183
|
with:
|
|
184
184
|
name: coverage
|
|
@@ -194,7 +194,7 @@ jobs:
|
|
|
194
194
|
|
|
195
195
|
# Upload new screenshots and diffs on failure; ignore if missing
|
|
196
196
|
- name: Upload screenshots
|
|
197
|
-
uses: actions/upload-artifact@
|
|
197
|
+
uses: actions/upload-artifact@v4
|
|
198
198
|
if: ${{ failure() }}
|
|
199
199
|
with:
|
|
200
200
|
name: screenshots-${{ matrix.browser }}
|
|
@@ -212,7 +212,7 @@ jobs:
|
|
|
212
212
|
runs-on: ubuntu-latest
|
|
213
213
|
steps:
|
|
214
214
|
- name: Checkout code
|
|
215
|
-
uses: actions/checkout@
|
|
215
|
+
uses: actions/checkout@v4
|
|
216
216
|
with:
|
|
217
217
|
ref: ${{ inputs.ref || github.ref }}
|
|
218
218
|
|
|
@@ -14,6 +14,9 @@ inputs:
|
|
|
14
14
|
token:
|
|
15
15
|
description: A GitHub access token.
|
|
16
16
|
required: true
|
|
17
|
+
job_name:
|
|
18
|
+
description: A job name, so that the status' target URL can point to a specific job.
|
|
19
|
+
required: false
|
|
17
20
|
|
|
18
21
|
runs:
|
|
19
22
|
using: composite
|
|
@@ -21,17 +24,36 @@ runs:
|
|
|
21
24
|
- name: Report Commit Status
|
|
22
25
|
shell: bash
|
|
23
26
|
run: |
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
|
|
27
|
+
export GITHUB_TOKEN="${{ inputs.token }}"
|
|
28
|
+
|
|
29
|
+
# Here we compute a "target URL". It will be attached to the commit
|
|
30
|
+
# status, so that when someone clicks "details" next to the status on
|
|
31
|
+
# the PR, it will link to the appropriate logs.
|
|
32
|
+
if [[ "${{ inputs.job_name }}" != "" ]]; then
|
|
33
|
+
# There are three identifiers for the job:
|
|
34
|
+
# - The job's key in YAML, which is "github.job"
|
|
35
|
+
# - The job's name, which is not provided by any runner environment
|
|
36
|
+
# - The job's numerical ID, which is not provided either
|
|
37
|
+
# To link to this specific job in the status, we need the numerical
|
|
38
|
+
# job ID. The GH API provides a list of jobs, which contain
|
|
39
|
+
# numerical IDs and names, but not keys. So the caller of this
|
|
40
|
+
# action must provide the string name, and then we look up the
|
|
41
|
+
# numerical ID in the API. "github.job" is useless here.
|
|
42
|
+
job_id=$(
|
|
43
|
+
gh api /repos/${{github.repository}}/actions/runs/${{github.run_id}}/jobs \
|
|
44
|
+
| jq '.jobs | map(select(.name=="${{ inputs.job_name }}")) | .[].id'
|
|
45
|
+
)
|
|
46
|
+
TARGET_URL="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}/job/$job_id"
|
|
47
|
+
else
|
|
48
|
+
# Generic link to the run, without any specific job.
|
|
49
|
+
TARGET_URL="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
|
|
50
|
+
fi
|
|
51
|
+
|
|
29
52
|
SHA1=$(git rev-parse HEAD)
|
|
30
53
|
|
|
31
|
-
GITHUB_TOKEN=${{ inputs.token }} \
|
|
32
54
|
gh api \
|
|
33
55
|
-X POST \
|
|
34
56
|
-F "context=${{ inputs.context }}" \
|
|
35
57
|
-F "state=${{ inputs.state }}" \
|
|
36
|
-
-F "target_url=$
|
|
58
|
+
-F "target_url=$TARGET_URL" \
|
|
37
59
|
"repos/${{ github.repository }}/statuses/$SHA1"
|
|
@@ -22,19 +22,19 @@ jobs:
|
|
|
22
22
|
appspot:
|
|
23
23
|
runs-on: ubuntu-latest
|
|
24
24
|
steps:
|
|
25
|
-
- uses: actions/checkout@
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
26
|
with:
|
|
27
27
|
# We need a list of all tags for this, so fetch the entire history.
|
|
28
28
|
fetch-depth: 0
|
|
29
29
|
|
|
30
|
-
- uses: google-github-actions/auth@
|
|
30
|
+
- uses: google-github-actions/auth@v2
|
|
31
31
|
with:
|
|
32
32
|
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
|
|
33
33
|
|
|
34
34
|
- name: Generate static content
|
|
35
35
|
run: python3 app-engine/demo-version-index/generate.py
|
|
36
36
|
|
|
37
|
-
- uses: google-github-actions/deploy-appengine@
|
|
37
|
+
- uses: google-github-actions/deploy-appengine@v2
|
|
38
38
|
with:
|
|
39
39
|
project_id: shaka-player-demo
|
|
40
40
|
version: index
|
|
@@ -11,12 +11,12 @@ jobs:
|
|
|
11
11
|
appspot:
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
15
|
with:
|
|
16
16
|
fetch-depth: 0
|
|
17
17
|
persist-credentials: false
|
|
18
18
|
|
|
19
|
-
- uses: actions/setup-node@
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
20
|
with:
|
|
21
21
|
node-version: 16
|
|
22
22
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -31,11 +31,11 @@ jobs:
|
|
|
31
31
|
|
|
32
32
|
- uses: ./.github/workflows/custom-actions/prep-for-appspot
|
|
33
33
|
|
|
34
|
-
- uses: google-github-actions/auth@
|
|
34
|
+
- uses: google-github-actions/auth@v2
|
|
35
35
|
with:
|
|
36
36
|
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
|
|
37
37
|
|
|
38
|
-
- uses: google-github-actions/deploy-appengine@
|
|
38
|
+
- uses: google-github-actions/deploy-appengine@v2
|
|
39
39
|
with:
|
|
40
40
|
project_id: shaka-player-demo
|
|
41
41
|
version: nightly
|
|
@@ -12,19 +12,19 @@ jobs:
|
|
|
12
12
|
outputs:
|
|
13
13
|
release_created: ${{ steps.release.outputs.release_created }}
|
|
14
14
|
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
15
|
+
patch: ${{ steps.release.outputs.patch }}
|
|
15
16
|
steps:
|
|
16
17
|
# Create/update release PR
|
|
17
|
-
- uses: google-github-actions/release-please-action@
|
|
18
|
+
- uses: google-github-actions/release-please-action@v4
|
|
18
19
|
id: release
|
|
19
20
|
with:
|
|
20
|
-
# Required input to specify the release type (node package).
|
|
21
|
-
release-type: node
|
|
22
21
|
# Make sure we create the PR against the correct branch.
|
|
23
|
-
|
|
22
|
+
target-branch: ${{ github.ref_name }}
|
|
24
23
|
# Use a special shaka-bot access token for releases.
|
|
25
24
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
26
|
-
#
|
|
27
|
-
|
|
25
|
+
# See also settings in these files:
|
|
26
|
+
manifest-file: .release-please-manifest.json
|
|
27
|
+
config-file: .release-please-config.json
|
|
28
28
|
|
|
29
29
|
# The jobs below are all conditional on a release having been created by
|
|
30
30
|
# someone merging the release PR. They all run in parallel.
|
|
@@ -32,9 +32,9 @@ jobs:
|
|
|
32
32
|
tag-main:
|
|
33
33
|
runs-on: ubuntu-latest
|
|
34
34
|
needs: release
|
|
35
|
-
if: needs.release.outputs.release_created &&
|
|
35
|
+
if: needs.release.outputs.release_created && needs.release.outputs.patch == '0'
|
|
36
36
|
steps:
|
|
37
|
-
- uses: actions/checkout@
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
38
|
with:
|
|
39
39
|
# Check out the origin repo, and do it at main, not the PR branch.
|
|
40
40
|
ref: main
|
|
@@ -55,12 +55,12 @@ jobs:
|
|
|
55
55
|
needs: release
|
|
56
56
|
if: needs.release.outputs.release_created
|
|
57
57
|
steps:
|
|
58
|
-
- uses: actions/checkout@
|
|
58
|
+
- uses: actions/checkout@v4
|
|
59
59
|
with:
|
|
60
60
|
fetch-depth: 0
|
|
61
61
|
persist-credentials: false
|
|
62
62
|
|
|
63
|
-
- uses: actions/setup-node@
|
|
63
|
+
- uses: actions/setup-node@v4
|
|
64
64
|
with:
|
|
65
65
|
node-version: 16
|
|
66
66
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -113,25 +113,26 @@ jobs:
|
|
|
113
113
|
fi
|
|
114
114
|
|
|
115
115
|
- run: npm pack
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
|
|
117
|
+
- name: Attach to release
|
|
118
|
+
env:
|
|
119
|
+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
120
|
+
run: |
|
|
121
|
+
gh release upload \
|
|
122
|
+
${{ needs.release.outputs.tag_name }} shaka-player-*.tgz \
|
|
123
|
+
--clobber
|
|
123
124
|
|
|
124
125
|
appspot:
|
|
125
126
|
runs-on: ubuntu-latest
|
|
126
127
|
needs: release
|
|
127
128
|
if: needs.release.outputs.release_created
|
|
128
129
|
steps:
|
|
129
|
-
- uses: actions/checkout@
|
|
130
|
+
- uses: actions/checkout@v4
|
|
130
131
|
with:
|
|
131
132
|
fetch-depth: 0
|
|
132
133
|
persist-credentials: false
|
|
133
134
|
|
|
134
|
-
- uses: actions/setup-node@
|
|
135
|
+
- uses: actions/setup-node@v4
|
|
135
136
|
with:
|
|
136
137
|
node-version: 16
|
|
137
138
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -165,11 +166,11 @@ jobs:
|
|
|
165
166
|
|
|
166
167
|
- uses: ./.github/workflows/custom-actions/prep-for-appspot
|
|
167
168
|
|
|
168
|
-
- uses: google-github-actions/auth@
|
|
169
|
+
- uses: google-github-actions/auth@v2
|
|
169
170
|
with:
|
|
170
171
|
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
|
|
171
172
|
|
|
172
|
-
- uses: google-github-actions/deploy-appengine@
|
|
173
|
+
- uses: google-github-actions/deploy-appengine@v2
|
|
173
174
|
with:
|
|
174
175
|
project_id: shaka-player-demo
|
|
175
176
|
version: ${{ env.APPSPOT_SUBDOMAIN }}
|
|
@@ -178,9 +179,9 @@ jobs:
|
|
|
178
179
|
auto-branch:
|
|
179
180
|
runs-on: ubuntu-latest
|
|
180
181
|
needs: release
|
|
181
|
-
if: needs.release.outputs.release_created &&
|
|
182
|
+
if: needs.release.outputs.release_created && needs.release.outputs.patch == '0'
|
|
182
183
|
steps:
|
|
183
|
-
- uses: actions/checkout@
|
|
184
|
+
- uses: actions/checkout@v4
|
|
184
185
|
with:
|
|
185
186
|
fetch-depth: 0
|
|
186
187
|
# Use a special shaka-bot access token for releases.
|
|
@@ -31,9 +31,17 @@ on:
|
|
|
31
31
|
required: false
|
|
32
32
|
type: string
|
|
33
33
|
ignore_test_status:
|
|
34
|
-
description: "If true, ignore test success or failure,
|
|
34
|
+
description: "If true, ignore test success or failure, and always upload screenshots."
|
|
35
35
|
required: false
|
|
36
36
|
type: boolean
|
|
37
|
+
skip_commit_status:
|
|
38
|
+
description: "If true, skip the commit status."
|
|
39
|
+
required: false
|
|
40
|
+
type: boolean
|
|
41
|
+
job_name_prefix:
|
|
42
|
+
description: "A prefix added to the job name when setting commit status, needed to correctly link to each job. Use when skip_commit_status is false, and set to the name of the parent job, plus space-slash-space."
|
|
43
|
+
required: false
|
|
44
|
+
type: string
|
|
37
45
|
schedule:
|
|
38
46
|
# Runs every night at 2am PST / 10am UTC, testing against the main branch.
|
|
39
47
|
- cron: '0 10 * * *'
|
|
@@ -71,7 +79,7 @@ jobs:
|
|
|
71
79
|
INCLUDE: ${{ steps.configure.outputs.INCLUDE }}
|
|
72
80
|
|
|
73
81
|
steps:
|
|
74
|
-
- uses: actions/checkout@
|
|
82
|
+
- uses: actions/checkout@v4
|
|
75
83
|
with:
|
|
76
84
|
ref: ${{ needs.compute-ref.outputs.REF }}
|
|
77
85
|
|
|
@@ -133,15 +141,16 @@ jobs:
|
|
|
133
141
|
needs: compute-ref
|
|
134
142
|
runs-on: ubuntu-latest
|
|
135
143
|
steps:
|
|
136
|
-
- uses: actions/checkout@
|
|
144
|
+
- uses: actions/checkout@v4
|
|
137
145
|
with:
|
|
138
146
|
ref: ${{ needs.compute-ref.outputs.REF }}
|
|
139
147
|
|
|
140
148
|
- name: Set commit status to pending
|
|
141
|
-
if: ${{ inputs.
|
|
149
|
+
if: ${{ inputs.skip_test_status == false }}
|
|
142
150
|
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
143
151
|
with:
|
|
144
152
|
context: Selenium / Build
|
|
153
|
+
job_name: "${{ inputs.job_name_prefix }}Pre-build Player"
|
|
145
154
|
state: pending
|
|
146
155
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
147
156
|
|
|
@@ -159,21 +168,21 @@ jobs:
|
|
|
159
168
|
--filter ThisFilterMatchesNoTests || true
|
|
160
169
|
|
|
161
170
|
- name: Cache dependencies
|
|
162
|
-
uses: actions/cache@
|
|
171
|
+
uses: actions/cache@v4
|
|
163
172
|
id: npm-cache
|
|
164
173
|
with:
|
|
165
174
|
path: node_modules/
|
|
166
175
|
key: node-${{ hashFiles('package-lock.json') }}
|
|
167
176
|
|
|
168
177
|
- name: Cache Babel output
|
|
169
|
-
uses: actions/cache@
|
|
178
|
+
uses: actions/cache@v4
|
|
170
179
|
id: babel-cache
|
|
171
180
|
with:
|
|
172
181
|
path: .babel-cache
|
|
173
182
|
key: babel-${{ hashFiles('*.js', 'demo/**.js', 'lib/**.js', 'ui/**.js', 'test/**.js', 'third_party/**.js') }}
|
|
174
183
|
|
|
175
184
|
- name: Store Player build
|
|
176
|
-
uses: actions/upload-artifact@
|
|
185
|
+
uses: actions/upload-artifact@v4
|
|
177
186
|
with:
|
|
178
187
|
name: shaka-player
|
|
179
188
|
path: dist/
|
|
@@ -182,10 +191,11 @@ jobs:
|
|
|
182
191
|
- name: Report final commit status
|
|
183
192
|
# Will run on success or failure, but not if the workflow is cancelled
|
|
184
193
|
# or if we were asked to ignore the test status.
|
|
185
|
-
if: ${{ (success() || failure()) && inputs.
|
|
194
|
+
if: ${{ (success() || failure()) && inputs.skip_commit_status == false }}
|
|
186
195
|
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
187
196
|
with:
|
|
188
197
|
context: Selenium / Build
|
|
198
|
+
job_name: "${{ inputs.job_name_prefix }}Pre-build Player"
|
|
189
199
|
state: ${{ job.status }}
|
|
190
200
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
191
201
|
|
|
@@ -201,31 +211,32 @@ jobs:
|
|
|
201
211
|
name: ${{ matrix.browser }}
|
|
202
212
|
|
|
203
213
|
steps:
|
|
204
|
-
- uses: actions/checkout@
|
|
214
|
+
- uses: actions/checkout@v4
|
|
205
215
|
with:
|
|
206
216
|
ref: ${{ needs.compute-ref.outputs.REF }}
|
|
207
217
|
|
|
208
218
|
- name: Set commit status to pending
|
|
209
|
-
if: ${{ inputs.
|
|
219
|
+
if: ${{ inputs.skip_commit_status == false }}
|
|
210
220
|
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
211
221
|
with:
|
|
212
222
|
context: Selenium / ${{ matrix.browser }}
|
|
223
|
+
job_name: "${{ inputs.job_name_prefix }}${{ matrix.browser }}"
|
|
213
224
|
state: pending
|
|
214
225
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
215
226
|
|
|
216
|
-
- uses: actions/setup-node@
|
|
227
|
+
- uses: actions/setup-node@v4
|
|
217
228
|
with:
|
|
218
229
|
node-version: 16
|
|
219
230
|
registry-url: 'https://registry.npmjs.org'
|
|
220
231
|
|
|
221
232
|
# The Docker image for this self-hosted runner doesn't contain java.
|
|
222
|
-
- uses: actions/setup-java@
|
|
233
|
+
- uses: actions/setup-java@v4
|
|
223
234
|
with:
|
|
224
235
|
distribution: zulu
|
|
225
236
|
java-version: 11
|
|
226
237
|
|
|
227
238
|
- name: Cache dependencies
|
|
228
|
-
uses: actions/cache@
|
|
239
|
+
uses: actions/cache@v4
|
|
229
240
|
id: npm-cache
|
|
230
241
|
with:
|
|
231
242
|
path: node_modules/
|
|
@@ -234,7 +245,7 @@ jobs:
|
|
|
234
245
|
enableCrossOsArchive: true # Share archives from Linux to Windows
|
|
235
246
|
|
|
236
247
|
- name: Cache Babel output
|
|
237
|
-
uses: actions/cache@
|
|
248
|
+
uses: actions/cache@v4
|
|
238
249
|
id: babel-cache
|
|
239
250
|
with:
|
|
240
251
|
path: .babel-cache
|
|
@@ -249,7 +260,7 @@ jobs:
|
|
|
249
260
|
# Instead of building Shaka N times, build it once and fetch the build to
|
|
250
261
|
# each Selenium runner in the matrix.
|
|
251
262
|
- name: Fetch Player build
|
|
252
|
-
uses: actions/download-artifact@
|
|
263
|
+
uses: actions/download-artifact@v4
|
|
253
264
|
with:
|
|
254
265
|
name: shaka-player
|
|
255
266
|
path: dist/
|
|
@@ -331,7 +342,7 @@ jobs:
|
|
|
331
342
|
fi
|
|
332
343
|
|
|
333
344
|
- name: Upload coverage report (Edge only)
|
|
334
|
-
uses: actions/upload-artifact@
|
|
345
|
+
uses: actions/upload-artifact@v4
|
|
335
346
|
# If there's a coverage report, upload it, even if a previous step
|
|
336
347
|
# failed.
|
|
337
348
|
if: ${{ always() && steps.coverage.outputs.coverage_report }}
|
|
@@ -347,7 +358,7 @@ jobs:
|
|
|
347
358
|
|
|
348
359
|
# Upload new screenshots and diffs on failure; ignore if missing
|
|
349
360
|
- name: Upload screenshots
|
|
350
|
-
uses: actions/upload-artifact@
|
|
361
|
+
uses: actions/upload-artifact@v4
|
|
351
362
|
if: ${{ failure() || inputs.ignore_test_status }}
|
|
352
363
|
with:
|
|
353
364
|
# In this workflow, "browser" is the selenium node name, which can
|
|
@@ -362,9 +373,10 @@ jobs:
|
|
|
362
373
|
- name: Report final commit status
|
|
363
374
|
# Will run on success or failure, but not if the workflow is cancelled
|
|
364
375
|
# or if we were asked to ignore the test status.
|
|
365
|
-
if: ${{ (success() || failure()) && inputs.
|
|
376
|
+
if: ${{ (success() || failure()) && inputs.skip_commit_status == false }}
|
|
366
377
|
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
367
378
|
with:
|
|
368
379
|
context: Selenium / ${{ matrix.browser }}
|
|
380
|
+
job_name: "${{ inputs.job_name_prefix }}${{ matrix.browser }}"
|
|
369
381
|
state: ${{ job.status }}
|
|
370
382
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
name: Set Pending Status
|
|
17
17
|
runs-on: ubuntu-latest
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
20
|
with:
|
|
21
21
|
ref: refs/pull/${{ inputs.pr }}/head
|
|
22
22
|
|
|
@@ -35,44 +35,23 @@ jobs:
|
|
|
35
35
|
pr: ${{ inputs.pr }}
|
|
36
36
|
test_filter: layout
|
|
37
37
|
ignore_test_status: true
|
|
38
|
+
job_name_prefix: "Get Selenium Lab Screenshots / "
|
|
38
39
|
|
|
39
40
|
update-pr:
|
|
40
41
|
name: Update PR
|
|
41
42
|
runs-on: ubuntu-latest
|
|
42
43
|
needs: [run-lab-tests]
|
|
43
44
|
steps:
|
|
44
|
-
- uses: actions/checkout@
|
|
45
|
+
- uses: actions/checkout@v4
|
|
45
46
|
with:
|
|
46
47
|
ref: refs/pull/${{ inputs.pr }}/head
|
|
47
48
|
|
|
48
|
-
- name: Set commit status to pending
|
|
49
|
-
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
50
|
-
with:
|
|
51
|
-
context: Update All Screenshots
|
|
52
|
-
state: pending
|
|
53
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
54
|
-
|
|
55
49
|
- name: Get artifacts
|
|
56
|
-
uses: actions/download-artifact@
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
57
51
|
with:
|
|
58
|
-
path:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
run: |
|
|
62
|
-
# The download-artifact action puts zip file contents into folders by
|
|
63
|
-
# the name of the artifact, so we can't have them downloaded directly
|
|
64
|
-
# to the screenshots folder. Here we move them into the correct
|
|
65
|
-
# locations.
|
|
66
|
-
cd new-screenshots
|
|
67
|
-
|
|
68
|
-
# "$i" is a folder for an artifact (eg "screenshots-ChromeAndroid"),
|
|
69
|
-
# and it contains a single folder with the name we use in our
|
|
70
|
-
# screenshots (eg "chrome-Android"). We want the contents of that
|
|
71
|
-
# inner folder to be copied to test/test/assets/screenshots/, where a
|
|
72
|
-
# folder with the same name (eg "chrome-Android") already exists.
|
|
73
|
-
for i in screenshots*; do
|
|
74
|
-
cp -a $i/* ../test/test/assets/screenshots/
|
|
75
|
-
done
|
|
52
|
+
path: test/test/assets/screenshots/
|
|
53
|
+
pattern: screenshots-*
|
|
54
|
+
merge-multiple: true
|
|
76
55
|
|
|
77
56
|
- name: Update screenshots
|
|
78
57
|
run: |
|
|
@@ -104,7 +83,7 @@ jobs:
|
|
|
104
83
|
git push "$REMOTE" HEAD:"$BRANCH"
|
|
105
84
|
|
|
106
85
|
- name: Debug
|
|
107
|
-
uses: mxschmitt/action-tmate@v3.
|
|
86
|
+
uses: mxschmitt/action-tmate@v3.17
|
|
108
87
|
with:
|
|
109
88
|
limit-access-to-actor: true
|
|
110
89
|
if: failure()
|
|
@@ -116,22 +95,30 @@ jobs:
|
|
|
116
95
|
# Will run on success or failure, but not if the workflow is cancelled.
|
|
117
96
|
if: ${{ success() || failure() }}
|
|
118
97
|
steps:
|
|
119
|
-
- uses: actions/checkout@
|
|
98
|
+
- uses: actions/checkout@v4
|
|
120
99
|
with:
|
|
121
100
|
ref: refs/pull/${{ inputs.pr }}/head
|
|
122
101
|
|
|
123
102
|
- name: Compute final status
|
|
124
103
|
id: compute
|
|
125
104
|
run: |
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
#
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
105
|
+
# The final status must be one of: success, failure, error, pending.
|
|
106
|
+
# However, the status from "result" from an earlier job is one of:
|
|
107
|
+
# success, failure, cancelled, skipped.
|
|
108
|
+
# We start by mapping those.
|
|
109
|
+
LAB_TEST_RESULT=$(echo "${{ needs.run-lab-tests.result }}" \
|
|
110
|
+
| sed -Ee 's/(cancelled|skipped)/error/')
|
|
111
|
+
UPDATE_PR_RESULT=$(echo "${{ needs.update-pr.result }}" \
|
|
112
|
+
| sed -Ee 's/(cancelled|skipped)/error/')
|
|
113
|
+
|
|
114
|
+
if [[ "$LAB_TEST_RESULT" == "success" ]]; then
|
|
115
|
+
# If run-lab-tests succeeded, use the status of update-pr, which
|
|
116
|
+
# comes after that. If that is blank, default to "error".
|
|
117
|
+
echo "status=${UPDATE_PR_RESULT:-error}" >> $GITHUB_OUTPUT
|
|
133
118
|
else
|
|
134
|
-
|
|
119
|
+
# If run-lab-tests failed, use that. If that is blank, default to
|
|
120
|
+
# "error".
|
|
121
|
+
echo "status=${LAB_TEST_RESULT:-error}" >> $GITHUB_OUTPUT
|
|
135
122
|
fi
|
|
136
123
|
|
|
137
124
|
- name: Report final status
|