Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 66 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
- run:
name: CMake Configure
command: |
CMAKE_ARGS="-DONESEVENLIVE_API_URL=\"$ONESEVENLIVE_API_URL\" -DCMAKE_PROJECT_VERSION=\"$VERSION\""
CMAKE_ARGS="-DYOUTUBE_API_CLIENT_ID=\"$YOUTUBE_API_CLIENT_ID\" -DYOUTUBE_API_CLIENT_SECRET=\"$YOUTUBE_API_CLIENT_SECRET\" -DTWITCH_API_CLIENT_ID=\"$TWITCH_API_CLIENT_ID\" -DONESEVENLIVE_API_URL=\"$ONESEVENLIVE_API_URL\" -DCMAKE_PROJECT_VERSION=\"$VERSION\""

# Add architecture parameter if specified
if [ -n "<< parameters.cmake_arch >>" ]; then
Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
- run:
name: CMake Configure
command: |
cmake --preset windows-x64 -DONESEVENLIVE_API_URL="$env:ONESEVENLIVE_API_URL" -DCMAKE_PROJECT_VERSION="$env:VERSION"
cmake --preset windows-x64 -DYOUTUBE_API_CLIENT_ID="$env:YOUTUBE_API_CLIENT_ID" -DYOUTUBE_API_CLIENT_SECRET="$env:YOUTUBE_API_CLIENT_SECRET" -DTWITCH_API_CLIENT_ID="$env:TWITCH_API_CLIENT_ID" -DONESEVENLIVE_API_URL="$env:ONESEVENLIVE_API_URL" -DCMAKE_PROJECT_VERSION="$env:VERSION"

# Build the project
- run:
Expand Down Expand Up @@ -467,10 +467,13 @@ jobs:

# Move the generated installer from output directory to root directory for artifact upload
$installerPattern = "17liveOBSPlugin-windows-v*.exe"
$zipPattern = "17liveOBSPlugin-windows-v*-non-installer.zip"
if (Test-Path "output") {
$installerFile = Get-ChildItem -Path "output" -Name $installerPattern | Select-Object -First 1
$zipFile = Get-ChildItem -Path "output" -Name $zipPattern | Select-Object -First 1
} else {
$installerFile = $null
$zipFile = $null
}
if ($installerFile) {
Move-Item "output/$installerFile" "../../$installerFile"
Expand All @@ -483,6 +486,16 @@ jobs:
Write-Error "Installer file not found in output directory after build"
exit 1
}
if ($zipFile) {
Move-Item "output/$zipFile" "../../$zipFile"
echo "NON_INSTALLER_NAME=$zipFile" | Out-File -FilePath $env:BASH_ENV -Encoding utf8 -Append
[Environment]::SetEnvironmentVariable("NON_INSTALLER_NAME", $zipFile, "Machine")
$env:NON_INSTALLER_NAME = $zipFile
Write-Host "Non-installer zip built successfully: $zipFile"
} else {
Write-Error "Non-installer zip file not found in output directory after build"
exit 1
}



Expand All @@ -507,6 +520,12 @@ jobs:
$artifactPath = Join-Path "artifacts" $expectedName
Copy-Item $env:INSTALLER_NAME $artifactPath -Force
}
if ($env:NON_INSTALLER_NAME -and (Test-Path $env:NON_INSTALLER_NAME)) {
New-Item -ItemType Directory -Path artifacts -Force | Out-Null
# Keep the exact filename produced (already contains version and -non-installer suffix)
$zipArtifactPath = Join-Path "artifacts" $env:NON_INSTALLER_NAME
Copy-Item $env:NON_INSTALLER_NAME $zipArtifactPath -Force
}
- store_artifacts:
path: artifacts
destination: packages
Expand All @@ -523,21 +542,32 @@ workflows:
# Tag-based build workflow - supports both production and stage builds
tag-build:
jobs:
# - build-macos:
# name: build-macos-apple-silicon
# arch_name: "macAppleSilicon"
# cmake_arch: ""
# filters:
# tags:
# only: /^v\d+\.\d+\.\d+(\.\d+)?(-stage)?$/
# branches:
# ignore: /.*/
# context:
# - macos-signing
# - build-macos:
# name: build-macos-intel
# arch_name: "macIntel"
# cmake_arch: "x86_64"
# filters:
# tags:
# only: /^v\d+\.\d+\.\d+(\.\d+)?(-stage)?$/
# branches:
# ignore: /.*/
# context:
# - macos-signing
- build-macos:
name: build-macos-apple-silicon
arch_name: "macAppleSilicon"
cmake_arch: ""
filters:
tags:
only: /^v\d+\.\d+\.\d+(\.\d+)?(-stage)?$/
branches:
ignore: /.*/
context:
- macos-signing
- build-macos:
name: build-macos-intel
arch_name: "macIntel"
cmake_arch: "x86_64"
name: build-macos-universal
arch_name: "mac-universal"
# cmake_arch: "arm64;x86_64"
filters:
tags:
only: /^v\d+\.\d+\.\d+(\.\d+)?(-stage)?$/
Expand All @@ -559,18 +589,26 @@ workflows:
jobs:
- hold:
type: approval
# - build-macos:
# name: build-macos-apple-silicon
# arch_name: "macAppleSilicon"
# cmake_arch: ""
# requires:
# - hold
# context:
# - macos-signing
# - build-macos:
# name: build-macos-intel
# arch_name: "macIntel"
# cmake_arch: "x86_64"
# requires:
# - hold
# context:
# - macos-signing
- build-macos:
name: build-macos-apple-silicon
arch_name: "macAppleSilicon"
cmake_arch: ""
requires:
- hold
context:
- macos-signing
- build-macos:
name: build-macos-intel
arch_name: "macIntel"
cmake_arch: "x86_64"
name: build-macos-universal
arch_name: "mac-universal"
# cmake_arch: "arm64;x86_64"
requires:
- hold
context:
Expand All @@ -579,4 +617,4 @@ workflows:
requires:
- hold
context:
- windows-signing
- windows-signing
42 changes: 22 additions & 20 deletions .github/workflows/build-macos-apple-silicon.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Build OBS 17Live Plugin - macOS Apple Silicon

