CI: update artifact actions to v4 #203
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: 'Mac/Linux CI' | |
on: | |
push: | |
paths-ignore: ['**.md'] | |
pull_request: | |
paths-ignore: ['**.md'] | |
workflow_dispatch: | |
inputs: | |
publish: | |
description: 'Publish Release' | |
required: true | |
type: boolean | |
tagname: | |
description: 'Tag Name' | |
required: false | |
type: string | |
jobs: | |
macosarm64: | |
name: 'MacOS Arm64' | |
runs-on: macos-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'Extract obs-deps' | |
run: | | |
mkdir ${{github.workspace}}/deps/obs-deps | |
tar -C ${{github.workspace}}/deps/obs-deps -x -f ${{github.workspace}}/CI/deps/macos-deps-2022-08-02-arm64.tar.xz | |
- name: 'Checkout obs-studio' | |
uses: actions/checkout@v4 | |
with: | |
repository: 'obsproject/obs-studio' | |
submodules: recursive | |
path: 'deps/obs-studio' | |
ref: '28.1.2' | |
- name: 'OBS Cmake' | |
run: cmake -B ${{github.workspace}}/deps/obs-studio/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="arm64" -DENABLE_PLUGINS=OFF -DDISABLE_UI=ON -DENABLE_UI=OFF -DCOMPILE_PYTHON=OFF -DDISABLE_PYTHON=ON -DENABLE_SCRIPTING=OFF -DBUILD_BROWSER=OFF -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/deps/obs-deps" ${{github.workspace}}/deps/obs-studio | |
- name: 'Build OBS' | |
run: | | |
cmake --build ${{github.workspace}}/deps/obs-studio/build --config=Release | |
cmake --install ${{github.workspace}}/deps/obs-studio/build --config=Release | |
- name: 'Cmake' | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="arm64" -DMAKE_BUNDLE=ON -DDISABLE_X86_SIMD=ON -DBUILTIN_FFTW=ON -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps;${{github.workspace}}/deps/obs-studio/build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/bin" | |
- name: 'Build' | |
run: | | |
cmake --build ${{github.workspace}}/build --config=RelWithDebInfo | |
cmake --install ${{github.workspace}}/build --config=RelWithDebInfo | |
- name: 'Package' | |
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request' | |
run: cmake --build ${{github.workspace}}/build --config=RelWithDebInfo --target package | |
- name: 'Upload' | |
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Waveform_${{github.ref_name}}_MacOS_arm64 | |
path: ${{github.workspace}}/build/*.pkg | |
macos64: | |
name: 'MacOS x64' | |
runs-on: macos-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'Extract obs-deps' | |
run: | | |
mkdir ${{github.workspace}}/deps/obs-deps | |
tar -C ${{github.workspace}}/deps/obs-deps -x -f ${{github.workspace}}/CI/deps/macos-deps-2022-08-02-x86_64.tar.xz | |
- name: 'Checkout obs-studio' | |
uses: actions/checkout@v4 | |
with: | |
repository: 'obsproject/obs-studio' | |
submodules: recursive | |
path: 'deps/obs-studio' | |
ref: '28.1.2' | |
- name: 'OBS Cmake' | |
run: cmake -B ${{github.workspace}}/deps/obs-studio/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="x86_64" -DENABLE_PLUGINS=OFF -DDISABLE_UI=ON -DENABLE_UI=OFF -DCOMPILE_PYTHON=OFF -DDISABLE_PYTHON=ON -DENABLE_SCRIPTING=OFF -DBUILD_BROWSER=OFF -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/deps/obs-deps" ${{github.workspace}}/deps/obs-studio | |
- name: 'Build OBS' | |
run: | | |
cmake --build ${{github.workspace}}/deps/obs-studio/build --config=Release | |
cmake --install ${{github.workspace}}/deps/obs-studio/build --config=Release | |
- name: 'Cmake' | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="x86_64" -DMAKE_BUNDLE=ON -DBUILTIN_FFTW=ON -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps;${{github.workspace}}/deps/obs-studio/build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/bin" | |
- name: 'Build' | |
run: | | |
cmake --build ${{github.workspace}}/build --config=RelWithDebInfo | |
cmake --install ${{github.workspace}}/build --config=RelWithDebInfo | |
- name: 'Package' | |
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request' | |
run: cmake --build ${{github.workspace}}/build --config=RelWithDebInfo --target package | |
- name: 'Upload' | |
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Waveform_${{github.ref_name}}_MacOS_x86_64 | |
path: ${{github.workspace}}/build/*.pkg | |
ubuntu64: | |
name: 'Ubuntu x64' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'Install dependencies' | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get install -y libobs-dev libfftw3-dev | |
- name: 'Cmake' | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTATIC_FFTW=ON -DMAKE_DEB=ON -DCMAKE_INSTALL_PREFIX=/usr | |
- name: 'Build' | |
working-directory: ${{github.workspace}}/build | |
run: make | |
- name: 'Package' | |
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request' | |
working-directory: ${{github.workspace}}/build | |
run: make package | |
- name: 'Upload' | |
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Waveform_${{github.ref_name}}_Ubuntu_x86_64 | |
path: ${{github.workspace}}/build/*.deb | |
publish_release: | |
if: ((github.ref_type == 'tag') || (inputs.publish == true)) && github.event_name != 'pull_request' | |
needs: [macosarm64, macos64, ubuntu64] | |
name: 'Publish Release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
- name: 'Download artifacts' | |
uses: actions/download-artifact@v4 | |
with: | |
path: ${{github.workspace}}/assets | |
- name: 'Publish' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{github.workspace}}/assets/*/*.deb | |
${{github.workspace}}/assets/*/*.pkg | |
body_path: ${{github.workspace}}/changelog.md | |
tag_name: ${{inputs.publish && inputs.tagname || github.ref_name}} | |
name: ${{inputs.publish && inputs.tagname || github.ref_name}} | |
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') }} |