Skip to content

Commit

Permalink
CI: Start uploading Electron-next binaries to their own repo (#1119)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DeeDeeG authored Oct 26, 2024
1 parent 2a6e564 commit 5dde39d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'master'
- 'updated-latest-electron'
tags:
- '**'
pull_request:
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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' }}
Expand All @@ -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' }}
Expand All @@ -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' }}
Expand Down Expand Up @@ -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}}

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/editor-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/package-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion script/electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5dde39d

Please sign in to comment.