on:
# push:
# tags:
# - 'v*.*.*'
# - 'v*.*.*-stage'
workflow_dispatch:
inputs:
environment:
description: "Build environment"
required: true
default: stage
type: choice
options:
- stage
- production
version:
description: "Version number (e.g., 1.0.0)"
required: false
default: "0.0.0"
type: string
# on:
# push:
# tags:
# - 'v*.*.*'
# - 'v*.*.*.*'
# - 'v*.*.*-stage'
# - 'v*.*.*.*-stage'
# workflow_dispatch:
# inputs:
# environment:
# description: "Build environment"
# required: true
# default: stage
# type: choice
# options:
# - stage
# - production
# version:
# description: "Version number (e.g., 1.0.0 or 1.1.4.1)"
# required: false
# default: "0.0.0"
# type: string

jobs:
build-mac-arm64:
Expand Down
42 changes: 22 additions & 20 deletions .github/workflows/build-macos-intel.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Build OBS 17Live Plugin - macOS Intel

on:
# push:
# tags:
# - 'v*.*.*'
# - 'v*.*.*-stage'
workflow_dispatch:
inputs:
environment:
description: "Build environment"
required: true
default: stage
type: choice
options:
- stage
- production
version:
description: "Version number (e.g., 1.0.0)"
required: false
default: "0.0.0"
type: string
# on:
# push:
# tags:
# - 'v*.*.*'
# - 'v*.*.*.*'
# - 'v*.*.*-stage'
# - 'v*.*.*.*-stage'
# workflow_dispatch:
# inputs:
# environment:
# description: "Build environment"
# required: true
# default: stage
# type: choice
# options:
# - stage
# - production
# version:
# description: "Version number (e.g., 1.0.0 or 1.1.4.1)"
# required: false
# default: "0.0.0"
# type: string

