* dependency: upgrades electron from 25 to 26 * bump cache run ci * fix docker img names * ref electron upgrade branch * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * debug * debug * debug * update search string for resize observer error swallow * debug * update integrity check * update electron readme with upgrade troubleshooting section * point to new publish binary workflow branch for electron 27 * update electron readme with locations of chromium & node versions for a given electron version * update node versions and docker image refs * update electron version to 27.1.3 * fix db nativeBinding arg * chore: updating v8 snapshot cache * install setuptools on mac when updating v8 snapshot cache * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * run workflows on this branch run ci * require addon directly and pass to better-sqlite3 init; debug * rm debug * try loading better-sqlite with a more dynamic filename * bump electron version * bump electron version * bump electron version -- run ci * bump electron version -- run ci * bump electron version -- run ci * bump electron version -- run ci * bump electron version -- run ci * add a step to update workflows.yml to electron upgrade process * reduce retry limit on issue 1244 test to prevent circle from thinking tests have hanged * target main branch of binary publish workflow? run ci * Update .node-version -- run ci * Update CHANGELOG.md * Update module_api_spec.ts * point publish binary back to electron upgrade branch * Adds some logging re: cachedDataVersion * use precise electron version for better-sqlite3 for centos7 * Update CHANGELOG.md * chore: fix issue with bytenode (#28568) * fix jsc for 27 -- run ci * Update smoke.js * fix build * update electron upgrade steps * Update packages/electron/README.md Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> * Update cli/CHANGELOG.md Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> * fix DebugEmptyStates component test * try to fix downstream build -- run ci (#28649) Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com> * point to consolidated binary publish branch * revert webpack-preprocessor-awesome-typescript-loader update * revert certain system tests * increase padding for module api system test duration window * account for differing screenshot sizes * screenshot size differs locally vs ci * update protocol snapshots * Update after-pack-hook.js * fix flaky slideshow * correct the chromium version in changelog * use 18.17.1 internal images * workflow filters * fix trailing checkbox in electron readme * add solution to crashing better-sqlite3 in electron readme * Update packages/electron/README.md Co-authored-by: Bill Glesias <bglesias@gmail.com> * Update scripts/after-pack-hook.js Co-authored-by: Ryan Manuel <ryanm@cypress.io> * Update scripts/after-pack-hook.js Co-authored-by: Ryan Manuel <ryanm@cypress.io> * Update scripts/after-pack-hook.js Co-authored-by: Ryan Manuel <ryanm@cypress.io> * add branch to setup_should_persist_artifacts * debug app e2e test * bump cache * upgrade browsers-internal to chrome 121 * revert to chrome 118 images * bump cache * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * bump cache --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Ryan Manuel <ryanm@cypress.io> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Bill Glesias <bglesias@gmail.com>
2.9 KiB
Building Release Artifacts
The cypress NPM package consists of two main parts:
- The
cypressNPM package.tgz(built fromcli)- Contains the command line tool
cypress, type definitions, and the Module API. - End users install this via NPM to the project's
node_modules.
- Contains the command line tool
- The "binary"
.zip(built frompackages/server)- Contains the Electron app,
ffmpeg, and built versions of theserver,desktop-gui,runner,exampleproject, andextension- Also contains all the production dependencies of the above.
- This is installed when the
cliis installed or whencypress installis run, to a system cache.
- Contains the Electron app,
This guide has instructions for building both.
Building the npm package
⚠️ Note: The steps in this section are automated in CI, and you should not need to do them yourself when going through the release process.
Building a new npm package is two commands:
- Increment the version in the root
package.json yarn lerna run build-cli
The steps above:
- Build the
cypressnpm package - Transpile the code into ES5 to be compatible with the common Node versions
- Put the result into the
cli/buildfolder.
Building the binary
⚠️ Note: The steps in this section are automated in CI, and you should not need to do them yourself when going through the release process.
The npm package requires a corresponding binary of the same version. In production, it will try to retrieve the binary from the Cypress CDN if it is not cached locally.
You can build the Cypress binary locally by running yarn binary-build, then package the binary by running yarn binary-package. You can use Linux to build the Cypress binary (just like it is in CI) by running yarn binary-build and yarn binary-package inside of yarn docker.
If you're on macOS and building locally, you'll need a code-signing certificate in your keychain, which you can get by following the instructions on Apple's website. Also, you'll also most likely want to skip notarization since it requires an Apple Developer Program account - set SKIP_NOTARIZATION=1 when building locally to do this. More info about code signing in CI.
yarn binary-zip can be used to zip the built binary together.
Tips
If you want to speed up the time it takes to package the binary, set V8_SNAPSHOT_DISABLE_MINIFY=1
If you are on an M1, you need to set RESET_ADHOC_SIGNATURE=1 in order to be able to actually run the binary after packaging it.