forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from NoriginMedia/dmitriy/upgrading-shaka-3.2.10
[SDK-216] upgrading shaka to 3.2.10
- Loading branch information
Showing
460 changed files
with
18,769 additions
and
7,718 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
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
This file was deleted.
Oops, something went wrong.
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,129 @@ | ||
name: Build and Test PR | ||
|
||
on: | ||
pull_request: # Trigger for pull requests. | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- main | ||
- v[0-9]* | ||
workflow_dispatch: # Allows for manual triggering. | ||
inputs: | ||
ref: | ||
description: "The ref to build and test." | ||
required: false | ||
|
||
# If another instance of this workflow is started for the same PR, cancel the | ||
# old one. If a PR is updated and a new test run is started, the old test run | ||
# will be cancelled automatically to conserve resources. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.inputs.ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.ref || github.ref }} | ||
|
||
- name: Lint | ||
run: python build/check.py | ||
|
||
build_and_test: | ||
# Don't waste time doing a full matrix of test runs when there was an | ||
# obvious linter error. | ||
needs: lint | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
browser: ["Chrome", "Firefox", "Edge", "Safari", "Safari-14"] | ||
exclude: | ||
- os: ubuntu-latest | ||
browser: Edge | ||
- os: windows-latest | ||
browser: Safari | ||
- os: windows-latest | ||
browser: Safari-14 | ||
- os: ubuntu-latest | ||
browser: Safari | ||
- os: ubuntu-latest | ||
browser: Safari-14 | ||
include: | ||
# Run Linux browsers with xvfb, so they're in a headless X session. | ||
- os: ubuntu-latest | ||
extra_flags: "--use-xvfb" | ||
# Disable fail-fast so that one matrix-job failing doesn't make the other | ||
# ones end early. | ||
fail-fast: false | ||
|
||
name: ${{ matrix.os }} ${{ matrix.browser }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
# Firefox on Ubuntu appears to not have the right things installed in | ||
# the environment used by GitHub actions, so make sure that ffmpeg is | ||
# installed. Otherwise, the browser might not support some codecs that the | ||
# tests assume will be supported. | ||
- name: Install FFmpeg | ||
if: matrix.os == 'ubuntu-latest' && matrix.browser == 'Firefox' | ||
run: sudo apt -y update && sudo apt -y install ffmpeg | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.ref || github.ref }} | ||
|
||
# Safari 14 can be installed, but not to the root, and it can't replace | ||
# the standard version, at least not on GitHub's VMs. If you try to | ||
# install directly to the root with sudo, it will appear to succeed, but | ||
# will have no effect. If you try to script it explicitly with rm -rf | ||
# and cp, this will fail. Safari may be on a read-only filesystem. | ||
- name: Install Safari 14 to home directory | ||
if: matrix.os == 'macos-latest' && matrix.browser == 'Safari-14' | ||
run: | | ||
# Download Safari 14 | ||
# See also https://www.macupdate.com/app/mac/15675/apple-safari/old-versions | ||
curl -Lv https://www.macupdate.com/action/download/63550 > safari-14.1.2.pkg | ||
# Install Safari 14 to homedir specifically. | ||
installer -pkg safari-14.1.2.pkg -target CurrentUserHomeDirectory | ||
# Install a launcher that can execute a shell script to launch this | ||
npm install karma-script-launcher --save-dev | ||
- name: Build Player | ||
run: python build/all.py | ||
|
||
- name: Test Player | ||
shell: bash | ||
run: | | ||
browser=${{ matrix.browser }} | ||
if [[ "$browser" == "Safari-14" ]]; then | ||
# Replace the browser name with a script that can launch this | ||
# browser from the command line. | ||
browser="$PWD/.github/workflows/safari-homedir-launcher.sh" | ||
fi | ||
python build/test.py \ | ||
--browsers "$browser" \ | ||
--reporters spec --spec-hide-passed \ | ||
${{ matrix.extra_flags }} | ||
build_in_docker: | ||
# Don't waste time doing a full matrix of test runs when there was an | ||
# obvious linter error. | ||
needs: lint | ||
name: Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.ref || github.ref }} | ||
|
||
- name: Docker | ||
run: docker-compose -f build/docker/docker-compose.yml up |
56 changes: 56 additions & 0 deletions
56
.github/workflows/custom-actions/prep-for-appspot/action.yaml
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,56 @@ | ||
name: Prep Appspot Deployment | ||
|
||
description: | | ||
A reusable action that prepares the sources to deploy the Shaka Player Demo | ||
to appspot. Assumes that the source is already checked out. | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
|
||
- name: Build Shaka Player | ||
shell: bash | ||
run: python build/all.py | ||
|
||
- name: Extract git version | ||
shell: bash | ||
run: | | ||
( | ||
cd build | ||
python3 -c 'from shakaBuildHelpers import git_version; print(git_version())' | ||
) > demo-version | ||
- name: Tag the Player version | ||
shell: bash | ||
run: | | ||
DEMO_VERSION="$(cat demo-version)-uncompiled" | ||
sed \ | ||
-i lib/player.js \ | ||
-e "s/\(shaka.Player.version\) = .*/\1 = '$DEMO_VERSION';/" | ||
rm demo-version | ||
- name: Backup demo node modules | ||
shell: bash | ||
run: | | ||
DEMO_NODE_MODULES=$(jq -r .shakaCustom.demoDeps[] package.json) | ||
tar cf demo-modules.tar \ | ||
$(echo "$DEMO_NODE_MODULES" | sed -e 's@^@node_modules/@') | ||
- name: Delete unneeded files | ||
shell: bash | ||
run: rm -rf .git .github build externs test node_modules | ||
|
||
- name: Restore demo node modules | ||
shell: bash | ||
run: | | ||
tar xf demo-modules.tar | ||
rm demo-modules.tar | ||
- name: Install App Engine code | ||
shell: bash | ||
run: | | ||
mv app-engine/shaka-player-demo/* . | ||
rm README.md |
41 changes: 41 additions & 0 deletions
41
.github/workflows/custom-actions/set-commit-status/action.yaml
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,41 @@ | ||
name: Set Commit Status | ||
|
||
description: | | ||
A reusable action that sets the commit status. This is used to set PR status | ||
from workflows with non-PR triggers (such as manually-triggered workflows). | ||
inputs: | ||
context: | ||
description: An arbitrary string to identify the status check. | ||
required: true | ||
state: | ||
description: Either "pending", "error", "success", or "failure". | ||
required: true | ||
ref: | ||
description: A git ref for which to set the commit status. For PRs, use the head commit, not the merge commit. Defaults to HEAD. | ||
required: false | ||
default: HEAD | ||
token: | ||
description: A GitHub access token. | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Report Commit Status | ||
shell: bash | ||
run: | | ||
# This is the URL to view this workflow run on GitHub. It will be | ||
# attached to the commit status, so that when someone clicks "details" | ||
# next to the status on the PR, it will link to this run where they can | ||
# see the logs. | ||
RUN_URL="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" | ||
SHA1=$(git rev-parse "${{ inputs.ref }}") | ||
GITHUB_TOKEN=${{ inputs.token }} \ | ||
gh api \ | ||
-X POST \ | ||
-F "context=${{ inputs.context }}" \ | ||
-F "state=${{ inputs.state }}" \ | ||
-F "target_url=$RUN_URL" \ | ||
"repos/${{ github.repository }}/statuses/$SHA1" |
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,29 @@ | ||
name: Deploy Demo Version Index | ||
|
||
on: | ||
workflow_dispatch: | ||
# Allows for manual triggering. | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/workflows/demo-version-index.yaml | ||
- app-engine/demo-version-index/** | ||
|
||
jobs: | ||
appspot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: google-github-actions/auth@v0 | ||
with: | ||
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}' | ||
|
||
- uses: google-github-actions/deploy-appengine@v0 | ||
with: | ||
project_id: shaka-player-demo | ||
version: index | ||
working_directory: app-engine/demo-version-index/ | ||
promote: false | ||
|
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,42 @@ | ||
name: Deploy Nightly Demo | ||
|
||
on: | ||
workflow_dispatch: | ||
# Allows for manual triggering. | ||
schedule: | ||
# Run every night at midnight PST / 8am UTC. | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
appspot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
# The nightly demo has its own receiver app ID that points to the nightly | ||
# demo itself for the receiver side. | ||
- name: Override Cast Receiver App ID | ||
run: | | ||
sed \ | ||
-i demo/index.html \ | ||
-e 's/\(data-shaka-player-cast-receiver-id\)="[^"]*"/\1="07AEE832"/' | ||
- uses: ./.github/workflows/custom-actions/prep-for-appspot | ||
|
||
- uses: google-github-actions/auth@v0 | ||
with: | ||
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}' | ||
|
||
- uses: google-github-actions/deploy-appengine@v0 | ||
with: | ||
project_id: shaka-player-demo | ||
version: nightly | ||
promote: false |
Oops, something went wrong.