File tree Expand file tree Collapse file tree 3 files changed +122
-1
lines changed
Expand file tree Collapse file tree 3 files changed +122
-1
lines changed Original file line number Diff line number Diff line change 1818 java-version : ' 17'
1919 distribution : ' corretto'
2020 cache : maven
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Build Docker Image
26+ uses : docker/build-push-action@v5
27+ with :
28+ context : .
29+ load : true
30+ tags : regmxflib-ci-env:latest
31+ cache-from : type=gha
32+ cache-to : type=gha,mode=max
33+
2134 - name : Test Java
22- run : mvn test
35+ run : mvn test
36+
37+ - name : Run Build and Test
38+ run : |
39+ docker run --rm \
40+ -v ${{ github.workspace }}:/workspace \
41+ -w /tmp \
42+ regmxflib-ci-env:latest \
43+ bash /workspace/library/src/test/sh/compat.sh
Original file line number Diff line number Diff line change 1+ FROM ubuntu:22.04
2+
3+ # Prevent interactive prompts during package installation
4+ ENV DEBIAN_FRONTEND=noninteractive
5+
6+ # Install development tools, dependencies for asdcplib, and ffmpeg
7+ RUN apt-get update && apt-get install -y \
8+ build-essential \
9+ cmake \
10+ git \
11+ ffmpeg \
12+ wget \
13+ libssl-dev \
14+ libxerces-c-dev \
15+ uuid-dev \
16+ libexpat1-dev \
17+ liburiparser-dev \
18+ pkg-config \
19+ && rm -rf /var/lib/apt/lists/*
20+
21+ WORKDIR /tmp
22+
23+ # Clone, build, and install asdcplib
24+ RUN git clone https://github.com/cinecert/asdcplib.git \
25+ && cd asdcplib \
26+ && mkdir build \
27+ && cd build \
28+ && cmake -DCMAKE_BUILD_TYPE=Release .. \
29+ && make \
30+ && make install \
31+ && ldconfig \
32+ && cd /tmp && rm -rf asdcplib
33+
34+ # Clone, build, and install bmx
35+ RUN git clone https://github.com/ebu/bmx.git \
36+ && cd bmx \
37+ && mkdir build \
38+ && cd build \
39+ && cmake -DCMAKE_BUILD_TYPE=Release .. \
40+ && make \
41+ && make install \
42+ && ldconfig \
43+ && cd /tmp && rm -rf bmx
44+
45+ # Reset working directory
46+ WORKDIR /root
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ run_test () {
5+ local test_name=$1
6+ local file_path=$2
7+
8+ echo " Function: ${test_name} , File: ${file_path} "
9+
10+ case ${test_name} in
11+ " as-02-unwrap" )
12+ as-02-unwrap " ${file_path} " > /dev/null
13+ ;;
14+ " ffmpeg" )
15+ ffmpeg -loglevel error -i " ${file_path} " -c copy -f null - > /dev/null
16+ ;;
17+ " mxf2raw" )
18+ mxf2raw --log-level 2 " ${file_path} " > /dev/null
19+ ;;
20+ * )
21+ echo " Unknown test: ${test_name} " >&2
22+ return 1
23+ ;;
24+ esac
25+ }
26+
27+ # Define files to test along with the format:
28+ # "/path/to/file|exclusion1,exclusion2,..."
29+ FILES_TO_TEST=(
30+ " /workspace/library/target/test-output/testVBE.mxf"
31+ " /workspace/library/target/test-output/testCBE.mxf"
32+ " /workspace/library/target/test-output/testClipVBE.mxf|ffmpeg,mxf2raw"
33+ " /workspace/library/target/test-output/testPHDR.mxf"
34+ )
35+
36+ for item in " ${FILES_TO_TEST[@]} " ; do
37+ file=" ${item%% |* } "
38+ exclusions=" "
39+ if [[ " $item " == * " |" * ]]; then
40+ exclusions=" ${item#* |} "
41+ fi
42+
43+ if [[ " $exclusions " != * " as-02" * ]]; then
44+ run_test " as-02-unwrap" " ${file} "
45+ fi
46+
47+ if [[ " $exclusions " != * " ffmpeg" * ]]; then
48+ run_test " ffmpeg" " ${file} "
49+ fi
50+
51+ if [[ " $exclusions " != * " mxf2raw" * ]]; then
52+ run_test " mxf2raw" " ${file} "
53+ fi
54+ done
You can’t perform that action at this time.
0 commit comments