diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8e1d328..a7347f1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Deps - run: bash ./scripts/deps.sh + run: bash ./scripts/deps_ci.sh - name: Build vidformer docs run: cargo doc --no-deps -p vidformer - name: Install mdbook diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e9deb67..c1a45b0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Deps - run: bash ./scripts/deps.sh + run: bash ./scripts/deps_ci.sh - name: Check Build run: cargo check - name: Publish @@ -78,7 +78,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Deps - run: bash ./scripts/deps.sh + run: bash ./scripts/deps_ci.sh - name: Build release run: cargo build --release && cp ./target/release/vidformer-cli ./vidformer-cli-ubuntu22.04-amd64 - name: Upload release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dcca90..337de37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Deps - run: bash ./scripts/deps.sh + run: bash ./scripts/deps_ci.sh - name: Download Test Video run: curl -O https://f.dominik.win/data/dve2/tos_720p.mp4 - name: Build Debug diff --git a/scripts/deps.sh b/scripts/deps.sh deleted file mode 100644 index ff09986..0000000 --- a/scripts/deps.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -set -e - -sudo apt update -sudo apt-get -y install \ - autoconf \ - automake \ - build-essential \ - cmake \ - git-core \ - libass-dev \ - libfreetype6-dev \ - libgnutls28-dev \ - libmp3lame-dev \ - libsdl2-dev \ - libtool \ - libva-dev \ - libvdpau-dev \ - libvorbis-dev \ - libxcb1-dev \ - libxcb-shm0-dev \ - libxcb-xfixes0-dev \ - meson \ - ninja-build \ - pkg-config \ - texinfo \ - wget \ - yasm \ - zlib1g-dev \ - libvpx-dev \ - libopus-dev \ - libx264-dev \ - libfdk-aac-dev \ - libclang-dev \ - valgrind \ - clang \ - libopencv-dev - -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y - -rm -rf ffmpeg -curl https://ffmpeg.org/releases/ffmpeg-7.0.tar.xz | tar xJ -mv ffmpeg-7.0 ffmpeg -pushd ffmpeg -mkdir build -./configure --prefix=${PWD}/build --pkg-config-flags="--static" --enable-debug --extra-cflags="-g" --enable-nonfree --enable-gpl --enable-libx264 --enable-libvpx --enable-libfdk-aac --disable-stripping --disable-decoder=exr,phm -make -j$(nproc) -make install -popd - -pip3 install --upgrade pip # There's some bug that causes installing vidformer-py to fail in CI without this -pip3 install pytest -pip3 install -r snake-pit/requirements.txt diff --git a/scripts/deps_apt_ci.sh b/scripts/deps_apt_ci.sh new file mode 100755 index 0000000..bb854d1 --- /dev/null +++ b/scripts/deps_apt_ci.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -e + +sudo apt update +sudo apt-get -y install \ + autoconf \ + automake \ + build-essential \ + cmake \ + git-core \ + libass-dev \ + libfreetype6-dev \ + libgnutls28-dev \ + libmp3lame-dev \ + libsdl2-dev \ + libtool \ + libva-dev \ + libvdpau-dev \ + libvorbis-dev \ + libxcb1-dev \ + libxcb-shm0-dev \ + libxcb-xfixes0-dev \ + meson \ + ninja-build \ + pkg-config \ + texinfo \ + wget \ + yasm \ + zlib1g-dev \ + libvpx-dev \ + libopus-dev \ + libx264-dev \ + libfdk-aac-dev \ + libclang-dev \ + valgrind \ + clang \ + libopencv-dev diff --git a/scripts/deps_ci.sh b/scripts/deps_ci.sh new file mode 100755 index 0000000..a6acb8e --- /dev/null +++ b/scripts/deps_ci.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +bash ./scripts/deps_apt_ci.sh +bash ./scripts/deps_ffmpeg.sh +./scripts/deps_rust.sh +./scripts/deps_python.sh diff --git a/scripts/deps_ffmpeg.sh b/scripts/deps_ffmpeg.sh new file mode 100755 index 0000000..ac916af --- /dev/null +++ b/scripts/deps_ffmpeg.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e + +rm -rf ffmpeg +curl https://ffmpeg.org/releases/ffmpeg-7.0.tar.xz | tar xJ +mv ffmpeg-7.0 ffmpeg +pushd ffmpeg +mkdir build +./configure --prefix=${PWD}/build --pkg-config-flags="--static" --enable-debug --extra-cflags="-g" --enable-nonfree --enable-gpl --enable-libx264 --enable-libvpx --enable-libfdk-aac --disable-stripping --disable-decoder=exr,phm +make -j$(nproc) +make install +popd diff --git a/scripts/deps_python.sh b/scripts/deps_python.sh new file mode 100755 index 0000000..254dbd8 --- /dev/null +++ b/scripts/deps_python.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +pip3 install --upgrade pip # There's some bug that causes installing vidformer-py to fail in CI without this +pip3 install pytest +pip3 install -r snake-pit/requirements.txt diff --git a/scripts/deps_rust.sh b/scripts/deps_rust.sh new file mode 100755 index 0000000..a7c4697 --- /dev/null +++ b/scripts/deps_rust.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y diff --git a/scripts/valgrind_test.sh b/scripts/valgrind_test.sh old mode 100644 new mode 100755