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
2 changes: 2 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ self-hosted-runner:
- blacksmith-4vcpu-windows-2025
- blacksmith-6vcpu-macos-15
- blacksmith-6vcpu-macos-latest
- blacksmith-8vcpu-ubuntu-2404
- blacksmith-8vcpu-ubuntu-2404-arm
- opennow-release-signer

config-variables: null
23 changes: 23 additions & 0 deletions .github/scripts/ensure-windows-media-foundation.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
$ErrorActionPreference = "Stop"

$feature = Get-WindowsFeature -Name Server-Media-Foundation
if (-not $feature) {
throw "The Server-Media-Foundation feature is unavailable on this runner."
}

if (-not $feature.Installed) {
$result = Install-WindowsFeature -Name Server-Media-Foundation
$result | Format-List Success, RestartNeeded, ExitCode, FeatureResult
if (-not $result.Success) {
throw "Installing Server-Media-Foundation failed with exit code $($result.ExitCode)."
}
if ($result.RestartNeeded.ToString() -ne "No") {
throw "Installing Server-Media-Foundation requires a runner restart."
}
}

$feature = Get-WindowsFeature -Name Server-Media-Foundation
$dll = Join-Path $env:SystemRoot "System32\mfplat.dll"
if (-not $feature.Installed -or -not (Test-Path $dll)) {
throw "Windows Media Foundation is unavailable (feature=$($feature.InstallState), mfplat=$((Test-Path $dll)))."
}
32 changes: 31 additions & 1 deletion .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Windows Media Foundation
if: runner.os == 'Windows'
shell: pwsh
working-directory: .
run: .github/scripts/ensure-windows-media-foundation.ps1

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -148,6 +154,7 @@ jobs:
sudo apt-get install -y \
cmake \
libasound2-dev \
libdbus-1-dev \
libdrm-dev \
libpulse-dev \
libva-dev \
Expand All @@ -165,7 +172,9 @@ jobs:

- name: Install Linux ARM64 cross compiler
if: matrix.label == 'linux-arm64'
run: sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-g++" >> "$GITHUB_ENV"

- name: Install Windows ARM64 compiler
if: matrix.native_target == 'aarch64-pc-windows-msvc'
Expand All @@ -189,14 +198,34 @@ jobs:
if (-not $compiler) {
throw "Visual Studio ARM64 compiler is unavailable after installation."
}
$linker = Join-Path $compiler.Directory.FullName "link.exe"
if (-not (Test-Path $linker)) {
throw "Visual Studio ARM64 linker is unavailable after installation."
}
"CARGO_TARGET_AARCH64_PC_WINDOWS_MSVC_LINKER=$linker" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "Using Windows ARM64 compiler: $($compiler.FullName)"
Write-Host "Using Windows ARM64 linker: $linker"

- name: Setup Windows ARM64 build tools
if: matrix.native_target == 'aarch64-pc-windows-msvc'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm64

- name: Install Windows LLVM
if: runner.os == 'Windows'
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
choco install llvm -y --no-progress
$llvmBin = Join-Path $env:ProgramFiles "LLVM\bin"
if (-not (Test-Path (Join-Path $llvmBin "clang.exe")) -or
-not (Test-Path (Join-Path $llvmBin "libclang.dll"))) {
throw "LLVM installation is missing libclang.dll"
}
$llvmBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"LIBCLANG_PATH=$llvmBin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Pin CMake for bundled SDL2
if: runner.os == 'macOS'
shell: bash
Expand Down Expand Up @@ -225,6 +254,7 @@ jobs:
run: npm run build

