From 3cac6d82f7f6d39fdfde8fe171a3492653f57ad8 Mon Sep 17 00:00:00 2001 From: Andrew Wason Date: Tue, 12 Dec 2023 15:17:16 -0500 Subject: [PATCH] fix builders --- .github/workflows/ci.yml | 8 +++++++- builders/Darwin/install-qt6.sh | 2 +- builders/Darwin/mediafx-build.sh | 4 ++-- builders/Linux/mediafx-build.sh | 2 +- builders/versions | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f880f2..f78c397 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,10 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Source versions + run: | + source builders/versions + echo "QT_VER=${QT_VER}" >> $GITHUB_ENV - name: Build mediafx image uses: docker/build-push-action@v5 with: @@ -31,6 +35,7 @@ jobs: tags: mediafx load: true target: mediafx + build-args: QT_VER=${{ env.QT_VER }} cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max - name: Build mediafx-vulkan image @@ -39,7 +44,8 @@ jobs: context: builders/Linux tags: mediafx-vulkan load: true - target: mediafx-vulkan + target: mediafx-vulkan + build-args: QT_VER=${{ env.QT_VER }} cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max - name: Install mediaFX diff --git a/builders/Darwin/install-qt6.sh b/builders/Darwin/install-qt6.sh index c87fbec..5868d6c 100755 --- a/builders/Darwin/install-qt6.sh +++ b/builders/Darwin/install-qt6.sh @@ -19,7 +19,7 @@ set -u CURRENT=$(dirname "${BASH_SOURCE[0]}") source "$CURRENT/../versions" ( - mkdir -p "$BUILD_ROOT"/Darwin && cd "$BUILD_ROOT"/Darwin + mkdir -p "${BUILD_ROOT:?}" && cd "$BUILD_ROOT" python3 -m venv --clear "build/qtvenv" || exit 1 "build/qtvenv/bin/pip" install --upgrade --upgrade-strategy eager aqtinstall || exit 1 "build/qtvenv/bin/python" -m aqt install-qt mac desktop ${QT_VER} --modules qtmultimedia qtquick3d qtshadertools qtquicktimeline qtquickeffectmaker -O "$BUILD_ROOT/installed" || exit 1 diff --git a/builders/Darwin/mediafx-build.sh b/builders/Darwin/mediafx-build.sh index a4c082a..c631e2a 100755 --- a/builders/Darwin/mediafx-build.sh +++ b/builders/Darwin/mediafx-build.sh @@ -16,12 +16,12 @@ CURRENT=$(dirname "${BASH_SOURCE[0]}") source "$CURRENT/../versions" -INSTALL_ROOT="${BUILD_ROOT:?}/Darwin/installed/${QT_VER:?}/macos" +INSTALL_ROOT="${BUILD_ROOT:?}/installed/${QT_VER:?}/macos" BUILD_TYPE=${BUILD_TYPE:-Release} MEDIAFX_ROOT="$(cd "$(dirname "${CURRENT}")/../"; pwd)" -MEDIAFX_BUILD="${BUILD_ROOT}/Darwin/build/mediafx/${BUILD_TYPE}" +MEDIAFX_BUILD="${BUILD_ROOT}/build/mediafx/${BUILD_TYPE}" mkdir -p "$MEDIAFX_BUILD" PATH=${INSTALL_ROOT:?}/bin:$PATH diff --git a/builders/Linux/mediafx-build.sh b/builders/Linux/mediafx-build.sh index a24b438..08d11b0 100755 --- a/builders/Linux/mediafx-build.sh +++ b/builders/Linux/mediafx-build.sh @@ -16,7 +16,7 @@ CURRENT=$(dirname "${BASH_SOURCE[0]}") source "$CURRENT/../versions" -cd "${BUILD_ROOT:?}/Linux" || exit 1 +cd "${BUILD_ROOT:?}" || exit 1 (cmake --install-prefix /usr/local/Qt/${QT_VER:?}/gcc_64 ../.. && cmake --build . && sudo cmake --install .) || exit 1 if [[ -v MEDIAFX_TEST ]]; then export GALLIUM_DRIVER=softpipe diff --git a/builders/versions b/builders/versions index e843bbc..1e81ab7 100644 --- a/builders/versions +++ b/builders/versions @@ -1,4 +1,4 @@ export QT_VER=6.6.0 -BUILD_ROOT="$(dirname "${BASH_SOURCE[0]}")/../build" +BUILD_ROOT="$(dirname "${BASH_SOURCE[0]}")/../build/$(uname)" mkdir -p "${BUILD_ROOT}" export BUILD_ROOT=$(cd "${BUILD_ROOT}"; pwd)