mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-25 04:45:12 +00:00
ci: Add caching for many steps
This commit is contained in:
parent
c09916dd85
commit
c98991c60c
1 changed files with 60 additions and 34 deletions
94
.github/workflows/main.yml
vendored
94
.github/workflows/main.yml
vendored
|
@ -37,33 +37,36 @@ jobs:
|
||||||
CMAKE_GENERATOR_TOOLSET: "host=x64"
|
CMAKE_GENERATOR_TOOLSET: "host=x64"
|
||||||
CMAKE_SYSTEM_VERSION: ${{ matrix.windows_sdk }}
|
CMAKE_SYSTEM_VERSION: ${{ matrix.windows_sdk }}
|
||||||
steps:
|
steps:
|
||||||
- name: "Clone Repository"
|
- name: "Clone"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: "Cache: OBS"
|
fetch-depth: 0
|
||||||
|
- name: "libobs: Cache"
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: "build/temp/libobs-download/libobs-download-prefix/src/libobs.7z"
|
path: |
|
||||||
key: ${{ matrix.id }}-${{ env.DOWNLOAD_OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH_64 }}
|
build/temp/libobs-download
|
||||||
- name: "Cache: OBS Dependencies"
|
key: libobs-${{ matrix.id }}-${{ env.DOWNLOAD_OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH_64 }}-${{ secrets.CACHE_VERSION }}
|
||||||
|
- name: "obsdeps: Cache"
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: "build/temp/obsdeps-download/obsdeps-download-prefix/src/obsdeps.7z"
|
path: |
|
||||||
key: ${{ matrix.id }}-${{ env.DOWNLOAD_OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}
|
build/temp/obsdeps-download
|
||||||
- name: "Cache: Qt"
|
key: obsdeps-${{ matrix.id }}-${{ env.DOWNLOAD_OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }}
|
||||||
|
- name: "qt: Cache"
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
with:
|
with:
|
||||||
path: "../Qt"
|
path: "../Qt"
|
||||||
key: ${{ matrix.id }}-${{ env.QT_VERSION }}
|
key: ${{ matrix.id }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
|
||||||
- name: "Prerequisites: Qt"
|
- name: "qt: Install"
|
||||||
if: "steps.cache-qt.outputs.cache-hit != true"
|
if: "steps.cache-qt.outputs.cache-hit != true"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -L "https://github.com/Xaymar/obs-studio/releases/download/26.1.0/qt_${QT_VERSION}_windows_64.7z" -o qt.7z
|
curl -L "https://github.com/Xaymar/obs-studio/releases/download/26.1.0/qt_${QT_VERSION}_windows_64.7z" -o qt.7z
|
||||||
7z x -o../Qt/ qt.7z
|
7z x -o../Qt/ qt.7z
|
||||||
- name: "Configure Project"
|
- name: "StreamFX: Configure"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -H. -B"build/temp" \
|
cmake -H. -B"build/temp" \
|
||||||
|
@ -72,24 +75,24 @@ jobs:
|
||||||
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
||||||
-DPACKAGE_PREFIX="build/package" \
|
-DPACKAGE_PREFIX="build/package" \
|
||||||
-DQt5_DIR="${PWD}/../Qt/msvc2019_64/lib/cmake/Qt5/"
|
-DQt5_DIR="${PWD}/../Qt/msvc2019_64/lib/cmake/Qt5/"
|
||||||
- name: "Build Project"
|
- name: "StreamFX: Build"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
|
cmake --build "build/temp" --config RelWithDebInfo --target INSTALL
|
||||||
- name: "Package Project"
|
- name: "StreamFX: Package (Install Prerequisites)"
|
||||||
|
run: |
|
||||||
|
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.0.3.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
||||||
|
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
||||||
|
- name: "StreamFX: Package"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build/package
|
mkdir build/package
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
||||||
- name: "Package Installer (Prereqs)"
|
- name: "StreamFX: Package Installer"
|
||||||
run: |
|
run: |
|
||||||
curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.0.3.exe" "-f" "--retry" "5" "-o" "inno.exe"
|
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Qp ".\build\temp\installer.iss"
|
||||||
.\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
|
- name: "Artifacts"
|
||||||
- name: "Package Installer (Compile)"
|
|
||||||
run: |
|
|
||||||
& 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' /Qp ".\build\temp\installer.iss"
|
|
||||||
- name: "Upload Artifacts"
|
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.id }}
|
name: ${{ matrix.id }}
|
||||||
|
@ -124,10 +127,11 @@ jobs:
|
||||||
CC: ${{ matrix.compiler }}
|
CC: ${{ matrix.compiler }}
|
||||||
CXX: ${{ matrix.compiler-cxx }}
|
CXX: ${{ matrix.compiler-cxx }}
|
||||||
steps:
|
steps:
|
||||||
- name: "Clone Repository"
|
- name: "Clone"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
- name: "Prerequisites: Apt-Get"
|
- name: "Prerequisites: Apt-Get"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -144,12 +148,13 @@ jobs:
|
||||||
${{ matrix.packages }} \
|
${{ matrix.packages }} \
|
||||||
checkinstall pkg-config
|
checkinstall pkg-config
|
||||||
${{ matrix.extra_command }}
|
${{ matrix.extra_command }}
|
||||||
- name: "Cache: OBS"
|
- name: "libobs: Cache"
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: "build/temp/libobs-download/libobs-download-prefix/src/libobs.7z"
|
path: |
|
||||||
key: ${{ matrix.id }}-${{ env.DOWNLOAD_OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH_64 }}
|
build/temp/libobs-download
|
||||||
- name: "Configure Project"
|
key: libobs-${{ matrix.id }}-${{ env.DOWNLOAD_OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH_64 }}${{ secrets.CACHE_VERSION }}
|
||||||
|
- name: "StreamFX: Configure"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -H. -B"build/temp" \
|
cmake -H. -B"build/temp" \
|
||||||
|
@ -158,17 +163,17 @@ jobs:
|
||||||
-DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE \
|
-DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE \
|
||||||
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
||||||
-DPACKAGE_PREFIX="build/package"
|
-DPACKAGE_PREFIX="build/package"
|
||||||
- name: "Build Project"
|
- name: "StreamFX: Build"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target install
|
cmake --build "build/temp" --config RelWithDebInfo --target install
|
||||||
- name: "Package Project"
|
- name: "StreamFX: Package"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build/package
|
mkdir build/package
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
||||||
- name: "Upload Artifacts"
|
- name: "Artifacts"
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.id }}
|
name: ${{ matrix.id }}
|
||||||
|
@ -188,15 +193,36 @@ jobs:
|
||||||
CMAKE_GENERATOR: "Xcode"
|
CMAKE_GENERATOR: "Xcode"
|
||||||
CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.target-version }}"
|
CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.target-version }}"
|
||||||
steps:
|
steps:
|
||||||
- name: "Clone Repository"
|
- name: "Clone"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: "Prerequisties: Qt"
|
fetch-depth: 0
|
||||||
|
- name: "libobs: Cache"
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
build/temp/libobs-download
|
||||||
|
key: libobs-${{ matrix.id }}-${{ secrets.CACHE_VERSION }}
|
||||||
|
- name: "obsdeps: Cache"
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
build/temp/obsdeps-download
|
||||||
|
key: obsdeps-${{ matrix.id }}-${{ secrets.CACHE_VERSION }}
|
||||||
|
- name: "qt: Cache"
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: qt-cache
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/usr/local/Cellar/qt@5
|
||||||
|
key: qt-${{ matrix.id }}-${{ secrets.CACHE_VERSION }}
|
||||||
|
- name: "qt: 5.15.2"
|
||||||
|
if: "steps.qt-cache.outputs.cache-hit != 'true'"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
brew install qt@5
|
brew install qt@5
|
||||||
- name: "Configure Project"
|
- name: "StreamFX: Configure"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -H. -B"build/temp" \
|
cmake -H. -B"build/temp" \
|
||||||
|
@ -205,17 +231,17 @@ jobs:
|
||||||
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
|
||||||
-DPACKAGE_PREFIX="build/package" \
|
-DPACKAGE_PREFIX="build/package" \
|
||||||
-DQt5_DIR=$(brew --prefix)/Cellar/qt@5/5.15.2/lib/cmake/Qt5
|
-DQt5_DIR=$(brew --prefix)/Cellar/qt@5/5.15.2/lib/cmake/Qt5
|
||||||
- name: "Build Project"
|
- name: "StreamFX: Build"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target install
|
cmake --build "build/temp" --config RelWithDebInfo --target install
|
||||||
- name: "Package Project"
|
- name: "StreamFX: Package"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build/package
|
mkdir build/package
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z
|
||||||
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP
|
||||||
- name: "Upload Artifacts"
|
- name: "Artifacts"
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.id }}
|
name: ${{ matrix.id }}
|
||||||
|
|
Loading…
Reference in a new issue