- name: Test and build native streamer v2
shell: bash
env:
OPENNOW_NATIVE_STREAMER_TARGET: ${{ matrix.native_target }}
OPENNOW_NATIVE_STREAMER_PLATFORM_KEY: ${{ matrix.native_platform_key }}
Expand Down
78 changes: 70 additions & 8 deletions .github/workflows/qt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- ".github/workflows/qt-ci.yml"
- ".github/workflows/qt-release-candidate.yml"
- ".github/actionlint.yaml"
- ".github/scripts/ensure-windows-media-foundation.ps1"
- "opennow-qt/**"
- "native/opennow-core/**"
- "native/opennow-streamer/**"
Expand All @@ -18,6 +19,7 @@ on:
- ".github/workflows/qt-ci.yml"
- ".github/workflows/qt-release-candidate.yml"
- ".github/actionlint.yaml"
- ".github/scripts/ensure-windows-media-foundation.ps1"
- "opennow-qt/**"
- "native/opennow-core/**"
- "native/opennow-streamer/**"
Expand All @@ -38,7 +40,8 @@ jobs:
matrix:
include:
- label: linux-x64
os: blacksmith-4vcpu-ubuntu-2404
os: blacksmith-8vcpu-ubuntu-2404
build-parallel: 6
qt-host: linux
qt-arch: linux_gcc_64
package-generator: DEB
Expand All @@ -48,7 +51,8 @@ jobs:
linuxdeploy-sha256: c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d
qt-plugin-sha256: 15106be885c1c48a021198e7e1e9a48ce9d02a86dd0a1848f00bdbf3c1c92724
- label: linux-arm64
os: blacksmith-4vcpu-ubuntu-2404-arm
os: blacksmith-8vcpu-ubuntu-2404-arm
build-parallel: 6
qt-host: linux_arm64
qt-arch: linux_gcc_arm64
package-generator: DEB
Expand All @@ -59,27 +63,31 @@ jobs:
qt-plugin-sha256: bf1c24aff6d749b5cf423afad6f15abd4440f81dec1aab95706b25f6667cdcf1
- label: windows-x64
os: blacksmith-4vcpu-windows-2025
build-parallel: 4
qt-host: windows
qt-arch: win64_msvc2022_64
package-generator: ZIP
rust-target: ""
cmake-arch: ""
- label: windows-arm64
os: blacksmith-4vcpu-windows-2025
build-parallel: 4
qt-host: windows
qt-arch: win64_msvc2022_arm64_cross_compiled
package-generator: ZIP
rust-target: aarch64-pc-windows-msvc
cmake-arch: ARM64
- label: macos-arm64
os: blacksmith-6vcpu-macos-15
build-parallel: 6
qt-host: mac
qt-arch: clang_64
package-generator: "DragNDrop;ZIP"
rust-target: aarch64-apple-darwin
cmake-arch: arm64
- label: macos-x64
os: blacksmith-6vcpu-macos-15
build-parallel: 6
qt-host: mac
qt-arch: clang_64
package-generator: "DragNDrop;ZIP"
Expand All @@ -94,6 +102,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Windows Media Foundation
if: runner.os == 'Windows'
shell: pwsh
run: .github/scripts/ensure-windows-media-foundation.ps1

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -121,14 +134,39 @@ jobs:
if ($install.ExitCode -notin 0, 3010) {
throw "Visual Studio ARM64 compiler installation failed with exit code $($install.ExitCode)."
}
$compiler = Get-ChildItem "$installPath\VC\Tools\MSVC\*\bin\Hostx64\arm64\cl.exe" -ErrorAction SilentlyContinue | Select-Object -First 1
}
if (-not $compiler) {
throw "Visual Studio ARM64 compiler is unavailable after installation."
}
$linker = Join-Path $compiler.Directory.FullName "link.exe"
if (-not (Test-Path $linker)) {
throw "Visual Studio ARM64 linker is unavailable after installation."
}
"CARGO_TARGET_AARCH64_PC_WINDOWS_MSVC_LINKER=$linker" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "Using Windows ARM64 compiler: $($compiler.FullName)"
Write-Host "Using Windows ARM64 linker: $linker"

- name: Setup Windows ARM64 build tools
if: matrix.label == 'windows-arm64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm64

