Bump electron from 29.4.3 to 39.8.5 #1602
Workflow file for this run
This file contains hidden or 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: 'CI Multiplatform Build' | |
| permissions: | |
| contents: read | |
| checks: write | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| branches: [ "staging" ] | |
| tags: | |
| - '*' | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| branches: [ "staging" ] | |
| env: | |
| InstallPath: "obs-studio-node" | |
| SLBUILDDIRECTORY: "streamlabs-build.app" # The .app extension is required to run macOS tests correctly. | |
| RELEASE_BUCKET: "obsstudionodes3.streamlabs.com" | |
| RuntimeURL: https://artifacts.electronjs.org/headers/dist | |
| RuntimeName: iojs | |
| ElectronVersion: 29.4.3 | |
| SLGenerator: Visual Studio 17 2022 | |
| SLDistributeDirectory: distribute | |
| SLFullDistributePath: "streamlabs-build.app/distribute" # The .app extension is required to run macOS tests correctly. | |
| LibOBSVersion: 31.1.2sl11 | |
| PACKAGE_NAME: osn | |
| jobs: | |
| build-macos: | |
| name: 'Build macOS' | |
| runs-on: ${{ matrix.image }} | |
| strategy: | |
| matrix: | |
| BuildReleases: [Release-x86_64, Release-arm64] | |
| include: | |
| - BuildReleases: Release-x86_64 | |
| image: macos-15-intel | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: x86_64 | |
| - BuildReleases: Release-arm64 | |
| image: macos-14 | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: arm64 | |
| env: | |
| OS_TAG: "osx" | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
| shell: bash | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies | |
| shell: bash | |
| run: './ci/install-dependencies-osx.sh' | |
| - name: 'Configure obs-studio-node' | |
| shell: bash | |
| run: './ci/configure-osn-osx.sh' | |
| env: | |
| BUILD_CONFIG: ${{matrix.BuildConfig}} | |
| RELEASE_NAME: ${{matrix.ReleaseName}} | |
| ARCHITECTURE: ${{matrix.Architecture}} | |
| tagartifact: ${{ steps.get_version.outputs.VERSION }} | |
| - name: 'Build obs-studio-node' | |
| run: ./ci/build-osn-osx.sh | |
| shell: bash | |
| env: | |
| BUILD_CONFIG: ${{matrix.BuildConfig}} | |
| SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}} | |
| - name: Put version into package.json | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: node ci/bump-version.js "${{ steps.get_version.outputs.VERSION }}" "${{env.PACKAGE_PATH}}" | |
| env: | |
| PACKAGE_PATH: "${{env.SLFullDistributePath}}/${{env.InstallPath}}" | |
| - name: Package compiled artifacts | |
| run: | | |
| tar -cvzf build-artifacts.tar.gz -C "${{env.SLBUILDDIRECTORY}}" . | |
| - name: Upload compiled artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts-mac-${{matrix.Architecture}} | |
| path: | | |
| build-artifacts.tar.gz | |
| tests/osn-tests/osn/index.ts | |
| run-tests-macos: | |
| name: 'Run macOS Tests' | |
| needs: build-macos | |
| runs-on: ${{ matrix.image }} | |
| strategy: | |
| matrix: | |
| BuildReleases: [Release-x86_64, Release-arm64] | |
| include: | |
| - BuildReleases: Release-x86_64 | |
| image: macos-15-intel | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: x86_64 | |
| - BuildReleases: Release-arm64 | |
| image: macos-14 | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: arm64 | |
| env: | |
| OS_TAG: "osx" | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies | |
| shell: bash | |
| run: './ci/install-dependencies-osx.sh' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-mac-${{matrix.Architecture}} | |
| path: . | |
| - name: Extract artifacts | |
| run: | | |
| mkdir -p "${{env.SLBUILDDIRECTORY}}" | |
| tar -xvzf build-artifacts.tar.gz -C "${{env.SLBUILDDIRECTORY}}" | |
| - name: 'Run tests' | |
| # `id` is essential for enabling steps context. | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#steps-context | |
| id: run_tests | |
| timeout-minutes: 30 | |
| run: 'yarn run test:ci' | |
| env: | |
| SLOBS_BE_STREAMKEY: ${{secrets.testsStreamKey}} | |
| SLOBS_TEST_USER_POOL_TOKEN: ${{secrets.testsUserPoolToken}} | |
| OSN_ACCESS_KEY_ID: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}} | |
| OSN_SECRET_ACCESS_KEY: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}} | |
| RELEASE_NAME: ${{matrix.ReleaseName}} | |
| # Run even after test failures so the PR still gets the flaky summary. | |
| - name: Publish flaky test check | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| run: node ci/publish-flaky-check.js | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FLAKY_CHECK_NAME: Flaky tests / macOS ${{ matrix.Architecture }} | |
| # GITHUB_SHA points at the temporary merge commit for pull_request jobs. | |
| # Use the PR head SHA so the custom check opens from the PR Checks UI. | |
| FLAKY_CHECK_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
| FLAKY_TEST_COUNT: ${{ steps.run_tests.outputs.osn_flaky_count }} | |
| FLAKY_TEST_SUMMARY: ${{ steps.run_tests.outputs.osn_flaky_summary }} | |
| TEST_STEP_CONCLUSION: ${{ steps.run_tests.conclusion }} | |
| package-and-deploy-macos: | |
| name: 'Package and Deploy macOS' | |
| needs: run-tests-macos | |
| if: ${{ needs.run-tests-macos.result == 'success' && startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ${{ matrix.image }} | |
| strategy: | |
| matrix: | |
| BuildReleases: [Release-x86_64, Release-arm64] | |
| include: | |
| - BuildReleases: Release-x86_64 | |
| image: macos-15-intel | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: x86_64 | |
| - BuildReleases: Release-arm64 | |
| image: macos-14 | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: arm64 | |
| env: | |
| OS_TAG: "osx" | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-mac-${{matrix.Architecture}} | |
| path: . | |
| - name: Extract artifacts | |
| run: | | |
| mkdir -p "${{env.SLBUILDDIRECTORY}}" | |
| tar -xvzf build-artifacts.tar.gz -C "${{env.SLBUILDDIRECTORY}}" | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Tar artifact for deployment | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: tar -cvzf ${{env.TARGET_ARTIFACT}}.tar.gz -C ${{env.SLFullDistributePath}} ${{env.InstallPath}} | |
| env: | |
| TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-${{matrix.ReleaseName}}-${{env.OS_TAG}}-${{matrix.Architecture}} | |
| - name: Configure AWS credentials | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| 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: Deploy | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: aws s3 cp ${{env.TARGET_ARTIFACT}}.tar.gz s3://${{env.RELEASE_BUCKET}} --acl public-read | |
| env: | |
| TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-${{matrix.ReleaseName}}-${{env.OS_TAG}}-${{matrix.Architecture}} | |
| upload-sentry-macos: | |
| name: 'Upload Debug Files to Sentry macOS' | |
| needs: run-tests-macos | |
| if: ${{ needs.run-tests-macos.result == 'success' && startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ${{ matrix.image }} | |
| strategy: | |
| matrix: | |
| BuildReleases: [Release-x86_64, Release-arm64] | |
| include: | |
| - BuildReleases: Release-x86_64 | |
| image: macos-15-intel | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: x86_64 | |
| - BuildReleases: Release-arm64 | |
| image: macos-14 | |
| BuildConfig: RelWithDebInfo | |
| ReleaseName: release | |
| Architecture: arm64 | |
| env: | |
| OS_TAG: "osx" | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-mac-${{matrix.Architecture}} | |
| path: . | |
| - name: Extract artifacts | |
| run: | | |
| mkdir -p "${{env.SLBUILDDIRECTORY}}" | |
| tar -xvzf build-artifacts.tar.gz -C "${{env.SLBUILDDIRECTORY}}" | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: 'Upload debug files to Sentry' | |
| run: 'python ./ci/sentry-osx.py' | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}} | |
| BUILDCONFIG: ${{matrix.BuildConfig}} | |
| build-win64: | |
| name: 'Build Windows 64-bit' | |
| runs-on: windows-2022 | |
| env: | |
| OS_TAG: "win64" | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Get the version | |
| id: get_version | |
| run: | | |
| $version = $env:GITHUB_REF -replace 'refs/tags/', '' | |
| "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| shell: pwsh | |
| - name: Install dependencies | |
| run: | | |
| yarn install | |
| yarn add electron@${{env.ElectronVersion}} -D | |
| - name: Configure obs-studio-node | |
| run: ./ci/configure-osn.cmd | |
| env: | |
| ReleaseName: release | |
| tagartifact: ${{ steps.get_version.outputs.VERSION }} | |
| - name: Build obs-studio-node | |
| run: cmake --build ${{env.SLBUILDDIRECTORY}} --target install --config RelWithDebInfo | |
| - name: Put version into package.json | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: node ci/bump-version.js "${{ steps.get_version.outputs.VERSION }}" "${{env.PACKAGE_PATH}}" | |
| env: | |
| PACKAGE_PATH: "${{env.SLFullDistributePath}}/${{env.InstallPath}}" | |
| - name: 'Copy necessary dll files' | |
| run: ./ci/copy-files.cmd | |
| - name: 'Prepare tag artifact' | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: ./ci/prepare-artifact.cmd | |
| - name: Upload compiled artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts-windows | |
| path: | | |
| ${{env.SLBUILDDIRECTORY}}/ | |
| tests/osn-tests/osn/index.ts | |
| run-tests-win64: | |
| name: 'Run Windows Tests' | |
| needs: build-win64 | |
| runs-on: windows-2022 | |
| env: | |
| OS_TAG: "win64" | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-windows | |
| path: . | |
| - name: Get the version | |
| id: get_version | |
| run: | | |
| $version = $env:GITHUB_REF -replace 'refs/tags/', '' | |
| "VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| shell: pwsh | |
| - name: Install dependencies | |
| run: | | |
| yarn install | |
| yarn add electron@${{env.ElectronVersion}} -D | |
| - name: 'Run tests' | |
| # `id` is essential for enabling steps context. | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#steps-context | |
| id: run_tests | |
| timeout-minutes: 20 | |
| continue-on-error: false | |
| run: 'yarn run test:ci' | |
| env: | |
| SLOBS_BE_STREAMKEY: ${{secrets.testsStreamKey}} | |
| SLOBS_TEST_USER_POOL_TOKEN: ${{secrets.testsUserPoolToken}} | |
| OSN_ACCESS_KEY_ID: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}} | |
| OSN_SECRET_ACCESS_KEY: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}} | |
| RELEASE_NAME: release | |
| # Run even after test failures so the PR still gets the flaky summary. | |
| - name: Publish flaky test check | |
| if: ${{ always() }} | |
| continue-on-error: true | |
| run: node ci/publish-flaky-check.js | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FLAKY_CHECK_NAME: Flaky tests / Windows | |
| # GITHUB_SHA points at the temporary merge commit for pull_request jobs. | |
| # Use the PR head SHA so the custom check opens from the PR Checks UI. | |
| FLAKY_CHECK_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
| FLAKY_TEST_COUNT: ${{ steps.run_tests.outputs.osn_flaky_count }} | |
| FLAKY_TEST_SUMMARY: ${{ steps.run_tests.outputs.osn_flaky_summary }} | |
| TEST_STEP_CONCLUSION: ${{ steps.run_tests.conclusion }} | |
| package-and-deploy-win64: | |
| name: 'Package and Deploy Windows' | |
| needs: run-tests-win64 | |
| if: ${{ needs.run-tests-win64.result == 'success' && startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: windows-2022 | |
| env: | |
| OS_TAG: "win64" | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-windows | |
| path: . | |
| - name: Get the version | |
| id: get_version | |
| run: | | |
| $version = $env:GITHUB_REF -replace 'refs/tags/', '' | |
| "VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| shell: pwsh | |
| - name: Tar artifact for deployment | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: tar -cvzf ${{env.TARGET_ARTIFACT}}.tar.gz -C ${{env.SLFullDistributePath}} ${{env.InstallPath}} | |
| env: | |
| TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-release-${{env.OS_TAG}} | |
| - name: Configure AWS credentials | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| 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: Deploy | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: aws s3 cp ${{env.TARGET_ARTIFACT}}.tar.gz s3://${{env.RELEASE_BUCKET}} --acl public-read | |
| env: | |
| TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-release-${{env.OS_TAG}} | |
| upload-symsrv-win64: | |
| name: 'Upload Symbols to Symbol Server Windows' | |
| needs: run-tests-win64 | |
| if: ${{ needs.run-tests-win64.result == 'success' && startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: windows-2022 | |
| env: | |
| OS_TAG: "win64" | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| repository: stream-labs/symsrv-scripts | |
| path: symsrv-scripts | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-windows | |
| path: . | |
| - name: Get the version | |
| id: get_version | |
| run: | | |
| $version = $env:GITHUB_REF -replace 'refs/tags/', '' | |
| "VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| shell: pwsh | |
| - name: Run symbol server scripts | |
| run: ./symsrv-scripts/main.bat "${{ github.workspace }}/symsrv-scripts" ".\main.ps1 -pdbPaths '${{ github.workspace }}\${{env.SLBUILDDIRECTORY}}\lib-streamlabs-ipc,${{ github.workspace }}\${{env.SLBUILDDIRECTORY}}\obs-studio-client,${{ github.workspace }}\${{env.SLBUILDDIRECTORY}}\obs-studio-server' -localSourceDir '${{ github.workspace }}' -repo_userId 'stream-labs' -repo_name 'obs-studio-node' -repo_branch '${{ github.sha }}' -subModules 'lib-streamlabs-ipc,stream-labs,lib-streamlabs-ipc,streamlabs'" | |
| env: | |
| AWS_SYMB_ACCESS_KEY_ID: ${{secrets.AWS_SYMB_ACCESS_KEY_ID}} | |
| AWS_SYMB_SECRET_ACCESS_KEY: ${{secrets.AWS_SYMB_SECRET_ACCESS_KEY}} | |
| shell: powershell |