Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Rewrite build system and third-party dependencies #12

Merged
merged 91 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e6b57f7
feat: First phase of CMake build system implementation (#1072)
joeyparrish Aug 16, 2022
8682081
feat: Remove third-party source in-repo (#1082)
joeyparrish Aug 16, 2022
31e116f
feat: Respect the file mode for HttpFiles (#1081)
joeyparrish Aug 17, 2022
1ff26b4
feat: Move all third-party deps into git submodules (#1083)
joeyparrish Aug 17, 2022
1131bf7
chore: Mass-update copyright headers (#1086)
joeyparrish Aug 26, 2022
84ba4af
feat: Add xHE-AAC support (#1092)
geoffjukes Oct 18, 2022
bbb07b5
ci: Fix docs build in GitHub Actions (#1109)
joeyparrish Oct 21, 2022
9429d26
ci: Parallel build (#1108)
joeyparrish Oct 21, 2022
98e5027
test: Cancel workflow when a PR is updated (#1084)
joeyparrish Oct 21, 2022
2a31f41
ci: Improve test command in build workflow (#1115)
joeyparrish Oct 24, 2022
f45019d
refactor: Rename common.h to macros.h, now that it only contains macr…
joeyparrish Oct 25, 2022
7ed49d4
feat: port media/public/ (#1117)
joeyparrish Oct 25, 2022
6499387
fix: Fix status library headers and move test (#1118)
joeyparrish Oct 25, 2022
31ad9a2
ci: Fix repo settings for self-hosted runners and debugging (#1110)
joeyparrish Oct 25, 2022
a9a4f0d
feat: port media/test (#1116)
joeyparrish Oct 25, 2022
18cc627
ci: Fix build workflow in arm64 self-hosted (#1111)
joeyparrish Oct 25, 2022
c3a4951
feat: Add CMake module for building protobufs (#1112)
joeyparrish Oct 26, 2022
7b33f20
feat: Port AES and RSA crypto to mbedtls (#1119)
joeyparrish Nov 2, 2022
dccefb1
ci: Use multiple cores in docker tests (#1128)
joeyparrish Nov 3, 2022
afd5fec
feat: Replace arraysize with std::size (#1129)
joeyparrish Nov 3, 2022
0ee4af4
Merge branch 'main' into cmake
joeyparrish Nov 3, 2022
b299aa2
ci: Disable parallel builds (#1133)
joeyparrish Nov 4, 2022
44afbfc
fix: Fix protoc linking on macOS w/ update to fork (#1132)
joeyparrish Nov 4, 2022
b1095f6
feat: port media/base (#1127)
joeyparrish Nov 4, 2022
5d52d5e
feat: CMake port media/origin (#1145)
zdanek Nov 30, 2022
14a708d
feat: CMake port media/replicator (#1144)
zdanek Nov 30, 2022
5f43570
feat: Cmake port mpd/media_info_proto (#1152)
zdanek Dec 15, 2022
41a5096
fix: Fix Linux build failures (#1157)
joeyparrish Dec 15, 2022
e9bf0c6
feat: port media/codecs to CMake (#1143)
cadubentzen Dec 16, 2022
56d3304
feat: port media/formats/webm to CMake (#1147)
cadubentzen Dec 17, 2022
84b0292
fix: Fix build errors since infra upgrades (#1199)
joeyparrish Apr 21, 2023
a4c357b
fix: Fix type error in pssh-box.py with Python 3.10+ (#1187)
Brainiarc7 May 1, 2023
6c1d4f3
Merge remote-tracking branch 'upstream/main' into cmake
joeyparrish May 1, 2023
901013c
feat: CMake port media/trick_play (#1146)
zdanek May 1, 2023
2e34984
test: Retry HTTP file tests on temporary httpbin failure (#1203)
joeyparrish May 1, 2023
bf6296c
test: Fix OpenSUSE docker build (#1204)
joeyparrish May 2, 2023
ee0922e
feat: port media/chunking to CMake (#1223)
cadubentzen Jul 5, 2023
98490ed
Merge remote-tracking branch 'upstream/main' into cmake
joeyparrish Jul 6, 2023
3a551f4
test: Revert "Retry HTTP file tests on temporary httpbin failure" (#1…
joeyparrish Jul 13, 2023
8d3b2c6
feat: port media/event to CMake (#1222)
cosmin Jul 13, 2023
d4fcfb2
test: Add Mongoose embedded HTTP server (#1231)
joeyparrish Jul 13, 2023
af98d48
fix: Fix flush/close semantics for HTTP files, improve testing (#1232)
joeyparrish Jul 14, 2023
86bf6cf
feat: Cmake port of Media crypto (#1221)
cosmin Jul 14, 2023
8bf2d45
fix: Fix compilation on Arch Linux (#1233)
joeyparrish Jul 14, 2023
4b868de
chore: Revert to upstream mongoose (#1235)
joeyparrish Jul 16, 2023
53982db
chore: Split out CMake policies into package/policies.cmake (#1236)
joeyparrish Jul 17, 2023
899f763
test: Fix data directory computation (#1239)
joeyparrish Jul 17, 2023
362d98a
test: Move CentOS 8 tests to CentOS 9 Stream (#1240)
joeyparrish Jul 17, 2023
052fb64
ci: Enable parallel builds (#1241)
joeyparrish Jul 17, 2023
60fb057
test: Avoid crashing a test executable (#1242)
joeyparrish Jul 17, 2023
868a8c5
ci: Collect and report test results (#1244)
joeyparrish Jul 17, 2023
9962075
ci: Fix workflow warnings (#1243)
joeyparrish Jul 17, 2023
137e692
fix: Fix libpng include directories (#1245)
joeyparrish Jul 18, 2023
c29c03c
test: Fix bad assertions in formats/mp4 and formats/mp2t tests (#1247)
joeyparrish Jul 18, 2023
5a2571b
fix: Fix local files with UTF8 names (#1246)
joeyparrish Jul 18, 2023
86a183a
test: Use a random HTTP port for web server tests (#1248)
joeyparrish Jul 18, 2023
4515a98
Merge branch 'main' into cmake
joeyparrish Jul 18, 2023
ba51270
feat: Port app/job_manager to cmake and absl (#1249)
joeyparrish Jul 21, 2023
cf8deae
ci: Add PR write permission to update-issues job
joeyparrish Jul 24, 2023
97cf7c0
Merge branch 'main' into cmake
cosmin Aug 2, 2023
96acd1e
feat: convert mpd module to cmake (#1234)
cosmin Aug 5, 2023
793518c
Merge branch 'main' into cmake
cosmin Aug 5, 2023
c465311
fix: docs build (#1257)
cosmin Aug 21, 2023
682ac3c
Merge branch 'main' into cmake
cosmin Aug 22, 2023
ab8485c
feat: port HLS module to CMake (#1238)
cosmin Aug 22, 2023
3afe761
feat: port media/formats/* to cmake (#1258)
cosmin Aug 31, 2023
274c885
Merge branch 'main' into cmake
cosmin Sep 3, 2023
6b68c13
feat: port demuxer and app to cmake (#1260)
cosmin Sep 9, 2023
5557e76
Merge remote-tracking branch 'upstream/main' into cmake
joeyparrish Sep 13, 2023
8b87804
fix: apply cmake fixes after merge of #1210 (#1264)
cosmin Sep 19, 2023
72117f8
feat: add verbose logging flags for CMake branch (#1266)
cosmin Oct 9, 2023
1337e86
style: cleanup unused includes and use consistent <> for external cod…
cosmin Oct 9, 2023
4e310f0
style: Use angle-brackets for all internal headers (#1271)
joeyparrish Oct 10, 2023
3b3e267
style: Sort headers to comply with the style guide (#1273)
joeyparrish Oct 11, 2023
7653e1e
feat: Replace glog with absl::log (#1274)
joeyparrish Oct 13, 2023
0295ef1
chore: Refactor public headers and macros (#1275)
joeyparrish Oct 14, 2023
b224fb6
feat: add install target for cmake (#1269)
cosmin Oct 16, 2023
4cedb7c
docs: update docs for CMake (#1270)
cosmin Oct 17, 2023
53eb7b1
build: Fix rebuild of link-test targets (#1278)
joeyparrish Oct 17, 2023
32723f8
build: Fix pssh-box.py targets, installation, and docs (#1279)
joeyparrish Oct 17, 2023
985abb2
fix: Fix internal libraries built as dynamic by default (#1283)
joeyparrish Oct 18, 2023
e516608
feat: copy packager_test.py in CMake (#1284)
cosmin Oct 18, 2023
fac8acf
feat: Build c-ares locally (#1285)
joeyparrish Oct 18, 2023
9294dc7
fix: Use stable GitHub mirror for libxml2 source (#1286)
joeyparrish Oct 18, 2023
1e9b251
fix: Fix UdpFile build on FreeBSD (#1287)
joeyparrish Oct 18, 2023
bcc2754
fix: Fix clang build (#1288)
joeyparrish Oct 18, 2023
168e74c
fix: Fix dependency on system zlib (#1291)
joeyparrish Oct 19, 2023
562473c
build: Use the standard BUILD_SHARED_LIBS variable (#1292)
joeyparrish Oct 19, 2023
9d43b30
build: Separate shared and static library targets
joeyparrish Oct 18, 2023
f548107
ci: Collect artifacts from build workflow
joeyparrish Oct 17, 2023
9f2fa44
ci: Rewrite release workflows
joeyparrish Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
96 changes: 64 additions & 32 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,62 @@
# GitHub Actions CI

## Actions
- `custom-actions/lint-packager`:
Lints Shaka Packager. You must pass `fetch-depth: 2` to `actions/checkout`
in order to provide enough history for the linter to tell which files have
changed.
- `custom-actions/build-packager`:
Builds Shaka Packager. Leaves build artifacts in the "artifacts" folder.
Requires OS-dependent and build-dependent inputs.
- `custom-actions/test-packager`:
Tests Shaka Packager. Requires OS-dependent and build-dependent inputs.
- `custom-actions/build-docs`:
Builds Shaka Packager docs.

## Workflows
- On PR:
- `build_and_test.yaml`:
Builds and tests all combinations of OS & build settings. Also builds
docs.
- On release tag:
- `github_release.yaml`:
Creates a draft release on GitHub, builds and tests all combinations of OS
& build settings, builds docs on all OSes, attaches static release binaries
to the draft release, then fully publishes the release.
- On release published:
- `docker_hub_release.yaml`:
Builds a Docker image to match the published GitHub release, then pushes it
to Docker Hub.
- `npm_release.yaml`:
Builds an NPM package to match the published GitHub release, then pushes it
to NPM.
- `update_docs.yaml`:
Builds updated docs and pushes them to the gh-pages branch.
## Reusable workflows
- `build.yaml`:
Build and test all combinations of OS & build settings. Also builds docs on
Linux.

- `build-docs.yaml`:
Build Packager docs. Runs only on Linux.

- `build-docker.yaml`:
Build the official Docker image.

- `lint.yaml`:
Lint Shaka Packager.

- `publish-docs.yaml`:
Publish Packager docs. Runs on the latest release.

- `publish-docker.yaml`:
Publish the official docker image. Runs on all releases.

- `publish-npm.yaml`:
Publish binaries to NPM. Runs on all releases.

- `test-linux-distros.yaml`:
Test the build on all Linux distros via docker.

## Composed workflows
- On PR (`pr.yaml`), invoke:
- `lint.yaml`
- `build.yaml`
- `build-docs.yaml`
- `build-docker.yaml`
- `test-linux-distros.yaml`

## Release workflow
- `release-please.yaml`
- Updates changelogs, version numbers based on conventional commits syntax
and semantic versioning
- https://conventionalcommits.org/
- https://semver.org/
- Generates/updates a PR on each push
- When the PR is merged, runs additional steps:
- Creates a GitHub release
- Invokes `publish-docs.yaml` to publish the docs
- Invokes `publish-docker.yaml` to publish the docker image
- Invokes `build.yaml`
- Attaches the binaries from `build.yaml` to the GitHub release
- Invokes `publish-npm.yaml` to publish the binaries to NPM

## Common workflows from shaka-project
- `sync-labels.yaml`
- `update-issues.yaml`
- `validate-pr-title.yaml`

## Required Repo Secrets
- `RELEASE_PLEASE_TOKEN`: A PAT for `shaka-bot` to run the `release-please`
action
- `DOCKERHUB_CI_USERNAME`: The username of the Docker Hub CI account
- `DOCKERHUB_CI_TOKEN`: An access token for Docker Hub
- To generate, visit https://hub.docker.com/settings/security
Expand All @@ -47,3 +70,12 @@
- `NPM_PACKAGE_NAME`: Not a true "secret", but stored here to avoid someone
pushing bogus packages to NPM during CI testing from a fork
- In a fork, set to a private name which differs from the production one

## Repo Settings

Each of these workflow features can be enabled by creating a "GitHub
Environment" with the same name in your repo settings. Forks will not have
these enabled by default.

- `debug`: enable debugging via SSH after a failure
- `self_hosted`: enable self-hosted runners in the build matrix
37 changes: 37 additions & 0 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2022 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

# A workflow to build the official docker image.
name: Official Docker image

# Runs when called from another workflow.
on:
workflow_call:
inputs:
ref:
required: true
type: string

# By default, run all commands in a bash shell. On Windows, the default would
# otherwise be powershell.
defaults:
run:
shell: bash

jobs:
official_docker_image:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
submodules: recursive

- name: Build
shell: bash
run: docker buildx build .
73 changes: 73 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 2022 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

# A reusable workflow to build Packager docs. Leaves docs output in the
# "gh-pages" folder. Only runs in Linux due to the dependency on doxygen,
# which we install with apt.
name: Build Docs

# Runs when called from another workflow.
on:
workflow_call:
inputs:
ref:
required: true
type: string

# If true, start a debug SSH server on failures.
debug:
required: false
type: boolean
default: false

jobs:
docs:
name: Build docs
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt install -y doxygen
python3 -m pip install \
sphinx==7.1.2 \
sphinxcontrib.plantuml \
recommonmark \
cloud_sptheme \
breathe

- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}

- name: Generate docs
run: |
mkdir -p gh-pages
mkdir -p build

# Doxygen must run before Sphinx. Sphinx will refer to
# Doxygen-generated output when it builds its own docs.
doxygen docs/Doxyfile

# Now build the Sphinx-based docs.
make -C docs/ html

# Now move the generated outputs.
cp -a build/sphinx/html gh-pages/html
cp -a build/doxygen/html gh-pages/docs
cp docs/index.html gh-pages/index.html

- name: Upload docs artifacts
uses: actions/upload-pages-artifact@v2
with:
path: gh-pages

- name: Debug
uses: mxschmitt/[email protected]
with:
limit-access-to-actor: true
if: failure() && inputs.debug
38 changes: 38 additions & 0 deletions .github/workflows/build-matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"comment1": "runners hosted by GitHub, always enabled",
"hosted": [
{
"os": "ubuntu-latest",
"os_name": "linux",
"target_arch": "x64",
"exe_ext": "",
"generator": "Ninja"
},
{
"os": "macos-latest",
"os_name": "osx",
"target_arch": "x64",
"exe_ext": "",
"generator": "Ninja"
},
{
"os": "windows-latest",
"os_name": "win",
"target_arch": "x64",
"exe_ext": ".exe",
"generator": ""
}
],

"comment2": "runners hosted by the owner, enabled by the 'self_hosted' environment being created on the repo",
"selfHosted": [
{
"os": "self-hosted-linux-arm64",
"os_name": "linux",
"target_arch": "arm64",
"exe_ext": "",
"generator": "Ninja",
"low_mem": "yes"
}
]
}
Loading
Loading