obs-websocket/.github/workflows/main.yml
2021-04-28 17:38:38 -07:00

70 lines
2.5 KiB
YAML

name: "CI Multiplatform Build"
on:
push:
paths-ignore:
- 'docs/**'
branches:
- master
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
branches:
- master
jobs:
windows:
name: 'Windows 32/64 Bit'
runs-on: [windows-latest]
if: contains(github.event.head_commit.message, '[skip ci]') != true
env:
build_config: 'RelWithDebInfo'
DEPS_CACHE_VERSION: '3' # Change whenever updating OBS dependencies URL, in order to force a cache reset
DEPS_BASE_PATH: 'D:\obsdependencies'
DEPS_PATH_32: 'D:\obsdependencies\win32'
DEPS_PATH_64: 'D:\obsdependencies\win64'
QT_CACHE_VERSION: '3' # Change whenever updating Qt dependency URL, in order to force a cache reset
QT_ARCHIVE_FILE: 'Qt_5.15.2.7z'
QT_BASE_DIR: 'D:\QtDep'
QTDIR32: 'D:\QtDep\5.15.2\msvc2019'
QTDIR64: 'D:\QtDep\5.15.2\msvc2019_64'
OBS_PATH: 'D:\obs-studio'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: 'Restore cached Qt archive file'
id: qtcache
uses: actions/cache@v2
with:
path: ${{ env.QT_BASE_DIR }}\${{ env.QT_ARCHIVE_FILE }}
key: 'qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}'
restore-keys: |
qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}
- name: 'Download Qt'
if: steps.qtcache.outputs.cache-hit != 'true'
run: |
mkdir ${{ env.QT_BASE_DIR }}
cd ${{ env.QT_BASE_DIR }}
curl -kLO https://tt2468.net/dl/${{ env.QT_ARCHIVE_FILE }} -f --retry 5 -C -
- name: 'Extract Qt'
run: |
7z x ${{ env.QT_BASE_DIR }}\${{ env.QT_ARCHIVE_FILE }} -o${{ env.QT_BASE_DIR }}
dir ${{ env.QT_BASE_DIR }}
- name: 'Restore cached OBS Studio dependencies'
id: obscache
uses: actions/cache@v2
with:
path: ${{ env.DEPS_BASE_PATH }}\**
key: 'obsdep-${{ env.DEPS_CACHE_VERSION }} | ${{ runner.os }}'
restore-keys: |
obsdep-${{ env.DEPS_CACHE_VERSION }} | ${{ runner.os }}
- name: 'Download and Extract deps'
if: steps.obscache.outputs.cache-hit != 'true'
run: |
mkdir ${{ env.DEPS_BASE_PATH }}
cd D:\
curl -o dependencies.zip -kLO https://cdn-fastly.obsproject.com/downloads/dependencies2019.zip -f --retry 5 -C -
7z x dependencies.zip -o${{ env.DEPS_BASE_PATH }}