Skip to content

GHA: Add sanity checks #4

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

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 43 additions & 0 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Sanity checks"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-docker-image:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout code'
uses: 'actions/checkout@v4'
- name: 'Build Docker image'
run: |
set -euxo pipefail
# Use a fake debian package for media SDK
docker build --tag ubuntu:insta360 --build-arg="MEDIASDK_UBUNTU_DEB=hello_2.10-3_amd64.deb" .
- name: 'Run Docker container'
run: |
set -euxo pipefail
# Run the container with a volume mount, executing the fake debian package
docker run -v "$(pwd)/datadir":/root ubuntu:insta360 'hello'

shellcheck:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout code'
uses: 'actions/checkout@v4'
- name: 'Install shellcheck'
run: |
set -euxo pipefail
sudo apt-get install shellcheck
- name: 'Run shellcheck'
run: |
set -euxo pipefail
cd ${{ github.workspace }}/
for f in $(find scripts/ -type f); do
if file "$f" | grep "shell script" &>/dev/null; then
shellcheck "$f"
fi
done
Binary file added hello_2.10-3_amd64.deb
Binary file not shown.
7 changes: 4 additions & 3 deletions scripts/join-insv
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ join_insv() {
local outfile="$2"
shift 2

local tmpfile="${outfile}.tmp"
local tmpfile="_tmp.${outfile}"
local file_list
file_list="$(mktemp)"
file_list="_list.txt"

rm -rf "${file_list}" "${tmpfile}"
if ${is_57k}; then
echo "Not implemented"
exit 0
else
for v in "$@"; do
MediaSDKTest -inputs "$v" -output "${v}.mp4" \
-enable_directionlock -enable_flowstate -enable_denoise
echo "file ${v}.mp4" >> list.txt
echo "file ${v}.mp4" >> "${file_list}"
done
fi

Expand Down