Skip to content

Commit

Permalink
Work on CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Sep 21, 2023
1 parent dd64f68 commit 65b33c4
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 17 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/builds_minianalyser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:

env:
APP_NAME: "MiniAnalyser"
APP_VERSION: "48"
APP_EXECUTABLE: "mini_analyser"
APP_VERSION: "48"
QT_VERSION: "6.5.2"

#--------------------------------------------------------------------------------
Expand All @@ -39,7 +39,6 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
modules: qtimageformats

# Install dependencies (from package manager)
- name: Install dependencies (from package manager)
Expand Down Expand Up @@ -106,7 +105,6 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
modules: qtimageformats

# Build library
- name: Build library
Expand All @@ -129,13 +127,13 @@ jobs:
run: |
cd mini_analyser/
make install
zip -r -X ${{env.APP_NAME}}.zip bin/${{env.APP_EXECUTABLE}}.app
zip -r -X ../../${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS.zip bin/${{env.APP_EXECUTABLE}}.app
# Upload app zip
# Upload app bundle
- name: Upload app zip
uses: actions/upload-artifact@v3
with:
name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS.app
name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS
path: mini_analyser/bin/${{env.APP_EXECUTABLE}}.app

## Windows build #############################################################
Expand All @@ -161,7 +159,6 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
modules: qtimageformats

# Install NSIS (already installed in 'windows-2022')
#- name: Install NSIS
Expand All @@ -181,8 +178,8 @@ jobs:
# Build application
- name: Build application
run: |
cp minivideo/build/Release/minivideo.lib mini_analyser/bin/minivideo.lib
cp minivideo/build/Release/minivideo.dll mini_analyser/bin/minivideo.dll
cp minivideo/build/Release/minivideo.lib mini_analyser/build/minivideo.lib
cp minivideo/build/Release/minivideo.dll mini_analyser/build/minivideo.dll
cd mini_analyser/
qmake --version
qmake ${{env.APP_EXECUTABLE}}.pro CONFIG+=release
Expand All @@ -191,13 +188,15 @@ jobs:
# Package application
- name: Package application
run: |
cd mini_analyser/
windeployqt bin/
7z a mini_analyser/mini_analyser-${{env.APP_VERSION}}-win64.zip mini_analyser-${{env.APP_VERSION}}-win64
cp minivideo/build/Release/minivideo.lib mini_analyser/bin/minivideo.lib
cp minivideo/build/Release/minivideo.dll mini_analyser/bin/minivideo.dll
windeployqt mini_analyser/bin/
mv mini_analyser/bin mini_analyser/${{env.APP_EXECUTABLE}}-${{env.APP_VERSION}}-win64
7z a mini_analyser/${{env.APP_EXECUTABLE}}-${{env.APP_VERSION}}-win64.zip ${{env.APP_EXECUTABLE}}-${{env.APP_VERSION}}-win64
# Upload app zip
- name: Upload app zip
uses: actions/upload-artifact@v3
with:
name: ${{env.APP_EXECUTABLE}}-${{env.APP_VERSION}}-win64.zip
path: ${{env.APP_EXECUTABLE}}.zip
name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-win64
path: ${{env.APP_EXECUTABLE}}-${{env.APP_VERSION}}.zip
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ project(MiniVideo framework)
add_subdirectory(minivideo)
add_subdirectory(mini_thumbnailer)
add_subdirectory(mini_extractor)
#add_subdirectory(mini_analyser)
#add_subdirectory(mini_analyser) # mini_analyser does not have a CMake file
4 changes: 4 additions & 0 deletions MiniVideo.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ SUBDIRS = minivideo mini_thumbnailer mini_extractor mini_analyser
mini_thumbnailer.depends = minivideo
mini_extractor.depends = minivideo
mini_analyser.depends = minivideo

OTHER_FILES += README.md \
.github/workflows/builds_minivideo.yml \
.github/workflows/builds_minianalyser.yml
8 changes: 7 additions & 1 deletion mini_analyser/mini_analyser.pro
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ unix {
QMAKE_INFO_PLIST = resources/app/Info.plist

# Add videobackends
#DEFINES += VIDEOBACKEND_VDA
DEFINES += VIDEOBACKEND_VDA
DEFINES += VIDEOBACKEND_VTB

SOURCES += src/hw_apis/videobackends_vda.cpp \
Expand All @@ -146,6 +146,12 @@ unix {
LIBS += -Wl,-framework,Foundation -Wl,-framework,CoreFoundation -Wl,-framework,CoreMedia -Wl,-framework,CoreVideo
LIBS += -Wl,-framework,VideoToolbox -Wl,-framework,VideoDecodeAcceleration

# Target architecture(s)
#QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64

# Target OS
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15

# Force compiler to use available macOS SDK version (with automatic detection)
#XCODE_SDK_VERSION = $$system("xcodebuild -sdk macosx -version | grep SDKVersion | cut -d' ' -f2-")
#QMAKE_MAC_SDK = "macosx$${XCODE_SDK_VERSION}"
Expand Down
13 changes: 12 additions & 1 deletion minivideo/minivideo.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# This file allows you to build shared & static library of MiniVideo
#-------------------------------------------------------------------------------

# build config
TARGET = minivideo
TEMPLATE = lib

CONFIG += c++11 shared_and_static
CONFIG -= qt

Expand Down Expand Up @@ -52,17 +52,28 @@ unix {

linux {
DEFINES += ENABLE_MEMFD=1 # Enables memfd

# Linker flags
QMAKE_LFLAGS += -lm -Wl,-z,now -Wl,-z,relro
}

macx {
# Target architecture(s)
#QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64

# Target OS
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15

# Linker flags
QMAKE_LFLAGS += -lm
}

win32 {
DEFINES -= UNICODE
DEFINES += minivideo_EXPORT=__declspec(dllimport)
DEFINES += _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES

# Linker flags
QMAKE_LFLAGS += -lm -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc
}

Expand Down

0 comments on commit 65b33c4

Please sign in to comment.