update qt #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build_deps | |
on: | |
push: | |
branches: | |
- streamlabs | |
tags: | |
- '20[2-9][0-9]-[0-9][0-9]-[0-9][0-9]*' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
branches: | |
- streamlabs | |
jobs: | |
ffmpeg-build: | |
name: 'Build FFmpeg' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [macos-arm64, macos-x86_64, linux-x86_64, windows-x64, windows-x86] | |
include: | |
- target: macos-arm64 | |
os: 'macos-12' | |
config: 'Release' | |
type: 'static' | |
revision: 9 | |
- target: macos-x86_64 | |
os: 'macos-12' | |
config: 'Release' | |
type: 'static' | |
revision: 9 | |
- target: linux-x86_64 | |
os: 'ubuntu-20.04' | |
config: 'Release' | |
type: 'static' | |
revision: 9 | |
- target: windows-x64 | |
os: 'ubuntu-20.04' | |
config: 'Release' | |
type: 'static' | |
revision: 8 | |
- target: windows-x86 | |
os: 'ubuntu-20.04' | |
config: 'Release' | |
type: 'static' | |
revision: 8 | |
env: | |
CACHE_REVISION: ${{ matrix.revision }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Environment | |
id: setup | |
run: | | |
case "${{ runner.os }}" in | |
Linux) | |
sudo apt update | |
sudo apt install zsh | |
;; | |
macOS) | |
to_remove=() | |
for formula in llvm gcc postgresql openjdk sox libsndfile flac libvorbis opusfile \ | |
libogg composer php gd freetype fontconfig webp libpng lame libtiff opus kotlin \ | |
sbt libxft libxcb; do | |
if [[ -d /usr/local/opt/"${formula}" ]]; then | |
to_remove+=(${formula}) | |
fi | |
done | |
if [[ ${#to_remove} -gt 0 ]]; then | |
brew uninstall --ignore-dependencies ${to_remove[@]} | |
fi | |
;; | |
esac | |
target='${{ matrix.target }}' | |
artifact_name="ffmpeg-${target}-${{ github.sha }}" | |
file_name="${target%%-*}-ffmpeg-${{ github.sha }}-${target##*-}.tar.xz" | |
echo "artifactName=${artifact_name}" >> $GITHUB_OUTPUT | |
echo "artifactFileName=${file_name}" >> $GITHUB_OUTPUT | |
echo "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT | |
- name: Restore Compilation Cache | |
id: ccache-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.ccache | |
key: ${{ matrix.target }}-ccache-ffmpeg-${{ steps.setup.outputs.ccacheDate }} | |
restore-keys: | | |
${{ matrix.target }}-ccache-ffmpeg- | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Build FFmpeg | |
uses: ./.github/actions/build-ffmpeg | |
with: | |
target: ${{ matrix.target }} | |
type: ${{ matrix.type }} | |
config: ${{ matrix.config }} | |
cacheRevision: ${{ env.CACHE_REVISION }} | |
env: | |
github_hash: ${{ github.sha }} | |
- name: Publish Build Artifacts | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.setup.outputs.artifactName }} | |
path: ${{ github.workspace }}/${{ matrix.target }}/${{ steps.setup.outputs.artifactFileName }} | |
ffmpeg-package-universal: | |
name: 'Build FFmpeg (Universal)' | |
runs-on: macos-12 | |
needs: [ffmpeg-build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create universal binary package | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: ./.github/actions/create-universal | |
with: | |
arm64: 'ffmpeg-macos-arm64-${{ github.sha }}' | |
x86_64: 'ffmpeg-macos-x86_64-${{ github.sha }}' | |
outputName: 'ffmpeg-macos-universal-${{ github.sha }}' | |
macos-build: | |
name: 'Build macOS Dependencies' | |
runs-on: macos-12 | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [macos-arm64, macos-x86_64] | |
include: | |
- target: macos-arm64 | |
config: 'Release' | |
type: 'static' | |
- target: macos-x86_64 | |
config: 'Release' | |
type: 'static' | |
env: | |
CACHE_REVISION: '3' | |
defaults: | |
run: | |
shell: zsh {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Environment | |
id: setup | |
run: | | |
to_remove=() | |
for formula (llvm gcc) { | |
if [[ -d /usr/local/opt/"${formula}" ]] to_remove+=(${formula}) | |
} | |
if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove} | |
target='${{ matrix.target }}' | |
artifact_name="deps-${target}-${{ github.sha }}" | |
file_name="${target%%-*}-deps-${{ github.sha }}-${target##*-}.tar.xz" | |
echo "artifactName=${artifact_name}" >> $GITHUB_OUTPUT | |
echo "artifactFileName=${file_name}" >> $GITHUB_OUTPUT | |
echo "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT | |
- name: Restore Compilation Cache | |
id: ccache-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.ccache | |
key: ${{ matrix.target }}-ccache-deps-${{ steps.setup.outputs.ccacheDate }} | |
restore-keys: | | |
${{ matrix.target }}-ccache-deps- | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Build macOS Dependencies | |
uses: ./.github/actions/build-macos-deps | |
with: | |
target: ${{ matrix.target }} | |
type: ${{ matrix.type }} | |
config: ${{ matrix.config }} | |
cacheRevision: ${{ env.CACHE_REVISION }} | |
- name: Publish Build Artifacts | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.setup.outputs.artifactName }} | |
path: ${{ github.workspace }}/${{ matrix.target }}/${{ steps.setup.outputs.artifactFileName }} | |
macos-package-universal: | |
name: 'Build macOS Dependencies (Universal)' | |
runs-on: macos-12 | |
needs: [macos-build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create universal binary package | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: ./.github/actions/create-universal | |
with: | |
arm64: 'deps-macos-arm64-${{ github.sha }}' | |
x86_64: 'deps-macos-x86_64-${{ github.sha }}' | |
outputName: 'deps-macos-universal-${{ github.sha }}' | |
macos-qt5-build: | |
name: 'Build macOS Qt5' | |
runs-on: macos-12 | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [macos-arm64, macos-x86_64] | |
include: | |
- target: macos-x86_64 | |
config: 'Release' | |
- target: macos-arm64 | |
config: 'Release' | |
env: | |
CACHE_REVISION: '3' | |
defaults: | |
run: | |
shell: zsh {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Environment | |
id: setup | |
run: | | |
to_remove=() | |
for formula (llvm gcc) { | |
if [[ -d /usr/local/opt/"${formula}" ]] to_remove+=(${formula}) | |
} | |
if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove} | |
target='${{ matrix.target }}' | |
artifact_name="qt5-${target}-${{ github.sha }}" | |
file_name="${target%%-*}-deps-qt5-${{ github.sha }}-${target##*-}.tar.xz" | |
echo "artifactName=${artifact_name}" >> $GITHUB_OUTPUT | |
echo "artifactFileName=${file_name}" >> $GITHUB_OUTPUT | |
echo "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT | |
- name: Restore Compilation Cache | |
id: ccache-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.ccache | |
key: ${{ matrix.target }}-ccache-qt5-${{ steps.setup.outputs.ccacheDate }} | |
restore-keys: | | |
${{ matrix.target }}-ccache-qt5- | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Build macOS Qt5 | |
uses: ./.github/actions/build-macos-qt | |
with: | |
target: ${{ matrix.target }} | |
config: ${{ matrix.config }} | |
qtVersion: 5 | |
cacheRevision: ${{ env.CACHE_REVISION }} | |
env: | |
github_hash: ${{ github.sha }} | |
- name: Publish Build Artifacts | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.setup.outputs.artifactName }} | |
path: ${{ github.workspace }}/${{ matrix.target }}/${{ steps.setup.outputs.artifactFileName }} | |
macos-qt5-package-universal: | |
name: 'Build macOS Qt5 (Universal)' | |
runs-on: macos-12 | |
needs: [macos-qt5-build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create universal binary package | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: ./.github/actions/create-universal | |
with: | |
arm64: 'qt5-macos-arm64-${{ github.sha }}' | |
x86_64: 'qt5-macos-x86_64-${{ github.sha }}' | |
outputName: 'qt5-macos-universal-${{ github.sha }}' | |
macos-qt6-build: | |
name: 'Build macOS Qt6' | |
runs-on: macos-12 | |
env: | |
CACHE_REVISION: '1' | |
defaults: | |
run: | |
shell: zsh {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Environment | |
id: setup | |
run: | | |
to_remove=() | |
for formula (llvm gcc) { | |
if [[ -d /usr/local/opt/"${formula}" ]] to_remove+=(${formula}) | |
} | |
if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove} | |
target='macos-universal' | |
artifact_name="qt6-${target}-${{ github.sha }}" | |
file_name="${target%%-*}-deps-qt6-${{ github.sha }}-${target##*-}.tar.xz" | |
echo "artifactName=${artifact_name}" >> $GITHUB_OUTPUT | |
echo "artifactFileName=${file_name}" >> $GITHUB_OUTPUT | |
echo "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT | |
- name: Restore Compilation Cache | |
id: ccache-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.ccache | |
key: macos-universal-ccache-qt6-${{ steps.setup.outputs.ccacheDate }} | |
restore-keys: | | |
macos-universal-ccache-qt6- | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Build macOS Qt6 | |
uses: ./.github/actions/build-macos-qt | |
with: | |
target: macos-universal | |
config: Release | |
qtVersion: 6 | |
cacheRevision: ${{ env.CACHE_REVISION }} | |
env: | |
github_hash: ${{ github.sha }} | |
- name: Publish Build Artifacts | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.setup.outputs.artifactName }} | |
path: ${{ github.workspace }}/macos-universal/${{ steps.setup.outputs.artifactFileName }} | |
macos-qt6-package: | |
name: 'Build macOS Qt6 (${{ matrix.target }})' | |
runs-on: macos-12 | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [macos-arm64, macos-x86_64] | |
include: | |
- target: macos-x86_64 | |
config: 'Release' | |
- target: macos-arm64 | |
config: 'Release' | |
needs: [macos-qt6-build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for GitHub Labels | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.RELEASE_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then | |
echo "found=true" >> $GITHUB_OUTPUT | |
else | |
echo "found=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create single architecture binary package | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: ./.github/actions/create-single-arch | |
with: | |
base: 'qt6-macos-universal-${{ github.sha }}' | |
target: '${{ matrix.target }}' | |
outputName: 'qt6-${{ matrix.target }}-${{ github.sha }}' | |
windows-build: | |
name: 'Build Windows Dependencies' | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [x64, x86] | |
include: | |
- target: x64 | |
config: 'Release' | |
type: 'static' | |
- target: x86 | |
config: 'Release' | |
type: 'static' | |
env: | |
CACHE_REVISION: '3' | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Environment | |
id: setup | |
run: | | |
$Target='${{ matrix.target }}' | |
$ArtifactName="deps-windows-${Target}-${{ github.sha }}" | |
$FileName="windows-deps-$(Get-Date -Format 'yyyy-MM-dd')-${Target}.zip" | |
"artifactName=${ArtifactName}" >> $env:GITHUB_OUTPUT | |
"artifactFileName=${FileName}" >> $env:GITHUB_OUTPUT | |
- name: 'Check for GitHub Labels' | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
$LabelFound = try { | |
$Params = @{ | |
Authentication = 'Bearer' | |
Token = (ConvertTo-SecureString '${{ secrets.RELEASE_TOKEN }}' -AsPlainText) | |
Uri = '${{ github.event.pull_request.url }}' | |
UseBasicParsing = $true | |
} | |
(Invoke-RestMethod @Params).labels.name.contains("Seeking Testers") | |
} catch { | |
$false | |
} | |
"found=$(([string]${LabelFound}).ToLower())" >> $env:GITHUB_OUTPUT | |
- name: Build ntv2 debug | |
shell: pwsh | |
run: | | |
$Params = @{ | |
Target = '${{ matrix.target }}' | |
Configuration = 'Debug' | |
Dependencies = 'ntv2' | |
} | |
if ( '${{ matrix.type }}' -eq 'shared' ) { $Params += @{Shared = $true} } | |
./Build-Dependencies.ps1 @Params | |
Remove-Item -Recurse -Force ${{ github.workspace }}/windows_build_temp | |
- name: Build Windows Dependencies | |
uses: ./.github/actions/build-windows-deps | |
with: | |
target: ${{ matrix.target }} | |
type: ${{ matrix.type }} | |
config: ${{ matrix.config }} | |
cacheRevision: ${{ env.CACHE_REVISION }} | |
- name: Publish Build Artifacts | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.setup.outputs.artifactName }} | |
path: ${{ github.workspace }}\windows\${{ steps.setup.outputs.artifactFileName }} | |
windows-qt-build: | |
name: 'Build Windows Qt' | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: true | |
matrix: | |
qtVersion: [5, 6] | |
target: [x64, x86] | |
config: ['RelWithDebInfo', 'Debug'] | |
env: | |
CACHE_REVISION: '02' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Environment | |
id: setup | |
run: | | |
$ArtifactName="qt${{ matrix.qtVersion }}-windows-${{ matrix.target }}-${{ matrix.config }}-${{ github.sha }}" | |
$FileName="windows-deps-qt${{ matrix.qtVersion }}-$(Get-Date -Format 'yyyy-MM-dd')-${{ matrix.target }}-${{ matrix.config }}.zip" | |
"artifactName=${ArtifactName}" >> $env:GITHUB_OUTPUT | |
"artifactFileName=${FileName}" >> $env:GITHUB_OUTPUT | |
- name: 'Check for GitHub Labels' | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
$LabelFound = try { | |
$Params = @{ | |
Authentication = 'Bearer' | |
Token = (ConvertTo-SecureString '${{ secrets.RELEASE_TOKEN }}' -AsPlainText) | |
Uri = '${{ github.event.pull_request.url }}' | |
UseBasicParsing = $true | |
} | |
(Invoke-RestMethod @Params).labels.name.contains("Seeking Testers") | |
} catch { | |
$false | |
} | |
"found=$(([string]${LabelFound}).ToLower())" >> $env:GITHUB_OUTPUT | |
- name: 'Build Windows Qt' | |
uses: ./.github/actions/build-windows-qt | |
with: | |
target: ${{ matrix.target }} | |
config: ${{ matrix.config }} | |
qtVersion: ${{ matrix.qtVersion }} | |
cacheRevision: ${{ env.CACHE_REVISION }} | |
- name: 'Publish Build Artifacts' | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.setup.outputs.artifactName }} | |
path: ${{ github.workspace }}/windows/${{ steps.setup.outputs.artifactFileName }} | |
windows-qt-package: | |
name: 'Package Windows Qt (${{ matrix.qtVersion }}, ${{ matrix.target }})' | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: true | |
matrix: | |
qtVersion: [5, 6] | |
target: [x64, x86] | |
needs: [windows-qt-build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: 'Check for GitHub Labels' | |
id: seekingTesters | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
$LabelFound = try { | |
$Params = @{ | |
Authentication = 'Bearer' | |
Token = (ConvertTo-SecureString '${{ secrets.RELEASE_TOKEN }}' -AsPlainText) | |
Uri = '${{ github.event.pull_request.url }}' | |
UseBasicParsing = $true | |
} | |
(Invoke-RestMethod @Params).labels.name.contains("Seeking Testers") | |
} catch { | |
$false | |
} | |
"found=$(([string]${LabelFound}).ToLower())" >> $env:GITHUB_OUTPUT | |
- name: Create Windows Qt package | |
if: ${{ success() && (github.event_name != 'pull_request' || steps.seekingTesters.outputs.found == 'true') }} | |
uses: ./.github/actions/package-windows-qt | |
with: | |
base: 'qt${{ matrix.qtVersion }}-windows-${{ matrix.target }}' | |
outputName: 'qt${{ matrix.qtVersion }}-windows-${{ matrix.target }}-${{ github.sha }}' | |
make-release: | |
name: 'Create and upload release' | |
env: | |
RELEASE_BUCKET: "obs-studio-deployment" | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
needs: [ffmpeg-package-universal, macos-package-universal, macos-qt5-package-universal, macos-qt6-package, windows-build, windows-qt-package] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Get Metadata | |
id: metadata | |
run: | | |
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: 'Download build artifacts' | |
uses: actions/download-artifact@v3 | |
- name: 'Package Windows dependencies' | |
run: | | |
shopt -s extglob | |
for arch in x64 x86; do | |
_temp=$(mktemp -d) | |
pushd "${_temp}" > /dev/null | |
for artifact in ${{ github.workspace }}/**/windows-@(deps|ffmpeg)-!(qt5*|qt6*)-${arch}.*; do | |
case ${artifact} in | |
*.zip) unzip ${artifact} > /dev/null ;; | |
*.tar.xz) XZ_OPT=-T0 tar -xJf ${artifact} ;; | |
*.tar.gz) tar -xzf ${artifact} ;; | |
esac | |
done | |
zip -r windows-deps-${{ steps.metadata.outputs.version }}-${arch}.zip -- * | |
mv windows-deps-${{ steps.metadata.outputs.version }}-${arch}.zip ${{ github.workspace }} | |
mv ${{ github.workspace }}/qt5-windows-${arch}-!(RelWithDebInfo*|Debug*)/*.zip ${{ github.workspace }} | |
mv ${{ github.workspace }}/qt6-windows-${arch}-!(RelWithDebInfo*|Debug*)/*.zip ${{ github.workspace }} | |
popd > /dev/null | |
done | |
- name: 'Package Linux dependencies' | |
run: | | |
shopt -s extglob | |
for arch in x86_64; do | |
_temp=$(mktemp -d) | |
pushd "${_temp}" > /dev/null | |
for artifact in ${{ github.workspace }}/**/linux-*-${arch}.*; do | |
case ${artifact} in | |
*.zip) unzip ${artifact} > /dev/null ;; | |
*.tar.xz) XZ_OPT=-T0 tar -xvJf ${artifact} ;; | |
*.tar.gz) tar -xvzf ${artifact} ;; | |
esac | |
done | |
XZ_OPT=-T0 tar -cvJf linux-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz -- * | |
mv linux-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz ${{ github.workspace }} | |
popd > /dev/null | |
done | |
- name: 'Package macOS dependencies' | |
run: | | |
shopt -s extglob | |
for arch in arm64 x86_64 universal; do | |
_temp=$(mktemp -d) | |
pushd "${_temp}" > /dev/null | |
for artifact in ${{ github.workspace }}/**/macos-@(deps|ffmpeg)-!(qt5*|qt6*)-${arch}.*; do | |
case ${artifact} in | |
*.zip) unzip ${artifact} > /dev/null ;; | |
*.tar.xz) XZ_OPT=-T0 tar -xvJf ${artifact} ;; | |
*.tar.gz) tar -xvzf ${artifact} ;; | |
esac | |
done | |
XZ_OPT=-T0 tar -cvJf macos-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz -- * | |
mv macos-deps-${{ steps.metadata.outputs.version }}-${arch}.tar.xz ${{ github.workspace }} | |
popd > /dev/null | |
mv ${{ github.workspace }}/qt5-macos-${arch}-*/*.tar.xz ${{ github.workspace }}/macos-deps-qt5-${{ steps.metadata.outputs.version }}-${arch}.tar.xz | |
mv ${{ github.workspace }}/qt6-macos-${arch}-*/*.tar.xz ${{ github.workspace }}/macos-deps-qt6-${{ steps.metadata.outputs.version }}-${arch}.tar.xz | |
done | |
- name: 'Generate Checksums' | |
run: | | |
shopt -s extglob | |
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt | |
for file in ${{ github.workspace }}/@(*.tar.xz|*.zip); do | |
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt | |
done | |
- name: 'Create Release' | |
id: create_release | |
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 | |
with: | |
draft: false | |
prerelease: false | |
tag_name: ${{ steps.metadata.outputs.version }} | |
name: "OBS Deps Build ${{ steps.metadata.outputs.version }}" | |
body_path: ${{ github.workspace }}/CHECKSUMS.txt | |
files: | | |
${{ github.workspace }}/windows-*-x64*.zip | |
${{ github.workspace }}/windows-*-x86*.zip | |
${{ github.workspace }}/macos-*-arm64.tar.xz | |
${{ github.workspace }}/macos-*-x86_64.tar.xz | |
${{ github.workspace }}/macos-*-universal.tar.xz | |
${{ github.workspace }}/linux-*-x86_64.tar.xz | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
aws-access-key-id: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}} | |
aws-secret-access-key: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}} | |
aws-region: us-west-2 | |
- name: Upload to S3 | |
run: aws s3 sync ${{ github.workspace }} s3://${{env.RELEASE_BUCKET}} --acl public-read --exclude "*" --include "windows-*.zip" --include "macos-*.tar.xz" |