From 5c855bd482b0a4fd5c9c6385c6f339280f8041a3 Mon Sep 17 00:00:00 2001 From: Roberto Cella Date: Sat, 21 Dec 2024 16:59:23 +0100 Subject: [PATCH 1/5] update ffmpeg version checked by bump --- .github/workflows/unit-test.yml | 4 ++-- Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 451c703..78a6704 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -26,8 +26,8 @@ jobs: - name: Setup FFmpeg uses: FedericoCarboni/setup-ffmpeg@v3 with: - # bump: ffmpeg-ci /ffmpeg-version: '([\d.]+)'/ docker:mwader/static-ffmpeg|~7.0 - ffmpeg-version: '7.0.2' + # bump: ffmpeg-ci /ffmpeg-version: '([\d.]+)'/ docker:mwader/static-ffmpeg|~7 + ffmpeg-version: '7.1' - name: Setup Java uses: actions/setup-java@v4 diff --git a/Dockerfile b/Dockerfile index ec01762..96566de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,8 @@ RUN ./gradlew runtime --no-daemon FROM gcr.io/distroless/base-nossl:nonroot AS bot -# bump: ffmpeg /static-ffmpeg:([\d.]+)/ docker:mwader/static-ffmpeg|~7.0 -COPY --from=mwader/static-ffmpeg:7.0.2 /ffmpeg /usr/local/bin/ +# bump: ffmpeg /static-ffmpeg:([\d.]+)/ docker:mwader/static-ffmpeg|~7 +COPY --from=mwader/static-ffmpeg:7.1 /ffmpeg /usr/local/bin/ ENV FFMPEG_PATH=/usr/local/bin/ffmpeg COPY --from=builder /app/build/jre ./jre From 8b90bada88fdd78cbc7ebb8c15308028e036a492 Mon Sep 17 00:00:00 2001 From: Roberto Cella Date: Sat, 21 Dec 2024 17:02:41 +0100 Subject: [PATCH 2/5] amend expected video duration after ffmpeg 7.1 upgrade --- .../stickerifier/stickerify/media/MediaHelperTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java b/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java index 59ef4d1..2f80396 100644 --- a/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java +++ b/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java @@ -188,7 +188,7 @@ void convertShortAndLowFpsVideo() throws Exception { var webmVideo = loadResource("short_low_fps.webm"); var result = MediaHelper.convert(webmVideo); - assertVideoConsistency(result, 512, 288, 10F, 1_000L); + assertVideoConsistency(result, 512, 288, 10F, 900L); } @Test @@ -204,7 +204,7 @@ void convertVerticalWebmVideo() throws Exception { var webmVideo = loadResource("vertical_video_sticker.webm"); var result = MediaHelper.convert(webmVideo); - assertVideoConsistency(result, 288, 512, 30F, 2_000L); + assertVideoConsistency(result, 288, 512, 30F, 1_970L); } @Test @@ -212,7 +212,7 @@ void convertGifVideo() throws Exception { var gifVideo = loadResource("valid.gif"); var result = MediaHelper.convert(gifVideo); - assertVideoConsistency(result, 512, 274, 10F, 1_000L); + assertVideoConsistency(result, 512, 274, 10F, 900L); } @Test @@ -220,7 +220,7 @@ void convertAviVideo() throws Exception { var aviVideo = loadResource("valid.avi"); var result = MediaHelper.convert(aviVideo); - assertVideoConsistency(result, 512, 512, 30F, 3_000L); + assertVideoConsistency(result, 512, 512, 30F, 2_970L); } @Test From 09cc03e6c8e59a4bc0e4ac186a89ec1d3a665ec2 Mon Sep 17 00:00:00 2001 From: Roberto Cella Date: Sun, 22 Dec 2024 17:10:46 +0100 Subject: [PATCH 3/5] change action used to install ffmpeg in github workflow --- .github/workflows/unit-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 78a6704..181ae00 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -24,10 +24,10 @@ jobs: uses: actions/checkout@v4 - name: Setup FFmpeg - uses: FedericoCarboni/setup-ffmpeg@v3 + uses: AnimMouse/setup-ffmpeg@v1 with: # bump: ffmpeg-ci /ffmpeg-version: '([\d.]+)'/ docker:mwader/static-ffmpeg|~7 - ffmpeg-version: '7.1' + version: master - name: Setup Java uses: actions/setup-java@v4 From 1c248321653647fd560aa1de04e6670cf1818948 Mon Sep 17 00:00:00 2001 From: Roberto Cella Date: Sun, 22 Dec 2024 19:14:09 +0100 Subject: [PATCH 4/5] revert expected test durations --- .../stickerifier/stickerify/media/MediaHelperTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java b/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java index 2f80396..59ef4d1 100644 --- a/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java +++ b/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java @@ -188,7 +188,7 @@ void convertShortAndLowFpsVideo() throws Exception { var webmVideo = loadResource("short_low_fps.webm"); var result = MediaHelper.convert(webmVideo); - assertVideoConsistency(result, 512, 288, 10F, 900L); + assertVideoConsistency(result, 512, 288, 10F, 1_000L); } @Test @@ -204,7 +204,7 @@ void convertVerticalWebmVideo() throws Exception { var webmVideo = loadResource("vertical_video_sticker.webm"); var result = MediaHelper.convert(webmVideo); - assertVideoConsistency(result, 288, 512, 30F, 1_970L); + assertVideoConsistency(result, 288, 512, 30F, 2_000L); } @Test @@ -212,7 +212,7 @@ void convertGifVideo() throws Exception { var gifVideo = loadResource("valid.gif"); var result = MediaHelper.convert(gifVideo); - assertVideoConsistency(result, 512, 274, 10F, 900L); + assertVideoConsistency(result, 512, 274, 10F, 1_000L); } @Test @@ -220,7 +220,7 @@ void convertAviVideo() throws Exception { var aviVideo = loadResource("valid.avi"); var result = MediaHelper.convert(aviVideo); - assertVideoConsistency(result, 512, 512, 30F, 2_970L); + assertVideoConsistency(result, 512, 512, 30F, 3_000L); } @Test From 6cc97233f34dbc67b9affec107ff67110f531500 Mon Sep 17 00:00:00 2001 From: Roberto Cella Date: Sun, 22 Dec 2024 19:15:23 +0100 Subject: [PATCH 5/5] remove bump configuration for ffmpeg since its latest version will now be used --- .github/workflows/unit-test.yml | 1 - Bumpfile | 1 - Dockerfile | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 181ae00..4f44bb7 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -26,7 +26,6 @@ jobs: - name: Setup FFmpeg uses: AnimMouse/setup-ffmpeg@v1 with: - # bump: ffmpeg-ci /ffmpeg-version: '([\d.]+)'/ docker:mwader/static-ffmpeg|~7 version: master - name: Setup Java diff --git a/Bumpfile b/Bumpfile index 2e8d2f0..aa31e79 100644 --- a/Bumpfile +++ b/Bumpfile @@ -1,3 +1,2 @@ -.github/workflows/unit-test.yml Dockerfile qodana.yaml diff --git a/Dockerfile b/Dockerfile index 96566de..d5c2408 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,7 @@ RUN ./gradlew runtime --no-daemon FROM gcr.io/distroless/base-nossl:nonroot AS bot -# bump: ffmpeg /static-ffmpeg:([\d.]+)/ docker:mwader/static-ffmpeg|~7 -COPY --from=mwader/static-ffmpeg:7.1 /ffmpeg /usr/local/bin/ +COPY --from=mwader/static-ffmpeg:latest /ffmpeg /usr/local/bin/ ENV FFMPEG_PATH=/usr/local/bin/ffmpeg COPY --from=builder /app/build/jre ./jre