- name: Install Windows LLVM
if: runner.os == 'Windows'
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
choco install llvm -y --no-progress
$llvmBin = Join-Path $env:ProgramFiles "LLVM\bin"
if (-not (Test-Path (Join-Path $llvmBin "clang.exe")) -or
-not (Test-Path (Join-Path $llvmBin "libclang.dll"))) {
throw "LLVM installation is missing libclang.dll"
}
$llvmBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"LIBCLANG_PATH=$llvmBin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install Windows host Qt tools
if: matrix.label == 'windows-arm64'
uses: jurplel/install-qt-action@v4
Expand Down Expand Up @@ -164,10 +202,14 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
libasound2-dev \
libdbus-1-dev \
libdrm-dev \
libgstreamer-plugins-bad1.0-0 \
libgstreamer-plugins-good1.0-0 \
libpulse-dev \
libsecret-1-dev \
libva-dev \
libvulkan-dev \
libx11-dev \
libxcursor-dev \
libxext-dev \
Expand Down Expand Up @@ -197,7 +239,7 @@ jobs:
-DSDL_TEST_LIBRARY=OFF \
-DSDL_TESTS=OFF \
"${SDL_CMAKE_ARGS[@]}"
cmake --build "$RUNNER_TEMP/SDL-build" --config Release --parallel
cmake --build "$RUNNER_TEMP/SDL-build" --config Release --parallel "${{ matrix.build-parallel }}"
cmake --install "$RUNNER_TEMP/SDL-build" --config Release --prefix "$RUNNER_TEMP/SDL-install"

- name: Rust format and lint
Expand All @@ -213,10 +255,24 @@ jobs:
if: runner.os == 'Linux'
shell: bash
run: |
case "$(uname -m)" in
x86_64)
actionlint_arch=amd64
actionlint_sha256=8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8
;;
aarch64)
actionlint_arch=arm64
actionlint_sha256=325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6
;;
*)
echo "Unsupported actionlint architecture: $(uname -m)" >&2
exit 1
;;
esac
curl --fail --location --retry 3 \
https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz \
"https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_${actionlint_arch}.tar.gz" \
--output "$RUNNER_TEMP/actionlint.tar.gz"
echo "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 $RUNNER_TEMP/actionlint.tar.gz" \
echo "$actionlint_sha256 $RUNNER_TEMP/actionlint.tar.gz" \
| sha256sum --check --strict
tar -xzf "$RUNNER_TEMP/actionlint.tar.gz" -C "$RUNNER_TEMP" actionlint
"$RUNNER_TEMP/actionlint" -color=false \
Expand Down Expand Up @@ -246,12 +302,12 @@ jobs:
fi
cmake -S opennow-qt -B build/opennow-qt-release \
-DCMAKE_BUILD_TYPE=Release \
-DSDL3_DIR="$RUNNER_TEMP/SDL-install/lib/cmake/SDL3" \
-DCMAKE_PREFIX_PATH="$RUNNER_TEMP/SDL-install" \
"${OPENNOW_CMAKE_ARGS[@]}"

- name: Build Qt release
shell: bash
run: cmake --build build/opennow-qt-release --config Release --parallel
run: cmake --build build/opennow-qt-release --config Release --parallel "${{ matrix.build-parallel }}"

- name: Test Qt shell
if: matrix.label != 'windows-arm64'
Expand All @@ -278,6 +334,7 @@ jobs:
LINUXDEPLOY_SHA256: ${{ matrix.linuxdeploy-sha256 }}
QT_PLUGIN_SHA256: ${{ matrix.qt-plugin-sha256 }}
run: |
export LD_LIBRARY_PATH="$RUNNER_TEMP/SDL-install/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
cmake --install build/opennow-qt-release --config Release \
--prefix "$PWD/build/AppDir/usr"
curl --fail --location --retry 3 \
Expand Down Expand Up @@ -314,6 +371,11 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: opennow-qt-${{ matrix.label }}-unsigned
path: build/qt-packages/*
path: |
build/qt-packages/*.AppImage
build/qt-packages/*.deb
build/qt-packages/*.dmg
build/qt-packages/*.zip
if-no-files-found: error
retention-days: 14
compression-level: 0
Loading
Loading