-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADDED: Dockerfiles and RAISR build (#20)
* FIX:L Update codeql.yml with proper script * Update codeql-config.yml * Update codeql.yml * FIX: Update codeql.yml with proper script Update codeql.yml with proper script Update codeql-config.yml Update codeql.yml * ADD super-linter: perform super-linter scan workflow using config files: Linter to Dependency-Review.yml Create Hadolint.yaml for Docker Scaning actions Created template for docker-cached-build Create template-docker-cached-build.yaml Create docker-cached-build.yaml Minor changes to ubuntu build Minor update to Flex Ubuntu22 --------- Signed-off-by: Miłosz Linkiewicz <[email protected]>
- Loading branch information
Showing
21 changed files
with
892 additions
and
328 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,9 @@ | |
./license* | ||
./test* | ||
*Dockerfile* | ||
.github/** | ||
.vscode** | ||
./_build/* | ||
./build/* | ||
./docs* | ||
./_install* |
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 |
---|---|---|
@@ -1 +1 @@ | ||
name: "MCM CodeQL Config" | ||
name: "RAISR CodeQL Config" |
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,16 @@ | ||
ignored: | ||
- DL3002 # DL3002 Last user should not be root. | ||
- DL3006 # DL3006 Always tag the version of an image explicitly | ||
- DL3008 # DL3008 Pin versions in apt-get install. | ||
- DL3013 # DL3013 Pin versions in pip. | ||
- DL3016 # DL3016 Pin versions in npm. | ||
- DL3018 # DL3018 Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>. | ||
- DL3028 # DL3028 Pin versions in gem install. Instead of gem install <gem> use gem install <gem>:<version>. | ||
- DL3033 # DL3033 warning: Specify version with `yum install -y <package>-<version>`. | ||
- SC2086 # SC2086 Double quote to prevent globbing and word splitting. | ||
- SC2267 # SC2267 info: GNU xargs -i is deprecated in favor of -I{} | ||
trustedRegistries: | ||
- docker.io | ||
- gcr.io | ||
- ghcr.io | ||
- quay.io |
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 @@ | ||
BasedOnStyle: LLVM |
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,35 @@ | ||
--- | ||
########################### | ||
########################### | ||
## Markdown Linter rules ## | ||
########################### | ||
########################### | ||
|
||
# Linter rules doc: | ||
# - https://github.com/DavidAnson/markdownlint | ||
# | ||
# Note: | ||
# To comment out a single error: | ||
# <!-- markdownlint-disable --> | ||
# any violations you want | ||
# <!-- markdownlint-restore --> | ||
# | ||
|
||
############### | ||
# Rules by id # | ||
############### | ||
MD004: false # Unordered list style | ||
MD007: | ||
indent: 2 # Unordered list indentation | ||
MD013: | ||
line_length: 400 # Line length 80 is far too short | ||
MD026: | ||
punctuation: ".,;:!。,;:" # List of not allowed | ||
MD029: false # Ordered list item prefix | ||
MD033: false # Allow inline HTML | ||
MD036: false # Emphasis used instead of a heading | ||
|
||
################# | ||
# Rules by tags # | ||
################# | ||
blank_lines: false # Error on blank lines |
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,59 @@ | ||
--- | ||
########################################### | ||
# These are the rules used for # | ||
# linting all the yaml files in the stack # | ||
# NOTE: # | ||
# You can disable line with: # | ||
# # yamllint disable-line # | ||
########################################### | ||
rules: | ||
braces: | ||
level: warning | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: 1 | ||
max-spaces-inside-empty: 5 | ||
brackets: | ||
level: warning | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: 1 | ||
max-spaces-inside-empty: 5 | ||
colons: | ||
level: warning | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
commas: | ||
level: warning | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
comments: disable | ||
comments-indentation: disable | ||
document-end: disable | ||
document-start: | ||
level: warning | ||
present: true | ||
empty-lines: | ||
level: warning | ||
max: 2 | ||
max-start: 0 | ||
max-end: 0 | ||
hyphens: | ||
level: warning | ||
max-spaces-after: 1 | ||
indentation: | ||
level: warning | ||
spaces: consistent | ||
indent-sequences: true | ||
check-multi-line-strings: false | ||
key-duplicates: enable | ||
line-length: | ||
level: warning | ||
max: 80 | ||
allow-non-breakable-words: true | ||
allow-non-breakable-inline-mappings: true | ||
new-line-at-end-of-file: disable | ||
new-lines: | ||
type: unix | ||
trailing-spaces: disable |
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,119 @@ | ||
name: build-baremetal-ubuntu | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
env: | ||
TZ: "Europe/Warsaw" | ||
BUILD_TYPE: "Release" | ||
DEBIAN_FRONTEND: "noninteractive" | ||
FFMPEG_COMMIT_ID: "n6.1.1" | ||
BUILD_DIR: "${{ github.workspace }}/build" | ||
PREFIX: "${{ github.workspace }}/_install" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-baremetal-ubuntu: | ||
runs-on: 'ubuntu-22.04' | ||
timeout-minutes: 70 | ||
env: | ||
LD_LIBRARY_PATH: "/opt/intel/oneapi/ipp/latest/lib:${PREFIX}/usr/lib:${PREFIX}/lib:${PREFIX}/lib64:${LD_LIBRARY_PATH}" | ||
steps: | ||
- name: 'Harden Runner' | ||
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: 'Checkout repository' | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: 'Install OS level dependencies' | ||
run: | | ||
set -exo pipefail && \ | ||
mkdir -p "${PREFIX}" "${BUILD_DIR}/ffmpeg" && \ | ||
sudo apt-get update --fix-missing && \ | ||
sudo apt-get full-upgrade -y && \ | ||
sudo apt-get install --no-install-recommends -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
diffutils \ | ||
git \ | ||
gpg \ | ||
libx264-dev \ | ||
libx265-dev \ | ||
nasm \ | ||
ocl-icd-opencl-dev \ | ||
opencl-headers \ | ||
tar \ | ||
unzip \ | ||
wget \ | ||
zlib1g-dev | ||
- name: 'Install Intel OneAPI APT repository' | ||
run: | | ||
set -exo pipefail && \ | ||
curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg && \ | ||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/intel-oneAPI.list && \ | ||
sudo apt-get update --fix-missing && \ | ||
sudo apt-get install --no-install-recommends -y intel-oneapi-ipp-devel-2022.0 | ||
- name: 'Download and patch ffmpeg repository' | ||
run: | | ||
set -eo pipefail && \ | ||
curl -Lf https://github.com/ffmpeg/ffmpeg/archive/${FFMPEG_COMMIT_ID}.tar.gz | tar -zx --strip-components=1 -C "${BUILD_DIR}/ffmpeg" | ||
patch -d "${BUILD_DIR}/ffmpeg" -p1 -i <(cat "${{ github.workspace }}/ffmpeg/"*.patch) | ||
cp "${{ github.workspace }}/ffmpeg/vf_raisr"*.c "${BUILD_DIR}/ffmpeg/libavfilter" | ||
- name: 'Build RAISR from source code' | ||
run: | | ||
./build.sh -DENABLE_RAISR_OPENCL=ON \ | ||
-DCMAKE_LIBRARY_PATH="/opt/intel/oneapi/ipp/latest/lib;${PREFIX}/lib;" \ | ||
-DCMAKE_C_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp" \ | ||
-DCMAKE_CXX_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp" | ||
- name: 'Configure ffmpeg repository' | ||
working-directory: "${BUILD_DIR}/ffmpeg" | ||
continue-on-error: true | ||
run: | | ||
./configure \ | ||
--disable-shared \ | ||
--disable-debug \ | ||
--disable-doc \ | ||
--enable-static \ | ||
--enable-libipp \ | ||
--enable-gpl \ | ||
--enable-libx264 \ | ||
--enable-libx265 \ | ||
--enable-opencl \ | ||
--extra-libs='-lraisr -lstdc++ -lippcore -lippvm -lipps -lippi -lm' \ | ||
--extra-cflags='-fopenmp -I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp' \ | ||
--extra-ldflags="-fopenmp -L/opt/intel/oneapi/ipp/latest/lib -L${PREFIX}/lib" \ | ||
--enable-cross-compile \ | ||
--prefix="${PREFIX}" || \ | ||
{ tail -n 100 "${BUILD_DIR}/ffmpeg/ffbuild/config.log && exit 1 } | ||
- name: 'Build, install and check ffmpeg' | ||
working-directory: "${BUILD_DIR}/ffmpeg" | ||
continue-on-error: true | ||
run: | | ||
make clean | ||
make -j"$(nproc)" | ||
sudo -E make install | ||
sudo -E ldconfig | ||
ffmpeg -buildconf |
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
Oops, something went wrong.