mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-13 07:15:06 +00:00
ci: Merge Debug and Release builds into one
There is no point in completely separating these, as CMake can build out-of-tree just fine. Thus we can reduce the overall complexity significantly, and also detect far more problems ahead of time. As a side bonus, we get both debug and release packages in one go.
This commit is contained in:
parent
30134bd284
commit
69b5ff8ad5
1 changed files with 44 additions and 39 deletions
83
.github/workflows/main.yml
vendored
83
.github/workflows/main.yml
vendored
|
@ -25,7 +25,6 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ]
|
runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ]
|
||||||
generator: [ MSVC, GCC, Clang ]
|
generator: [ MSVC, GCC, Clang ]
|
||||||
CMAKE_BUILD_TYPE: [ Debug, RelWithDebInfo ]
|
|
||||||
exclude:
|
exclude:
|
||||||
- runner: windows-2022
|
- runner: windows-2022
|
||||||
generator: GCC
|
generator: GCC
|
||||||
|
@ -192,73 +191,79 @@ jobs:
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
build/temp/autodeps
|
build/debug/autodeps
|
||||||
key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.CACHE_VERSION }}
|
build/release/autodeps
|
||||||
|
key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ env.CACHE_VERSION }}
|
||||||
|
|
||||||
- name: "Configure"
|
- name: "Configure & Build (Debug)"
|
||||||
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
CODESIGN_FILE: ${{ github.workspace }}/cert.pfx
|
|
||||||
CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }}
|
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.CMAKE_BUILD_TYPE }}" = "Debug" ]]; then
|
cmake -H. -B"build/debug" \
|
||||||
ENABLE_PROFILING=ON
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
else
|
-DCMAKE_INSTALL_PREFIX="build/debug/install" \
|
||||||
ENABLE_PROFILING=OFF
|
-DPACKAGE_NAME="streamfx-${{ matrix.package_name }}-debug" \
|
||||||
fi
|
|
||||||
cmake -H. -B"build/temp" \
|
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
|
||||||
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
|
||||||
-DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \
|
|
||||||
-DPACKAGE_PREFIX="build/package" \
|
-DPACKAGE_PREFIX="build/package" \
|
||||||
-DENABLE_CLANG=TRUE \
|
-DENABLE_CLANG=TRUE \
|
||||||
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
-DENABLE_PROFILING=ON
|
||||||
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
||||||
|
cmake --build "build/debug" --config Debug --target INSTALL
|
||||||
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
||||||
|
cmake --build "build/debug" --config Debug --target install
|
||||||
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
||||||
|
cmake --build "build/debug" --config Debug --target install
|
||||||
|
fi
|
||||||
|
cmake --build "build/debug" --config Debug --target StreamFX_clang-tidy
|
||||||
|
cmake --build "build/debug" --config Debug --target StreamFX_clang-format
|
||||||
|
|
||||||
- name: "Validation: clang-tidy"
|
- name: "Configure & Build (Release)"
|
||||||
continue-on-error: true
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy
|
cmake -H. -B"build/release" \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="build/release/install" \
|
||||||
|
-DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \
|
||||||
|
-DPACKAGE_PREFIX="build/package" \
|
||||||
|
-DENABLE_CLANG=TRUE \
|
||||||
|
-DENABLE_PROFILING=OFF
|
||||||
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
||||||
|
cmake --build "build/release" --config RelWithDebInfo --target INSTALL
|
||||||
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
||||||
|
cmake --build "build/release" --config RelWithDebInfo --target install/strip
|
||||||
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
||||||
|
cmake --build "build/release" --config RelWithDebInfo --target install
|
||||||
|
fi
|
||||||
|
cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-tidy
|
||||||
|
cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-format
|
||||||
|
|
||||||
- name: "Validation: Formatting (clang-format)"
|
- name: "Validate Formatting"
|
||||||
continue-on-error: true
|
continue-on-error: false
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format
|
|
||||||
git --no-pager diff --patch --minimal HEAD --
|
git --no-pager diff --patch --minimal HEAD --
|
||||||
git update-index --refresh
|
git update-index --refresh
|
||||||
git diff-index --quiet HEAD --
|
git diff-index --quiet HEAD --
|
||||||
|
|
||||||
- name: "Build"
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
|
|
||||||
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target install/strip
|
|
||||||
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target install
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: "Package: Archives"
|
- name: "Package: Archives"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build/package
|
mkdir build/package
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
cmake --build "build/debug" --config RelWithDebInfo --target PACKAGE_7Z
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
cmake --build "build/release" --config RelWithDebInfo --target PACKAGE_7Z
|
||||||
|
|
||||||
- name: "Package: Installer (Windows)"
|
- name: "Package: Installer (Windows)"
|
||||||
if: startsWith( matrix.runner, 'windows' )
|
if: startsWith( matrix.runner, 'windows' )
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss"'
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\debug\installer.iss"
|
||||||
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss"
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\release\installer.iss"
|
||||||
|
|
||||||
- name: "Package: Installer (MacOS)"
|
- name: "Package: Installer (MacOS)"
|
||||||
if: startsWith( matrix.runner, 'macos' )
|
if: startsWith( matrix.runner, 'macos' )
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
packagesbuild ./build/temp/installer.pkgproj
|
packagesbuild ./build/debug/installer.pkgproj
|
||||||
|
packagesbuild ./build/release/installer.pkgproj
|
||||||
|
|
||||||
- name: "Artifacts"
|
- name: "Artifacts"
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
|
|
Loading…
Reference in a new issue