Skip to content

Commit

Permalink
CI: Update workflow to package dSYMs
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheMav committed Jun 4, 2023
1 parent 178a98d commit 39b49e4
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 123 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Build Windows Dependencies'
description: 'Builds Windows dependencies for obs-deps with specified architecture, type, and build config'
name: 'Build Dependencies'
description: 'Builds dependencies for obs-deps with specified architecture, type, and build config'
inputs:
target:
description: 'Build target for dependencies'
Expand All @@ -21,18 +21,25 @@ runs:
steps:
- name: Environment Setup
id: env-setup
shell: pwsh
shell: bash
working-directory: ${{ inputs.workingDirectory }}
run: |
# Environment Setup
$Content = Get-Content ${{ inputs.workingDirectory }}/deps.windows/*.ps1
$Sha256Hasher = [System.Security.Cryptography.HashAlgorithm]::Create('sha256')
$ContentHash = $Sha256Hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($Content))
: Environment Setup
case "${RUNNER_OS}" in
macOS)
if ! type sha256sum > /dev/null 2>&1; then
brew install coreutils
fi
deps_hash=$(cat ${PWD}/deps.macos/*.zsh | sha256sum | cut -d " " -f 1)
;;
Windows)
deps_hash=$(cat ${PWD}/deps.windows/*.ps1 | sha256sum | cut -d " " -f 1)
;;
esac
"hash=$([System.BitConverter]::ToString($ContentHash).Replace('-','').SubString(0,9).ToLower())" >> $env:GITHUB_OUTPUT
echo "hash=${deps_hash:0:9}" >> $GITHUB_OUTPUT
- name: Restore Windows Dependencies from Cache
- name: Restore Dependencies from Cache
id: deps-cache
uses: actions/cache/restore@v3
with:
Expand All @@ -42,12 +49,30 @@ runs:
!${{ inputs.workingDirectory }}/*_build_temp/*.tar.gz
!${{ inputs.workingDirectory }}/*_build_temp/*.tar.xz
!${{ inputs.workingDirectory }}/*_build_temp/*.zip
!${{ inputs.workingDirectory }}/*_build_temp/qt*
key: ${{ inputs.target }}-deps-${{ inputs.type }}-${{ inputs.config }}-${{ steps.env-setup.outputs.hash }}

- name: Install Windows Dependencies
- name: Build and Install Dependencies
if: runner.os == 'macOS'
shell: zsh --no-rcs --errexit --pipefail {0}
run: |
: Build and Install macOS Dependencies
local -a build_args=(
--target ${{ inputs.target }}
--config ${{ inputs.config }}
--${{ inputs.type }}
)
if [[ '${{ steps.ffmpeg-cache.outputs.cache-hit }}' == 'true' ]] build_args+=(--skip-build --skip-unpack)
./build-deps.zsh ${build_args}
- name: Build and Install Dependencies
if: runner.os == 'Windows'
shell: pwsh
run: |
# Install Windows Dependencies
# Build and Install Windows Dependencies
$Params = @{
Target = '${{ inputs.target }}'
Expand All @@ -59,14 +84,15 @@ runs:
./Build-Dependencies.ps1 @Params
- name: Save Windows Dependencies to Cache
uses: actions/cache/save@v3
- name: Save Dependencies to Cache
if: github.event_name == 'push'
uses: actions/cache/save@v3
with:
path: |
${{ inputs.workingDirectory }}/*_build_temp/*
!${{ inputs.workingDirectory }}/*_build_temp/**/.git
!${{ inputs.workingDirectory }}/*_build_temp/*.tar.gz
!${{ inputs.workingDirectory }}/*_build_temp/*.tar.xz
!${{ inputs.workingDirectory }}/*_build_temp/*.zip
!${{ inputs.workingDirectory }}/*_build_temp/qt*
key: ${{ inputs.target }}-deps-${{ inputs.type }}-${{ inputs.config }}-${{ steps.env-setup.outputs.hash }}
63 changes: 0 additions & 63 deletions .github/actions/build-macos-deps/action.yml

This file was deleted.

Loading

0 comments on commit 39b49e4

Please sign in to comment.