jobs:
build-mac-x64:
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/build-macos-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ jobs:
with:
path: |
web/ably_chat/node_modules
web/ably_client/node_modules
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('web/ably_chat/package-lock.json') }}
key: ${{ runner.os }}-npm-${{ hashFiles('web/ably_chat/package-lock.json', 'web/ably_client/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

Expand All @@ -87,6 +88,14 @@ jobs:
fi
npm run build

- name: Install and Build Ably Client
working-directory: web/ably_client
run: |
if [ "${{ steps.npm-cache.outputs.cache-hit }}" != "true" ]; then
npm install
fi
npm run build

- name: Set ENV and Version
run: |
# Remove v prefix from VERSION if present
Expand Down Expand Up @@ -127,8 +136,12 @@ jobs:
fi

- name: CMake Configure
env:
YOUTUBE_API_CLIENT_ID: ${{ vars.YOUTUBE_API_CLIENT_ID }}
YOUTUBE_API_CLIENT_SECRET: ${{ vars.YOUTUBE_API_CLIENT_SECRET }}
TWITCH_API_CLIENT_ID: ${{ vars.TWITCH_API_CLIENT_ID }}
run: |
CMAKE_ARGS="-DONESEVENLIVE_API_URL=\"$ONESEVENLIVE_API_URL\" -DCMAKE_PROJECT_VERSION=\"$VERSION\""
CMAKE_ARGS="-DYOUTUBE_API_CLIENT_ID=\"$YOUTUBE_API_CLIENT_ID\" -DYOUTUBE_API_CLIENT_SECRET=\"$YOUTUBE_API_CLIENT_SECRET\" -DTWITCH_API_CLIENT_ID=\"$TWITCH_API_CLIENT_ID\" -DONESEVENLIVE_API_URL=\"$ONESEVENLIVE_API_URL\" -DCMAKE_PROJECT_VERSION=\"$VERSION\""

# Add architecture parameter if specified
if [ -n "${{ inputs.cmake_arch }}" ]; then
Expand Down Expand Up @@ -168,4 +181,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: ${{ env.PKG_NAME }}
path: ${{ env.PKG_NAME }}
35 changes: 35 additions & 0 deletions .github/workflows/build-macos-universal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build OBS 17Live Plugin - macOS Universal

on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*.*'
- 'v*.*.*-stage'
- 'v*.*.*.*-stage'
workflow_dispatch:
inputs:
environment:
description: "Build environment"
required: true
default: stage
type: choice
options:
- stage
- production
version:
description: "Version number (e.g., 1.0.0 or 1.1.4.1)"
required: false
default: "0.0.0"
type: string

jobs:
build-mac-universal:
uses: ./.github/workflows/build-macos-reusable.yml
with:
arch_name: "mac-universal"
# cmake_arch: "arm64;x86_64"
artifact_name: "macOS-Universal-PKG"
use_sudo: false
environment: ${{ github.event_name == 'push' && (contains(github.ref_name, '-stage') && 'stage' || 'production') || github.event.inputs.environment || 'stage' }}
version: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && github.ref_name || github.event.inputs.version || '0.0.0' }}
29 changes: 21 additions & 8 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Build OBS 17Live Plugin - Windows

on:
# push:
# tags:
# - 'v*.*.*' # Production builds (e.g., v1.0.0)
# - 'v*.*.*-stage' # Stage builds (e.g., v1.0.0-stage)
push:
tags:
- 'v*.*.*'
- 'v*.*.*.*'
- 'v*.*.*-stage'
- 'v*.*.*.*-stage'
workflow_dispatch:
inputs:
environment:
Expand All @@ -16,7 +18,7 @@ on:
- stage
- production
version:
description: "Version number (e.g., 1.0.0)"
description: "Version number (e.g., 1.0.0 or 1.1.4.1)"
required: false
default: "0.0.0"
type: string
Expand Down Expand Up @@ -60,8 +62,9 @@ jobs:
with:
path: |
web/ably_chat/node_modules
web/ably_client/node_modules
~\AppData\Roaming\npm-cache
key: ${{ runner.os }}-npm-${{ hashFiles('web/ably_chat/package-lock.json') }}
key: ${{ runner.os }}-npm-${{ hashFiles('web/ably_chat/package-lock.json', 'web/ably_client/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

Expand All @@ -86,6 +89,13 @@ jobs:
Write-Host "Skipping npm install (dependencies restored from cache)"
}
npm run build

- name: Install and Build Ably Client
shell: pwsh
run: |
cd web/ably_client
if ("${{ steps.npm-cache.outputs.cache-hit }}" -ne "true") { npm install }
npm run build

- name: Set ENV and Version
shell: pwsh
Expand Down Expand Up @@ -136,10 +146,13 @@ jobs:

- name: CMake Configure
shell: pwsh
run: |
cmake --preset windows-x64 -DONESEVENLIVE_API_URL="$env:ONESEVENLIVE_API_URL" -DCMAKE_PROJECT_VERSION="$env:VERSION"
env:
YOUTUBE_API_CLIENT_ID: ${{ vars.YOUTUBE_API_CLIENT_ID }}
YOUTUBE_API_CLIENT_SECRET: ${{ vars.YOUTUBE_API_CLIENT_SECRET }}
TWITCH_API_CLIENT_ID: ${{ vars.TWITCH_API_CLIENT_ID }}
ONESEVENLIVE_API_URL: ${{ vars.ONESEVENLIVE_API_URL }}
run: |
cmake --preset windows-x64 -DYOUTUBE_API_CLIENT_ID="$env:YOUTUBE_API_CLIENT_ID" -DYOUTUBE_API_CLIENT_SECRET="$env:YOUTUBE_API_CLIENT_SECRET" -DTWITCH_API_CLIENT_ID="$env:TWITCH_API_CLIENT_ID" -DONESEVENLIVE_API_URL="$env:ONESEVENLIVE_API_URL" -DCMAKE_PROJECT_VERSION="$env:VERSION"

- name: Build Project
shell: pwsh
Expand Down
Loading