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 1 commit
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci: Rewrite release workflows
This adopts release-please to manage releases and changelogs, similar
to other shaka-project repos.
  • Loading branch information
joeyparrish committed Oct 20, 2023
commit 9f2fa4431a5bfa0aa61ee9d76a0095b48d1eecda
43 changes: 27 additions & 16 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@
- `build-docs.yaml`:
Build Packager docs. Runs only on Linux.

- `docker-image.yaml`:
- `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.

Expand All @@ -22,30 +31,32 @@
- `lint.yaml`
- `build.yaml`
- `build-docs.yaml`
- `docker-image.yaml`
- `build-docker.yaml`
- `test-linux-distros.yaml`

- On release tag (`github-release.yaml`):
- Create a draft release
- Invoke:
- `lint.yaml`
- `build.yaml`
- `test-linux-distros.yaml`
- Publish the release with binaries from `build.yaml` attached

- On release published:
- `docker-hub-release.yaml`, publishes the official Docker image
- `npm-release.yaml`, publishes the official NPM package
- `update-docs.yaml`:
- Invoke `build-docs.yaml`
- Push the output to the `gh-pages` branch
## 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref || github.ref }}
ref: ${{ github.event.inputs.ref }}
submodules: recursive

- name: Build
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ jobs:
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/action-tmate@v3.6
with:
Expand Down
133 changes: 0 additions & 133 deletions .github/workflows/github-release.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:

# NOTE: Must use base.sha instead of base.ref, since we don't have
# access to the branch name that base.ref would give us.
# NOTE: Must also use fetch-depth: 2 in actions/checkout to have access
# to the base ref for comparison.
# NOTE: Must also use fetch-depth: 2 in actions/checkout to have
# access to the base ref for comparison.
packager/tools/git/check_formatting.py \
--binary /usr/bin/clang-format \
${{ github.event.pull_request.base.sha || 'HEAD^' }}
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/npm-release.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
official_docker_image:
needs: lint
name: Official Docker image
uses: ./.github/workflows/docker-image.yaml
uses: ./.github/workflows/build-docker.yaml
with:
ref: ${{ github.event.inputs.ref || github.ref }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd

name: Docker Hub Release
# A workflow to publish the official docker image.
name: Publish to Docker Hub

# Runs when a new release is published on GitHub.
# Creates a corresponding Docker Hub release and publishes it.
#
# Runs when called from another workflow.
# Can also be run manually for debugging purposes.
on:
release:
types: [published]
workflow_call:
inputs:
tag:
required: true
type: string
latest:
required: true
type: boolean
# For manual debugging:
workflow_dispatch:
inputs:
ref:
description: "The tag to release to Docker Hub."
tag:
description: The tag to build from and to push to.
required: True
latest:
description: If true, push to the "latest" tag.
required: True

jobs:
publish_docker_hub:
name: Publish to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Compute ref
id: ref
# We could be building from a workflow dispatch (manual run), or a
# release event. Subsequent steps can refer to $TARGET_REF to
# determine the correct ref in all cases.
run: |
echo "TARGET_REF=${{ github.event.inputs.ref || github.event.release.tag_name }}" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ env.TARGET_REF }}
ref: ${{ github.event.inputs.tag }}
submodules: recursive

- name: Log in to Docker Hub
Expand All @@ -49,4 +49,11 @@ jobs:
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.DOCKERHUB_PACKAGE_NAME }}:latest,${{ secrets.DOCKERHUB_PACKAGE_NAME }}:${{ env.TARGET_REF }}
tags: ${{ secrets.DOCKERHUB_PACKAGE_NAME }}:${{ github.event.inputs.tag }}

- name: Push to Docker Hub as "latest"
if: ${{ github.event.inputs.latest }}
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.DOCKERHUB_PACKAGE_NAME }}:latest
Loading