mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
ci: use CircleCI hosted macOS arm64 runners for testing (#41658)
* ci: use CircleCI hosted macOS arm64 runners for testing
(cherry picked from commit 6ca2aa6b06)
* ci: Use same version of xcode/macOS for both arm and x64 testing
This commit is contained in:
committed by
GitHub
parent
faa3dc7654
commit
c145388dd2
@@ -75,10 +75,6 @@ executors:
|
||||
resource_class: << parameters.size >>
|
||||
|
||||
# Electron Runners
|
||||
apple-silicon:
|
||||
resource_class: electronjs/macos-arm64
|
||||
machine: true
|
||||
|
||||
linux-arm:
|
||||
resource_class: electronjs/aks-linux-arm-test
|
||||
docker:
|
||||
@@ -2331,8 +2327,11 @@ jobs:
|
||||
- electron-tests:
|
||||
artifact-key: darwin-x64
|
||||
|
||||
darwin-testing-arm64-tests:
|
||||
executor: apple-silicon
|
||||
darwin-testing-arm64-tests:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.m1.medium.gen1
|
||||
version: 14.0.0
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
@@ -2356,7 +2355,10 @@ jobs:
|
||||
artifact-key: mas-x64
|
||||
|
||||
mas-testing-arm64-tests:
|
||||
executor: apple-silicon
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.m1.medium.gen1
|
||||
version: 14.0.0
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
|
||||
@@ -25,9 +25,7 @@ describe('setDisplayMediaRequestHandler', () => {
|
||||
// error message:
|
||||
// [ERROR:video_capture_device_client.cc(659)] error@ OnStart@content/browser/media/capture/desktop_capture_device_mac.cc:98, CGDisplayStreamCreate failed, OS message: Value too large to be stored in data type (84)
|
||||
// This is possibly related to the OS/VM setup that CircleCI uses for macOS.
|
||||
// Our arm64 runners are in @jkleinsc's office, and are real machines, so the
|
||||
// test works there.
|
||||
ifit(!(process.platform === 'darwin' && process.arch === 'x64'))('works when calling getDisplayMedia', async function () {
|
||||
ifit(process.platform !== 'darwin')('works when calling getDisplayMedia', async function () {
|
||||
if ((await desktopCapturer.getSources({ types: ['screen'] })).length === 0) {
|
||||
return this.skip();
|
||||
}
|
||||
@@ -306,7 +304,7 @@ describe('setDisplayMediaRequestHandler', () => {
|
||||
expect(ok).to.be.true(message);
|
||||
});
|
||||
|
||||
ifit(!(process.platform === 'darwin' && process.arch === 'x64'))('can supply a screen response to preferCurrentTab', async () => {
|
||||
ifit(process.platform !== 'darwin')('can supply a screen response to preferCurrentTab', async () => {
|
||||
const ses = session.fromPartition('' + Math.random());
|
||||
let requestHandlerCalled = false;
|
||||
ses.setDisplayMediaRequestHandler(async (request, callback) => {
|
||||
|
||||
@@ -2525,18 +2525,18 @@ describe('webContents module', () => {
|
||||
it('emits when moveTo is called', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.loadURL('about:blank');
|
||||
w.webContents.executeJavaScript('window.moveTo(100, 100)', true);
|
||||
w.webContents.executeJavaScript('window.moveTo(50, 50)', true);
|
||||
const [, rect] = await once(w.webContents, 'content-bounds-updated') as [any, Electron.Rectangle];
|
||||
const { width, height } = w.getBounds();
|
||||
expect(rect).to.deep.equal({
|
||||
x: 100,
|
||||
y: 100,
|
||||
x: 50,
|
||||
y: 50,
|
||||
width,
|
||||
height
|
||||
});
|
||||
await new Promise(setImmediate);
|
||||
expect(w.getBounds().x).to.equal(100);
|
||||
expect(w.getBounds().y).to.equal(100);
|
||||
expect(w.getBounds().x).to.equal(50);
|
||||
expect(w.getBounds().y).to.equal(50);
|
||||
});
|
||||
|
||||
it('emits when resizeTo is called', async () => {
|
||||
|
||||
Reference in New Issue
Block a user