Skip to content

Commit

Permalink
Use ctest directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Mar 18, 2024
1 parent 9b21de1 commit 05924e6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,25 @@ jobs:
ubuntu: ["jammy", "noble"]
include:
- ubuntu: "noble"
test: "-e MEDIAFX_TEST=--verbose"
test: "builders/mediafx-test.sh --verbose"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build/test mediaFX
run: DOCKER_OPTS="${{ matrix.test }}" TARGET=opengl UBUNTU=${{ matrix.ubuntu }} builders/Linux/docker-run.sh
run: |
export TARGET=opengl
export UBUNTU=${{ matrix.ubuntu }}
builders/Linux/docker-run.sh
${{ matrix.test }}
- name: Build/test mediaFX vulkan
if: matrix.ubuntu == 'noble'
run: DOCKER_OPTS="${{ matrix.test }}" TARGET=vulkan UBUNTU=${{ matrix.ubuntu }} builders/Linux/docker-run.sh
run: |
export TARGET=vulkan
export UBUNTU=${{ matrix.ubuntu }}
builders/Linux/docker-run.sh
${{ matrix.test }}
- name: Upload Failed Artifacts
if: failure()
uses: actions/upload-artifact@v4
Expand All @@ -93,7 +101,7 @@ jobs:
ffmpeg: ["ffmpeg@4", "ffmpeg@6"]
include:
- ffmpeg: "ffmpeg@6"
test: "MEDIAFX_TEST=--verbose"
test: "builders/mediafx-test.sh --verbose"
env:
XCODE_VER: "15.2"
steps:
Expand Down Expand Up @@ -127,7 +135,8 @@ jobs:
run: |
export PATH="$(brew --prefix ${{ matrix.ffmpeg }})/bin:$PATH"
export PKG_CONFIG_PATH="$(brew --prefix ${{ matrix.ffmpeg }})/lib/pkgconfig"
${{ matrix.test }} builders/mediafx-build.sh
builders/mediafx-build.sh
${{ matrix.test }}
- name: Upload Failed Artifacts
if: failure()
uses: actions/upload-artifact@v4
Expand Down
3 changes: 0 additions & 3 deletions builders/mediafx-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ MEDIAFX_BUILD="${BUILD_ROOT}/${BUILD_TYPE}"
mkdir -p "$MEDIAFX_BUILD"
cd "$MEDIAFX_BUILD"
(cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE --install-prefix "${QTDIR}" ../../.. && cmake --build . && ${SUDO} cmake --install .) || exit 1
if [[ -v MEDIAFX_TEST ]]; then
make test CTEST_OUTPUT_ON_FAILURE=1 ARGS="${MEDIAFX_TEST}" || exit 1
fi
10 changes: 10 additions & 0 deletions builders/mediafx-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Copyright (C) 2024 Andrew Wason
# SPDX-License-Identifier: GPL-3.0-or-later

CURRENT=${BASH_SOURCE%/*}
source "$CURRENT/versions"

BUILD_TYPE=${BUILD_TYPE:-Release}
cd "${BUILD_ROOT}/${BUILD_TYPE}" || exit 1
ctest --output-on-failure "${@}" || exit 1

0 comments on commit 05924e6

Please sign in to comment.