Skip to content

Commit

Permalink
m64382 contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
DenizUgur committed Aug 5, 2023
1 parent 768c267 commit 44f9288
Show file tree
Hide file tree
Showing 770 changed files with 132,250 additions and 89,092 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data/file_features/**/* filter=lfs diff=lfs merge=lfs -text
data/file_features/**/*.json !filter !diff !merge text
data/file_features/**/*.md !filter !diff !merge text
data/file_features/.cfignore !filter !diff !merge text
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/conformance-file-bug.md

This file was deleted.

52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/conformance-file-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 🔥 Conformance File Bug
description: Use this template if something is wrong with conformance files
title: "[Conformance] "
labels: ["conformance-file"]
body:
- type: markdown
attributes:
value: |
Thank you for reporting a bug in the conformance files.
Please fill out the following template to help us reproduce the issue.
- type: textarea
id: summary
attributes:
label: Summary
description: Provide a description of the problem. What is wrong in the files?
placeholder: "File `foo.mp4` has a wrong value for `bar`"
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: What steps do we need to follow to see the problem with our own eyes?
placeholder: |
1. Download file `foo.mp4`
2. ...
validations:
required: true

- type: textarea
id: affected-specifications
attributes:
label: Affected specifications
description: Provide a list of specs which are relevant for this issue.
placeholder: |
- ISO/IEC 14496-12
- ISO/IEC 14496-15
validations:
required: true

- type: textarea
id: affected-files
attributes:
label: Affected files
description: Provide the files like this.
placeholder: |
- [file1.mp4](./data/file_features/published/isobmff/file1.mp4)
- [file2.mp4](./data/file_features/published/isobmff/file2.mp4)
validations:
required: true
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/page-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🌎 Website Bug
description: Use this template if something is wrong with the website. This may include visual bugs, typos, broken links, etc.
title: "[Website] "
labels: ["website"]
body:
- type: markdown
attributes:
value: |
Thank you for reporting a bug in the website.
Please fill out the following template to help us reproduce the issue.
If you can attach a video or screenshot, that would be great!
- type: textarea
id: summary
attributes:
label: Summary
description: Provide a description of the problem. What is wrong on the website?
placeholder: "The search bar is not working"
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: What steps do we need to follow to see the problem with our own eyes?
placeholder: |
1. Open the website
2. Click on the link to the specification
validations:
required: true
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/conformance-search"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/src"
schedule:
interval: "weekly"
23 changes: 23 additions & 0 deletions .github/problem-matchers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"problemMatcher": [
{
"owner": "pytest",
"pattern": [
{
"regexp": "^(FAILURE):\\s(.+)$",
"message": 2
}
]
},
{
"owner": "loguru",
"pattern": [
{
"regexp": "(ERROR|WARNING).*\\|.+(?:\\[3[13]m.\\[1m)(?:(.*).\\[0m)$",
"severity": 1,
"message": 2
}
]
}
]
}
105 changes: 105 additions & 0 deletions .github/workflows/cfc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Conformance File Contribution

on:
workflow_call:

jobs:
create-ff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Node
uses: actions/setup-node@v3

- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"

- name: Install dependencies
working-directory: ./src
run: |
poetry env use "3.11"
poetry install --no-interaction
- name: Restore GPAC Cache
uses: actions/cache/restore@v3
with:
path: /tmp/gpac
key: ${{ runner.os }}-gpac-
restore-keys: ${{ runner.os }}-gpac-

- name: Setup MP4Box
run: |
mkdir -p $HOME/.gpac
mkdir -p $HOME/.local/bin
touch $HOME/.gpac/creds.key
cp -r /tmp/gpac/ $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Configure GitHub handle
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create LFS file list
id: lfs-id
run: |
echo "lfs-id=$(git lfs ls-files --long | cut -d ' ' -f1 | sort \
| sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT
- name: LFS Cache
uses: actions/cache@v3
with:
path: .git/lfs/objects
key: ${{ runner.os }}-lfs-${{ steps.lfs-id.outputs.lfs-id }}
restore-keys: ${{ runner.os }}-lfs-

- name: Git LFS Pull
run: git lfs pull

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37

- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- name: Install Prettier
run: npm install -g prettier

- name: Create File Features
working-directory: ./src
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *.json ]]; then
continue
fi
if [[ $file == *"data/file_features/under_consideration/"* ]]; then
echo "Creating file features for $file"
poetry run extract-file-features -m -i ../$file
dir=$(realpath $(dirname ../$file))
prettier --parser json $dir/*.json --write
fi
done
- name: Commit File Features
run: |
git add data/file_features/under_consideration
if ! git diff-index --quiet HEAD --; then
git commit -m "Add file features for ${{ github.event.pull_request.head.ref }}"
fi
- name: Push changes
run: git push origin HEAD:${{ github.event.pull_request.head.ref }}
36 changes: 36 additions & 0 deletions .github/workflows/gpac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build MP4Box

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
gpac:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: gpac/gpac

- name: Get latest commit
id: get-latest-commit
run: |
echo "latest-commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: GPAC Cache
id: gpac-cache
uses: actions/cache@v3
with:
path: /tmp/gpac
key: ${{ runner.os }}-gpac-${{ steps.get-latest-commit.outputs.latest-commit }}

- name: GPAC Build
if: steps.gpac-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y build-essential pkg-config git zlib1g-dev
./configure --static-bin
make -j$(nproc)
mkdir -p /tmp/gpac
cp -r bin/gcc/ /tmp/gpac
64 changes: 64 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Pull Request Checks

on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
outputs:
is-cfc: ${{ steps.check-cfc.outputs.is_cfc }}
is-page: ${{ steps.check-page.outputs.is_page }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37

- name: Check for new under consideration files
id: check-cfc
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *"data/file_features/under_consideration/"* ]]; then
echo "is_cfc=true" >> $GITHUB_OUTPUT
break
fi
done
- name: Check for changes to the page
id: check-page
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *"conformance-search/"* ]]; then
echo "is_page=true" >> $GITHUB_OUTPUT
break
fi
done
cfc:
needs: changes
if: |
contains(github.event.pull_request.labels.*.name, 'conformance-file') &&
needs.changes.outputs.is-cfc == 'true'
uses: ./.github/workflows/cfc.yml

test:
needs: [changes, cfc]
if: |
always() &&
(needs.cfc.result == 'success' || needs.cfc.result == 'skipped')
uses: ./.github/workflows/test.yml
with:
test-page: ${{ needs.changes.outputs.is-page == 'true' }}
Loading

0 comments on commit 44f9288

Please sign in to comment.