From 5dde39de536b204029a7f50bfccd501e720d2b9a Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sat, 26 Oct 2024 17:09:50 -0400 Subject: [PATCH] CI: Start uploading Electron-next binaries to their own repo (#1119) * CI: Start uploading Electron-next binaries to their own repo Similar to the setup for Rolling. So we can get these bins out there, for testing and such, getting the word out, etc. * CI: Build using yarn dist --next (rather than without the --next flag) Want to build "-next" bins, not vanilla Pulsar bins. * CI: Checkout submodules before editor tests Ensure ppm is present so yarn dist ppm check doesn't warn * electron-builder: Restore "warningsAsErrors: false" to the new electron-builder config file We get the following, otherwise, it would seem: warning 6010: install function "EnvVarUpdate" not referenced - zeroing code (179-395) out followed by: Error: warning treated as error And then electron-builder exits with that as the error status. So, I suppose we want to avoid that. * CI: Checkout ppm submodule for package tests too Again so that the "yarn dist" command won't warn and exit. * CI: Run editor and package tests on push to 'updated-latest-electron' branch --- .cirrus.yml | 4 ++-- .github/workflows/build.yml | 15 ++++++++------- .github/workflows/editor-tests.yml | 4 +++- .github/workflows/package-tests-linux.yml | 4 +++- script/electron-builder.config.js | 3 ++- .../rolling-release-binary-upload.js | 4 ++-- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 274494de0e..203953c854 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -63,7 +63,7 @@ arm_linux_task: memory: 8G env: USE_SYSTEM_FPM: 'true' - ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f] + ROLLING_UPLOAD_TOKEN: ENCRYPTED[bda9bda0d9ca3ed72f8efdf33e09c0abe63f568db948b11e348f963dd532c08fdf91e54d7db549b97f763f284c4a96ec] prepare_script: - apt-get update - export DEBIAN_FRONTEND="noninteractive" @@ -135,7 +135,7 @@ silicon_mac_task: APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57] APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f] TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49] - ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f] + ROLLING_UPLOAD_TOKEN: ENCRYPTED[bda9bda0d9ca3ed72f8efdf33e09c0abe63f568db948b11e348f963dd532c08fdf91e54d7db549b97f763f284c4a96ec] prepare_script: - brew update - brew uninstall node@20 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66507eb864..22d4770e71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: push: branches: - 'master' + - 'updated-latest-electron' tags: - '**' pull_request: @@ -14,7 +15,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHON_VERSION: '3.12' NODE_VERSION: 16 - ROLLING_UPLOAD_TOKEN: ${{ secrets.ROLLING_RELEASE_UPLOAD_TOKEN }} + ROLLING_UPLOAD_TOKEN: ${{ secrets.ELECTRON_NEXT_BINARIES_UPLOAD_TOKEN }} # Below variables allow us to quickly control visual tests for each platform RUN_WINDOWS_VT: false RUN_LINUX_VT: true @@ -88,11 +89,11 @@ jobs: - name: Check Pulsar Version if: ${{ runner.os != 'Windows' }} - run: sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json + run: sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`-electron-next/g" package.json - name: Check Pulsar Version - Windows if: ${{ runner.os == 'Windows' }} - run: (Get-Content package.json) -replace '[0-9]*-dev', (date -u +%Y%m%d%H) | Set-Content -Path package.json + run: (Get-Content package.json) -replace '[0-9]*-dev', "$(date -u +%Y%m%d%H)-electron-next" | Set-Content -Path package.json - name: Reinstall Current Node-GYP NodeJS Headers # Overwrite bad headers that get downloaded. @@ -145,7 +146,7 @@ jobs: timeout_minutes: 45 max_attempts: 3 retry_on: error - command: yarn dist + command: yarn dist --next - name: Build Pulsar Binaries (macOS) (Unsigned) if: ${{ runner.os == 'macOS' && github.event_name != 'push' }} @@ -154,7 +155,7 @@ jobs: timeout_minutes: 45 max_attempts: 3 retry_on: error - command: yarn dist + command: yarn dist --next - name: Build Pulsar Binaries if: ${{ runner.os != 'macOS' }} @@ -163,7 +164,7 @@ jobs: timeout_minutes: 30 max_attempts: 3 retry_on: error - command: yarn dist + command: yarn dist --next - name: Rename Pulsar Binaries for Regular release (Linux) if: ${{ runner.os == 'Linux' }} @@ -273,7 +274,7 @@ jobs: - name: Check Pulsar Version if: ${{ runner.os != 'Windows' }} - run: sed -i -e "s/[0-9]*-dev/${TIMESTAMP}/g" package.json + run: sed -i -e "s/[0-9]*-dev/${TIMESTAMP}-electron-next/g" package.json env: TIMESTAMP: ${{needs.build.outputs.timestamp}} diff --git a/.github/workflows/editor-tests.yml b/.github/workflows/editor-tests.yml index 2080eefe97..ea45d886a0 100644 --- a/.github/workflows/editor-tests.yml +++ b/.github/workflows/editor-tests.yml @@ -2,7 +2,7 @@ name: Editor tests on: pull_request: push: - branches: ['master'] + branches: ['master', 'updated-latest-electron'] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ATOM_JASMINE_REPORTER: list @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout the latest code uses: actions/checkout@v4 + with: + submodules: true - name: Setup node uses: actions/setup-node@v4 diff --git a/.github/workflows/package-tests-linux.yml b/.github/workflows/package-tests-linux.yml index 04fc39ddd4..6c70c885e2 100644 --- a/.github/workflows/package-tests-linux.yml +++ b/.github/workflows/package-tests-linux.yml @@ -2,7 +2,7 @@ name: Package tests on: pull_request: push: - branches: ['master'] + branches: ['master', 'updated-latest-electron'] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ATOM_JASMINE_REPORTER: list @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout the latest code uses: actions/checkout@v4 + with: + submodules: true - name: Setup node uses: actions/setup-node@v4 diff --git a/script/electron-builder.config.js b/script/electron-builder.config.js index 3a0874d65c..4fc4691f4f 100644 --- a/script/electron-builder.config.js +++ b/script/electron-builder.config.js @@ -273,7 +273,8 @@ let options = { // Hardcoding it here means it will always be used as generated from // the AppID 'dev.pulsar-edit.pulsar'. If this value ever changes, // A PR to GitHub Desktop must be made with the updated value. - include: "resources/win/installer.nsh" + include: "resources/win/installer.nsh", + warningsAsErrors: false }, extraMetadata: {}, diff --git a/script/rolling-release-scripts/rolling-release-binary-upload.js b/script/rolling-release-scripts/rolling-release-binary-upload.js index 9cf035ea16..e32c958d28 100644 --- a/script/rolling-release-scripts/rolling-release-binary-upload.js +++ b/script/rolling-release-scripts/rolling-release-binary-upload.js @@ -56,9 +56,9 @@ if (cirrusFlag === "cirrus") { publish({ token: process.env.ROLLING_UPLOAD_TOKEN || process.env.GITHUB_TOKEN, owner: "pulsar-edit", - repo: "pulsar-rolling-releases", + repo: "pulsar-electron-next-binaries", name: packageJson.version, - notes: `Rolling Release: ${packageJson.version}`, + notes: `Pulsar Electron Next version: ${packageJson.version}`, tag: `v${packageJson.version}`, draft: false, prerelease: false,