mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-11 06:15:05 +00:00
ci: Compress & optimize main script
This commit is contained in:
parent
bba97ada1b
commit
5f27998c01
1 changed files with 38 additions and 45 deletions
83
.github/workflows/main.yml
vendored
83
.github/workflows/main.yml
vendored
|
@ -139,7 +139,15 @@ jobs:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)"
|
- name: "Dependencies: Windows"
|
||||||
|
if: startsWith( matrix.runner, 'windows' )
|
||||||
|
run: |
|
||||||
|
curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe"
|
||||||
|
7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe"
|
||||||
|
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
||||||
|
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
||||||
|
|
||||||
|
- name: "Dependencies: Linux"
|
||||||
if: startsWith( matrix.runner, 'ubuntu' )
|
if: startsWith( matrix.runner, 'ubuntu' )
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -155,28 +163,21 @@ jobs:
|
||||||
qtbase5-dev qtbase5-private-dev libqt5svg5-dev \
|
qtbase5-dev qtbase5-private-dev libqt5svg5-dev \
|
||||||
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
||||||
libcurl4-openssl-dev
|
libcurl4-openssl-dev
|
||||||
|
if [[ "${{ matrix.generator }}" = "GCC" ]]; then
|
||||||
|
sudo apt-get install gcc-10 g++10
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||||
|
elif [[ "${{ matrix.generator }}" = "Clang" ]]; then
|
||||||
|
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all
|
||||||
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800
|
||||||
|
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800
|
||||||
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800
|
||||||
|
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800
|
||||||
|
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800
|
||||||
|
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800
|
||||||
|
sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800
|
||||||
|
fi
|
||||||
|
|
||||||
- name: "Dependency: GCC (Linux, GCC)"
|
- name: 'Dependencies: MacOS'
|
||||||
if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'GCC' )
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get install gcc-10 g++10
|
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
|
||||||
|
|
||||||
- name: "Dependency: Clang (Linux, Clang)"
|
|
||||||
if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'Clang' )
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all
|
|
||||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800
|
|
||||||
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800
|
|
||||||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800
|
|
||||||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800
|
|
||||||
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800
|
|
||||||
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800
|
|
||||||
sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800
|
|
||||||
|
|
||||||
- name: 'Dependency: Packages (Linux)'
|
|
||||||
if: startsWith( matrix.runner, 'macos' )
|
if: startsWith( matrix.runner, 'macos' )
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -185,12 +186,6 @@ jobs:
|
||||||
pushd /Volumes/Packages*
|
pushd /Volumes/Packages*
|
||||||
sudo installer -pkg ./Install\ Packages.pkg -target /
|
sudo installer -pkg ./Install\ Packages.pkg -target /
|
||||||
|
|
||||||
- name: "Dependency: InnoSetup (Windows)"
|
|
||||||
if: startsWith( matrix.runner, 'windows' )
|
|
||||||
run: |
|
|
||||||
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
|
||||||
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
|
||||||
|
|
||||||
- name: "Auto-Dependency Cache"
|
- name: "Auto-Dependency Cache"
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
@ -214,32 +209,30 @@ jobs:
|
||||||
CODESIGN_FILE: ${{ github.workspace }}/cert.pfx
|
CODESIGN_FILE: ${{ github.workspace }}/cert.pfx
|
||||||
CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }}
|
CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
|
if [[ "${{ matrix.CMAKE_BUILD_TYPE }}" = "Debug" ]]; then
|
||||||
|
ENABLE_PROFILING=ON
|
||||||
|
else
|
||||||
|
ENABLE_PROFILING=OFF
|
||||||
|
fi
|
||||||
cmake -H. -B"build/temp" \
|
cmake -H. -B"build/temp" \
|
||||||
${{ steps.codesign.outputs.cmake_args }} \
|
${{ steps.codesign.outputs.cmake_args }} \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
||||||
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
-DCMAKE_INSTALL_PREFIX="build/distrib" \
|
||||||
-DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \
|
-DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \
|
||||||
-DPACKAGE_PREFIX="build/package" \
|
-DPACKAGE_PREFIX="build/package" \
|
||||||
-DENABLE_CLANG=FALSE \
|
-DENABLE_CLANG=TRUE \
|
||||||
-DENABLE_PROFILING=FALSE
|
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
||||||
|
|
||||||
- name: "Build (Windows)"
|
- name: "Build"
|
||||||
if: startsWith( matrix.runner, 'windows' )
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
|
if [[ "${{ matrix.runner }}" = windows* ]]; then
|
||||||
|
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
|
||||||
- name: "Build (Linux)"
|
elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then
|
||||||
if: startsWith( matrix.runner, 'ubuntu' )
|
cmake --build "build/temp" --config RelWithDebInfo --target install/strip
|
||||||
shell: bash
|
elif [[ "${{ matrix.runner }}" = macos* ]]; then
|
||||||
run: |
|
cmake --build "build/temp" --config RelWithDebInfo --target install
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target install/strip
|
fi
|
||||||
|
|
||||||
- name: "Build (MacOS)"
|
|
||||||
if: startsWith( matrix.runner, 'macos' )
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target install
|
|
||||||
|
|
||||||
- name: "Package: Archives"
|
- name: "Package: Archives"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in a new issue