Skip to content

Commit

Permalink
.github: Update workflow action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
norihiro committed Aug 24, 2024
1 parent e242354 commit 164ee50
Showing 1 changed file with 22 additions and 42 deletions.
64 changes: 22 additions & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Download obs-studio development environment
id: obsdeps
uses: norihiro/obs-studio-devel-action@v1-beta
uses: norihiro/obs-studio-devel-action@v2
with:
obs: ${{ matrix.obs }}
verbose: true
Expand All @@ -47,39 +47,23 @@ jobs:
run: |
sudo apt update
sudo apt install -y libsamplerate0 libsamplerate0-dev
OBS_QT_VERSION_MAJOR=${{ steps.obsdeps.outputs.OBS_QT_VERSION_MAJOR }}
mkdir build
cd build
case ${{ matrix.obs }} in
27)
cmake_opt=(
-D CMAKE_INSTALL_LIBDIR=/usr/lib/
-D CPACK_DEBIAN_PACKAGE_DEPENDS='obs-studio (>= 27), obs-studio (<< 28)'
)
;;
28)
cmake_opt=(
-D CPACK_DEBIAN_PACKAGE_DEPENDS='obs-studio (>= 28)'
)
;;
esac
cmake .. \
-D QT_VERSION=$OBS_QT_VERSION_MAJOR \
cmake -S . -B build \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D LINUX_PORTABLE=OFF \
-D USE_ERIKD_LIBSAMPLERATE_DEPS=OFF \
-D USE_ERIKD_LIBSAMPLERATE_SYSTEM=ON \
-D CPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON \
-D PKG_SUFFIX=-obs${{ matrix.obs }}-${{ matrix.ubuntu }}-x86_64 \
"${cmake_opt[@]}"
${{ steps.obsdeps.outputs.PLUGIN_CMAKE_OPTIONS }}
cd build
make -j4
make package
echo "FILE_NAME=$(find $PWD -name '*.deb' | head -n 1)" >> $GITHUB_ENV
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifactName }}
name: ${{ env.artifactName }}-linux-obs${{ matrix.obs }}-${{ matrix.ubuntu }}
path: '${{ env.FILE_NAME }}'
- name: Check package
run: |
Expand All @@ -98,7 +82,7 @@ jobs:
ls /usr/share/obs/obs-plugins/${PLUGIN_NAME}/
macos_build:
runs-on: macos-12
runs-on: macos-14
strategy:
fail-fast: false
matrix:
Expand All @@ -112,7 +96,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -138,14 +122,14 @@ jobs:
- name: Install Apple Developer Certificate
if: ${{ github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
uses: apple-actions/import-codesign-certs@v2
with:
keychain-password: ${{ github.run_id }}
p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}

- name: Set Signing Identity
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' }}
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' && steps.setup.outputs.haveCodesignIdent == 'true' && steps.setup.outputs.haveNotarizationUser == 'true' }}
run: |
set -e
TEAM_ID=$(echo "${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}" | sed 's/.*(\([A-Za-z0-9]*\))$/\1/')
Expand All @@ -156,7 +140,7 @@ jobs:
- name: Download obs-studio development environment
id: obsdeps
uses: norihiro/obs-studio-devel-action@v1-beta
uses: norihiro/obs-studio-devel-action@v2
with:
path: /tmp/deps-${{ matrix.obs }}-${{ matrix.arch }}
arch: ${{ matrix.arch }}
Expand All @@ -169,23 +153,21 @@ jobs:
arch=${{ matrix.arch }}
deps=/tmp/deps-${{ matrix.obs }}-${{ matrix.arch }}
MACOSX_DEPLOYMENT_TARGET=${{ steps.obsdeps.outputs.MACOSX_DEPLOYMENT_TARGET }}
OBS_QT_VERSION_MAJOR=${{ steps.obsdeps.outputs.OBS_QT_VERSION_MAJOR }}
GIT_TAG=$(git describe --tags --always)
PKG_SUFFIX=-${GIT_TAG}-obs${{ matrix.obs }}-macos-${{ matrix.arch }}
set -e
case "${{ matrix.obs }}" in
27)
cmake_opt=()
;;
28)
28 | 30)
cmake_opt=(
-D MACOSX_PLUGIN_BUNDLE_TYPE=BNDL
-D OBS_BUNDLE_CODESIGN_IDENTITY='${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}'
)
;;
esac
cmake -S . -B build -G Ninja \
-D QT_VERSION=$OBS_QT_VERSION_MAJOR \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_PREFIX_PATH="$PWD/release/" \
-DCMAKE_OSX_ARCHITECTURES=${arch/#universal/x86_64;arm64} \
Expand All @@ -194,7 +176,8 @@ jobs:
-D USE_ERIKD_LIBSAMPLERATE_DEPS=ON \
-D USE_ERIKD_LIBSAMPLERATE_SYSTEM=OFF \
-D PKG_SUFFIX=$PKG_SUFFIX \
"${cmake_opt[@]}"
"${cmake_opt[@]}" \
${{ steps.obsdeps.outputs.PLUGIN_CMAKE_OPTIONS }}
cmake --build build --config RelWithDebInfo
- name: Prepare package
Expand Down Expand Up @@ -275,9 +258,9 @@ jobs:
verbose: true

- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifactName }}
name: ${{ env.artifactName }}-macos-obs${{ matrix.obs }}-${{ matrix.arch }}
path: package/*

windows_build:
Expand All @@ -295,12 +278,12 @@ jobs:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download obs-studio
id: obsdeps
uses: norihiro/obs-studio-devel-action@v1-beta
uses: norihiro/obs-studio-devel-action@v2
with:
obs: ${{ matrix.obs }}
qt: ${{ env.qt }}
Expand All @@ -309,14 +292,11 @@ jobs:
run: |
$CmakeArgs = @(
'-G', "${{ env.visualStudio }}"
'-DQT_VERSION=${{ steps.obsdeps.outputs.OBS_QT_VERSION_MAJOR }}'
'-DCMAKE_SYSTEM_VERSION=10.0.18363.657'
"-DCMAKE_INSTALL_PREFIX=$(Resolve-Path -Path "./obs-build-dependencies/plugin-deps-${{ matrix.arch }}")"
"-DCMAKE_PREFIX_PATH=$(Resolve-Path -Path "./obs-build-dependencies/plugin-deps-${{ matrix.arch }}")"
"-DUSE_ERIKD_LIBSAMPLERATE_DEPS=ON"
"-DUSE_ERIKD_LIBSAMPLERATE_SYSTEM=OFF"
)
cmake -S . -B build @CmakeArgs
cmake -S . -B build ${{ steps.obsdeps.outputs.PLUGIN_CMAKE_OPTIONS_PS }} @CmakeArgs
cmake --build build --config RelWithDebInfo -j 4
cmake --install build --config RelWithDebInfo --prefix "$(Resolve-Path -Path .)/release"
Expand All @@ -325,7 +305,7 @@ jobs:
run: ci/windows/package-windows.sh ${{ matrix.obs }}

- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifactName }}
name: ${{ env.artifactName }}-windows-obs${{ matrix.obs }}-${{ matrix.arch }}
path: package/*

0 comments on commit 164ee50

Please sign in to comment.