Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update electron-builder and Azure pipeline configurations #1404

Merged
merged 13 commits into from
Mar 28, 2024
Merged
8 changes: 8 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>
9 changes: 4 additions & 5 deletions ci-jobs/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ jobs:
- template: templates/package.yml
parameters:
pool:
vmImage: 'macOS-12'
name: 'osx_package'
vmImage: 'macOS-latest'
name: 'macos_package'
- template: templates/package.yml
parameters:
pool:
vmImage: 'windows-2022'
vmImage: 'windows-latest'
name: 'windows_package'
buildScript: 'npx electron-builder build -w --ia32 --x64 --publish always'
- template: templates/package.yml
parameters:
pool:
vmImage: 'ubuntu-22.04'
vmImage: 'ubuntu-latest'
name: 'linux_package'
6 changes: 3 additions & 3 deletions ci-jobs/templates/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
pool: ''
xvfb: false
target: ''
buildScript: 'npx electron-builder build --publish always'
buildScript: 'npx electron-builder build --x64 --arm64 --publish always'
jobs:
- job: ${{parameters.name}}
pool: ${{parameters.pool}}
Expand All @@ -21,9 +21,9 @@ jobs:
steps:
- checkout: self
persistCredentials: true
- task: NodeTool@0
- task: UseNode@1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider using lts node version alias instead of the hardcoded one

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if Azure supports the lts value. The documentation only refers to semver values.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I forgot it's Azure. Perhaps it makes sense to migrate to GitHub CI

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that GitHub CI would be more convenient, though I'm guessing there was a reason why Azure was originally selected. Maybe the machines are more powerful? It's also used in other Appium projects (e.g. xcuitest driver).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was selected before github had any CI. Yes, it is still used, although not by xcuitest driver. It's used in webdriveragent because of the high amount of e2e tests we run there and the limited capability of free macOS-based runners on Github. Otherwise I would also migrate them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps I tried to convert this project to GHA before. Then, I needed maybe Window's signature which probably needed Dan's help. We could restart migrating them.

inputs:
versionSpec: '16.x'
version: '20.x'
- script: npm ci
displayName: Install dependencies
- script: npm run build
Expand Down
50 changes: 50 additions & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"productName": "Appium Inspector",
"appId": "io.appium.inspector",
"asar": true,
"directories": {
"output": "release"
},
"files": ["dist/", "main.js", "main.js.map"],
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"fileAssociations": [
{
"ext": "appiumsession",
"name": "Appium Session",
"role": "Editor"
}
],
"mac": {
"category": "public.app-category.developer-tools"
},
"dmg": {
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"win": {
"target": ["nsis", "zip"]
},
"nsis": {
"oneClick": false
},
"linux": {
"target": ["AppImage", "tar.gz"],
"category": "Development"
},
"publish": {
"provider": "github",
"owner": "appium",
"vPrefixedTagName": true
}
}
78 changes: 0 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,84 +62,6 @@
"printWidth": 100,
"singleQuote": true
},
"build": {
"productName": "Appium Inspector",
"appId": "io.appium.inspector",
"asar": true,
"directories": {
"output": "release"
},
"fileAssociations": [
{
"ext": "appiumsession",
"name": "Appium",
"role": "Editor",
"icon": "./build/icon.ico"
}
],
"mac": {
"category": "public.app-category.developer-tools",
"target": [
{
"target": "dmg",
"arch": "universal"
},
{
"target": "zip",
"arch": "universal"
}
]
},
"dmg": {
"artifactName": "${productName}-mac-${version}.${ext}",
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"files": [
"dist/",
"node_modules/**/*",
"main.js",
"main.js.map",
"package.json"
],
"win": {
"artifactName": "${productName}-windows-${version}-${arch}.${ext}",
"target": [
"nsis",
"zip"
],
"icon": "build/icon.ico"
},
"nsisWeb": {
"oneClick": false
},
"nsis": {
"oneClick": false
},
"linux": {
"artifactName": "${productName}-linux-${version}.${ext}",
"target": [
"AppImage"
],
"category": "Development"
},
"publish": {
"provider": "github",
"owner": "appium",
"vPrefixedTagName": true
}
},
"bin": {
"electron": "./node_modules/.bin/electron"
},
Expand Down