From 67a9103b1b0ad96932e4a53afd991e5d58ff4bb4 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 10:15:04 +0200 Subject: [PATCH 1/7] add linux desktop build & test to all branches --- .circleci/config.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26bb163e27..d7942c13c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -785,34 +785,46 @@ workflows: unless: << pipeline.parameters.run_flaky_tests >> jobs: - build - - build-desktop: - filters: - branches: - only: [/.*desktop.*/, 'remix_beta'] + - build-desktop - build-remixdesktop-mac: requires: - build-desktop matrix: parameters: arch: ["arm64", "x64"] + filters: + branches: + only: [/.*desktop.*/] - test-remixdesktop-mac: requires: - build-desktop + filters: + branches: + only: [/.*desktop.*/] - build-remixdesktop-windows: requires: - build-desktop + filters: + branches: + only: [/.*desktop.*/] - sign-remixdesktop-windows: requires: - build-remixdesktop-windows - build-remixdesktop-linux: requires: - build-desktop + filters: + branches: + only: [/.*desktop.*/] - test-remixdesktop-linux: requires: - build-desktop - test-remixdesktop-windows: requires: - build-desktop + filters: + branches: + only: [/.*desktop.*/] - uploadartifacts: requires: - build-remixdesktop-mac From 055f34477e194a758269f0ac349608a858719575 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 10:22:35 +0200 Subject: [PATCH 2/7] fix error code completion --- .circleci/config.yml | 2 +- apps/remixdesktop/src/plugins/remixAIDektop.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7942c13c4..82385a99f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -835,7 +835,7 @@ workflows: - test-remixdesktop-mac filters: branches: - only: [/.*desktop.*/] + only: [/.*desktop-master.*/] - build-plugin: matrix: parameters: diff --git a/apps/remixdesktop/src/plugins/remixAIDektop.ts b/apps/remixdesktop/src/plugins/remixAIDektop.ts index 30e58a8e4e..1408b2d271 100644 --- a/apps/remixdesktop/src/plugins/remixAIDektop.ts +++ b/apps/remixdesktop/src/plugins/remixAIDektop.ts @@ -83,7 +83,7 @@ class RemixAIDesktopPluginClient extends ElectronBasePluginClient { async code_completion(context: any) { // use general purpose model - return this.desktopInferencer.code_completion(context) + return this.desktopInferencer.code_completion(context, null) } async code_insertion(msg_pfx: string, msg_sfx: string) { From 229365ebe9b82a752583d4d3134cffd3f2c5ba63 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 10:54:19 +0200 Subject: [PATCH 3/7] fix test --- apps/remixdesktop/test/tests/app/search.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remixdesktop/test/tests/app/search.test.ts b/apps/remixdesktop/test/tests/app/search.test.ts index 30f1593bdc..8384169f7a 100644 --- a/apps/remixdesktop/test/tests/app/search.test.ts +++ b/apps/remixdesktop/test/tests/app/search.test.ts @@ -47,7 +47,7 @@ module.exports = { .waitForElementContainsText('*[data-id="search_results"]', 'sender.voted') .waitForElementContainsText('*[data-id="search_results"]', 'read') .elements('css selector', '.search_plugin_search_line', (res) => { - Array.isArray(res.value) && browser.assert.equal(res.value.length, 6) + Array.isArray(res.value) && browser.assert.equal(res.value.length, 7) }) }, 'Should find text with exclude #group1': function (browser: NightwatchBrowser) { browser From 87c6fbee920ede6b254c27f1fabd5a489ea1f305 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 11:28:39 +0200 Subject: [PATCH 4/7] fix test --- apps/remixdesktop/test/tests/app/search.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remixdesktop/test/tests/app/search.test.ts b/apps/remixdesktop/test/tests/app/search.test.ts index 8384169f7a..113fa537e1 100644 --- a/apps/remixdesktop/test/tests/app/search.test.ts +++ b/apps/remixdesktop/test/tests/app/search.test.ts @@ -56,7 +56,7 @@ module.exports = { .clearValue('*[id="search_include"]').pause(2000) .setValue('*[id="search_include"]', '**').sendKeys('*[id="search_include"]', browser.Keys.ENTER).pause(4000) .elements('css selector', '.search_plugin_search_line', (res) => { - Array.isArray(res.value) && browser.assert.equal(res.value.length, 62) + Array.isArray(res.value) && browser.assert.equal(res.value.length, 63) }) .setValue('*[id="search_exclude"]', ',contracts/**').sendKeys('*[id="search_exclude"]', browser.Keys.ENTER).pause(4000) .elements('css selector', '.search_plugin_search_line', (res) => { From 38b089c934d6007911a54ea90be444a873ef7039 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 11:47:58 +0200 Subject: [PATCH 5/7] fix test --- apps/remixdesktop/test/tests/app/search.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remixdesktop/test/tests/app/search.test.ts b/apps/remixdesktop/test/tests/app/search.test.ts index 113fa537e1..8f3ba0a9e7 100644 --- a/apps/remixdesktop/test/tests/app/search.test.ts +++ b/apps/remixdesktop/test/tests/app/search.test.ts @@ -101,7 +101,7 @@ module.exports = { .clearValue('*[id="search_input"]') .setValue('*[id="search_input"]', 'contract').sendKeys('*[id="search_input"]', browser.Keys.ENTER).pause(4000) .elements('css selector', '.search_plugin_search_line', (res) => { - Array.isArray(res.value) && browser.assert.equal(res.value.length, 15) + Array.isArray(res.value) && browser.assert.equal(res.value.length, 16) }) }, 'Should replace text #group1': function (browser: NightwatchBrowser) { From eee24641dad7e9940f030da9f13a7d78c5b39ecf Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 12:08:42 +0200 Subject: [PATCH 6/7] test-only --- .circleci/config.yml | 2 +- apps/remixdesktop/rundist.bash | 37 ++++++++++++++------ apps/remixdesktop/test_only.json | 60 ++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 11 deletions(-) create mode 100644 apps/remixdesktop/test_only.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 82385a99f4..4cc6e6bb88 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -132,7 +132,7 @@ jobs: yarn add node-pty yarn --ignore-optional yarn add @remix-project/remix-ws-templates - ./rundist.bash + ./rundist.bash test_only - run: name: "Run tests" command: | diff --git a/apps/remixdesktop/rundist.bash b/apps/remixdesktop/rundist.bash index 66a3a9a0dc..37d7d329cf 100755 --- a/apps/remixdesktop/rundist.bash +++ b/apps/remixdesktop/rundist.bash @@ -3,20 +3,37 @@ # Read the version from package.json version=$(awk -F'"' '/"version":/ {print $4}' package.json) -# Determine the command to run based on the version -if [[ $version == *"beta"* ]]; then - command="yarn dist -c beta.json" -elif [[ $version == *"alpha"* ]]; then - command="yarn dist -c alpha.json" -elif [[ $version == *"insiders"* ]]; then - command="yarn dist -c insiders.json" +# Default to false for test_only +test_only=false + +# Check for test_only argument +for arg in "$@"; do + if [[ $arg == "test_only" ]]; then + test_only=true + break + fi +done + +# Determine the command to run based on the version and test_only flag +if [ "$test_only" = true ]; then + command="yarn dist -c test_only.json" else - command="yarn dist -c latest.json" + if [[ $version == *"beta"* ]]; then + command="yarn dist -c beta.json" + elif [[ $version == *"alpha"* ]]; then + command="yarn dist -c alpha.json" + elif [[ $version == *"insiders"* ]]; then + command="yarn dist -c insiders.json" + else + command="yarn dist -c latest.json" + fi fi -# Append any arguments passed in CLI +# Append any remaining arguments passed in CLI (except test_only) for arg in "$@"; do - command+=" $arg" + if [[ $arg != "test_only" ]]; then + command+=" $arg" + fi done # Print and run the command diff --git a/apps/remixdesktop/test_only.json b/apps/remixdesktop/test_only.json new file mode 100644 index 0000000000..2214196338 --- /dev/null +++ b/apps/remixdesktop/test_only.json @@ -0,0 +1,60 @@ +{ + "productName": "Remix-Desktop-Insiders", + "appId": "org.ethereum.remix-ide", + "asar": true, + "generateUpdatesFilesForAllChannels": false, + "icon": "assets", + "files": [ + "build/**/*", + "node_modules/node-pty/**/*" + ], + "afterSign": "aftersign.js", + "afterAllArtifactBuild": "afterbuild.js", + "publish": [ + { + "provider": "github", + "owner": "remix-project-org", + "repo": "remix-desktop-insiders", + "releaseType": "draft", + "publishAutoUpdate": true + } + ], + "mac": { + "category": "public.app-category.productivity", + "icon": "assets/icon.png", + "darkModeSupport": true, + "hardenedRuntime": true, + "gatekeeperAssess": false, + "entitlements": "entitlements.mac.plist", + "entitlementsInherit": "entitlements.mac.plist" + }, + "dmg": { + "writeUpdateInfo": true, + "sign": true + }, + "nsis": { + "createDesktopShortcut": "always", + "allowToChangeInstallationDirectory": true, + "oneClick": false, + "shortcutName": "Remix Desktop Insiders", + "differentialPackage": false + }, + "win": { + "target": [ + "nsis" + ], + "artifactName": "Remix-Desktop-Setup-${version}.${ext}", + "icon": "assets/icon.png" + }, + "deb": {}, + "linux": { + "target": [ + "dir" + ], + "category": "WebBrowser", + "icon": "assets" + }, + "directories": { + "output": "release" + } +} \ No newline at end of file From 044612261f2c02f888357ff600c793cf190093b1 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 26 Oct 2024 12:20:04 +0200 Subject: [PATCH 7/7] paralel --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4cc6e6bb88..a02ab093d2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,7 +111,7 @@ jobs: resource_class: xlarge working_directory: ~/remix-project - parallelism: 10 + parallelism: 15 steps: - run: ldd --version - checkout