From 6fb961abdef98865dbe4dedc8aefdc121a34e847 Mon Sep 17 00:00:00 2001 From: agracio Date: Wed, 4 Dec 2024 21:37:01 +0000 Subject: [PATCH 01/14] updating CI --- .github/workflows/build-all.yml | 10 +++++++++- .github/workflows/build.yml | 12 ++++++++++-- .github/workflows/main.yml | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index bce2b7f..761dc64 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -39,6 +39,14 @@ jobs: mkdir "release\x64\${{ matrix.electron }}.0.0" mkdir "release\arm64\${{ matrix.electron }}.0.0" + - name: Cache node-gyp + uses: actions/cache@v4 + env: + cache-name: cache-node-gyp + with: + path: ~\AppData\Local\node-gyp\Cache + key: '${{ matrix.electron }}.0.0' + - name: Build ia32 timeout-minutes: 30 uses: ./.github/actions/build @@ -79,7 +87,7 @@ jobs: - name: Electron versions shell: bash id: electron-test-versions - run: echo "matrix={'include':[{'electron':'29.4.6', 'os':'windows-2022'},{'electron':'30.5.1', 'os':'windows-2022'},{'electron':'31.7.5', 'os':'windows-2022'},{'electron':'32.2.5', 'os':'windows-2022'},{'electron':'33.2.0', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT + run: echo "matrix={'include':[{'electron':'29.4.6', 'os':'windows-2022'},{'electron':'30.5.1', 'os':'windows-2022'},{'electron':'31.7.5', 'os':'windows-2022'},{'electron':'32.2.6', 'os':'windows-2022'},{'electron':'33.2.1', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT test: strategy: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73e1b77..04469bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,9 +56,9 @@ jobs: elif [[ ${{ inputs.build-version }} == '31' ]]; then echo "test-version=31.7.5" >> $GITHUB_OUTPUT elif [[ ${{ inputs.build-version }} == '32' ]]; then - echo "test-version=32.2.5" >> $GITHUB_OUTPUT + echo "test-version=32.2.6" >> $GITHUB_OUTPUT elif [[ ${{ inputs.build-version }} == '33' ]]; then - echo "test-version=33.2.0" >> $GITHUB_OUTPUT + echo "test-version=33.2.1" >> $GITHUB_OUTPUT fi - name: Setup env @@ -76,6 +76,14 @@ jobs: mkdir "release\x64\${{ inputs.build-version }}.0.0" mkdir "release\arm64\${{ inputs.build-version }}.0.0" + - name: Cache node-gyp + uses: actions/cache@v4 + env: + cache-name: cache-node-gyp + with: + path: ~\AppData\Local\node-gyp\Cache + key: '${{ inputs.build-version }}.0.0' + - name: Build ia32 timeout-minutes: 30 uses: ./.github/actions/build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88726a5..d4e8f1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -84,7 +84,7 @@ jobs: os: [macos-13, macos-14, ubuntu-22.04, windows-2022] # os: [ macos-14, ubuntu-22.04] # electron: [32.1.2] - electron: [29.4.6, 30.5.1, 31.7.5, 32.2.5, 33.2.0] + electron: [29.4.6, 30.5.1, 31.7.5, 32.2.6, 33.2.1] # electron: [31.6.0, 32.1.0] name: test-${{ matrix.os }}-v${{ matrix.electron }} From 67b13c0d33aec0bd00ed9e74a3f6c7d3b5de13ed Mon Sep 17 00:00:00 2001 From: agracio Date: Wed, 4 Dec 2024 23:00:03 +0000 Subject: [PATCH 02/14] updating CI --- .github/actions/build-setup/action.yml | 65 ++++++++++++ .github/workflows/build-all.yml | 141 ++++++++++++------------- 2 files changed, 134 insertions(+), 72 deletions(-) create mode 100644 .github/actions/build-setup/action.yml diff --git a/.github/actions/build-setup/action.yml b/.github/actions/build-setup/action.yml new file mode 100644 index 0000000..9b27183 --- /dev/null +++ b/.github/actions/build-setup/action.yml @@ -0,0 +1,65 @@ +name: 'Electron build' +description: 'Electron build' +inputs: + electron: + description: 'Electron version' + required: true + os: + description: 'runs-on' + required: false + default: 'windows-2022' + +runs: + using: "composite" + steps: + + - name: Setup env + uses: ./.github/actions/setup-env + with: + electron: '${{ inputs.electron }}.0.0' + os: ${{ inputs.os }} + + - name: install node-gyp + shell: bash + run: npm i -g node-gyp + + - name: Create release folder + shell: cmd + run: | + mkdir "release\ia32\${{ inputs.electron }}.0.0" + mkdir "release\x64\${{ inputs.electron }}.0.0" + mkdir "release\arm64\${{ inputs.electron }}.0.0" + + - name: Cache node-gyp + uses: actions/cache@v4 + env: + cache-name: cache-node-gyp + with: + path: ~\AppData\Local\node-gyp\Cache + key: '${{ inputs.electron }}.0.0' + + - name: Build ia32 + uses: ./.github/actions/build + with: + electron: ${{ inputs.electron }} + arch: 'ia32' + + - name: Build x64 + uses: ./.github/actions/build + with: + electron: ${{ inputs.electron }} + arch: 'x64' + + - name: Build arm64 + uses: ./.github/actions/build + with: + electron: ${{ inputs.electron }} + arch: 'arm64' + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + if: success() + with: + name: electron-edge-js-${{ inputs.electron }}.0.0 + path: | + release diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 761dc64..fc68149 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -9,94 +9,91 @@ env: DOTNET_NOLOGO: 1 jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - # fail-fast: false - matrix: - electron: [29, 30, 31, 32, 33] - # electron: [32, 33] - os: [windows-2022] + build-29: + runs-on: windows-2022 + outputs: + electron: ${{ steps.electron-version.outputs.electron }} - name: build ${{ matrix.os }}-electron-${{ matrix.electron }} + name: build electron-29.0.0 steps: - name: Checkout code uses: actions/checkout@v4 - - - name: Setup env - uses: ./.github/actions/setup-env + + - name: Build Electron 29 + uses: ./.github/actions/setup-build with: - electron: '${{ matrix.electron }}.0.0' - os: ${{ matrix.os }} + electron: 29 + os: ${{ runner.os }} + + - name: Electron version + shell: bash + id: electron-version + run: echo "electron=29.4.6" >> $GITHUB_OUTPUT + + # - name: Setup env + # uses: ./.github/actions/setup-env + # with: + # electron: '${{ matrix.electron }}.0.0' + # os: ${{ runner.os }} - - name: install node-gyp - run: npm i -g node-gyp - - - name: Create release folder - run: | - mkdir "release\ia32\${{ matrix.electron }}.0.0" - mkdir "release\x64\${{ matrix.electron }}.0.0" - mkdir "release\arm64\${{ matrix.electron }}.0.0" - - - name: Cache node-gyp - uses: actions/cache@v4 - env: - cache-name: cache-node-gyp - with: - path: ~\AppData\Local\node-gyp\Cache - key: '${{ matrix.electron }}.0.0' + # - name: install node-gyp + # run: npm i -g node-gyp - - name: Build ia32 - timeout-minutes: 30 - uses: ./.github/actions/build - with: - electron: ${{ matrix.electron }} - arch: 'ia32' + # - name: Create release folder + # run: | + # mkdir "release\ia32\${{ matrix.electron }}.0.0" + # mkdir "release\x64\${{ matrix.electron }}.0.0" + # mkdir "release\arm64\${{ matrix.electron }}.0.0" - - name: Build x64 - timeout-minutes: 30 - uses: ./.github/actions/build - with: - electron: ${{ matrix.electron }} - arch: 'x64' + # - name: Cache node-gyp + # uses: actions/cache@v4 + # env: + # cache-name: cache-node-gyp + # with: + # path: ~\AppData\Local\node-gyp\Cache + # key: '${{ matrix.electron }}.0.0' - - name: Build arm64 - timeout-minutes: 30 - uses: ./.github/actions/build - with: - electron: ${{ matrix.electron }} - arch: 'arm64' - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - if: success() - with: - name: electron-edge-js-${{ matrix.electron }}.0.0 - path: | - release + # - name: Build ia32 + # timeout-minutes: 30 + # uses: ./.github/actions/build + # with: + # electron: ${{ matrix.electron }} + # arch: 'ia32' - electron-versions: - runs-on: ubuntu-22.04 - outputs: - matrix: ${{ steps.electron-test-versions.outputs.matrix }} + # - name: Build x64 + # timeout-minutes: 30 + # uses: ./.github/actions/build + # with: + # electron: ${{ matrix.electron }} + # arch: 'x64' - needs: build - name: electron-versions - steps: - - name: Electron versions - shell: bash - id: electron-test-versions - run: echo "matrix={'include':[{'electron':'29.4.6', 'os':'windows-2022'},{'electron':'30.5.1', 'os':'windows-2022'},{'electron':'31.7.5', 'os':'windows-2022'},{'electron':'32.2.6', 'os':'windows-2022'},{'electron':'33.2.1', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT + # - name: Build arm64 + # timeout-minutes: 30 + # uses: ./.github/actions/build + # with: + # electron: ${{ matrix.electron }} + # arch: 'arm64' + + # - name: Upload artifacts + # uses: actions/upload-artifact@v4 + # if: success() + # with: + # name: electron-edge-js-${{ matrix.electron }}.0.0 + # path: | + # release - test: + + test-29: strategy: - matrix: ${{ fromJSON(needs.electron-versions.outputs.matrix) }} + matrix: + os: [windows-2022] runs-on: ${{ matrix.os }} - needs: electron-versions + needs: build-29 + # fail-fast: false - name: test ${{ matrix.os }}-v${{ matrix.electron }} + name: test ${{ matrix.os }}-v ${{needs.build-29.outputs.electron}} steps: - name: Checkout code @@ -105,7 +102,7 @@ jobs: - name: Test build uses: ./.github/actions/test-build with: - electron: ${{ matrix.electron }} + electron: ${{ needs.build-29.outputs.electron }} os: ${{ matrix.os }} \ No newline at end of file From aa5f514c934ae4bade38c78349f55951a8762f79 Mon Sep 17 00:00:00 2001 From: agracio Date: Wed, 4 Dec 2024 23:02:19 +0000 Subject: [PATCH 03/14] updating CI --- .github/actions/{build-setup => build-electron}/action.yml | 0 .github/workflows/build-all.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/actions/{build-setup => build-electron}/action.yml (100%) diff --git a/.github/actions/build-setup/action.yml b/.github/actions/build-electron/action.yml similarity index 100% rename from .github/actions/build-setup/action.yml rename to .github/actions/build-electron/action.yml diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index fc68149..1e95721 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v4 - name: Build Electron 29 - uses: ./.github/actions/setup-build + uses: ./.github/actions/build-electron with: electron: 29 os: ${{ runner.os }} From 9a21c0a3910da934fc91809998ecde7df62898d5 Mon Sep 17 00:00:00 2001 From: agracio Date: Wed, 4 Dec 2024 23:17:41 +0000 Subject: [PATCH 04/14] updating CI --- .github/workflows/build-all.yml | 222 ++++++++++++++++++++++++-------- 1 file changed, 165 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 1e95721..9a42689 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -20,7 +20,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Build Electron 29 + - name: Build Electron 29.0.0 uses: ./.github/actions/build-electron with: electron: 29 @@ -30,59 +30,94 @@ jobs: shell: bash id: electron-version run: echo "electron=29.4.6" >> $GITHUB_OUTPUT - - # - name: Setup env - # uses: ./.github/actions/setup-env - # with: - # electron: '${{ matrix.electron }}.0.0' - # os: ${{ runner.os }} - - # - name: install node-gyp - # run: npm i -g node-gyp - - # - name: Create release folder - # run: | - # mkdir "release\ia32\${{ matrix.electron }}.0.0" - # mkdir "release\x64\${{ matrix.electron }}.0.0" - # mkdir "release\arm64\${{ matrix.electron }}.0.0" - - # - name: Cache node-gyp - # uses: actions/cache@v4 - # env: - # cache-name: cache-node-gyp - # with: - # path: ~\AppData\Local\node-gyp\Cache - # key: '${{ matrix.electron }}.0.0' - - # - name: Build ia32 - # timeout-minutes: 30 - # uses: ./.github/actions/build - # with: - # electron: ${{ matrix.electron }} - # arch: 'ia32' - - # - name: Build x64 - # timeout-minutes: 30 - # uses: ./.github/actions/build - # with: - # electron: ${{ matrix.electron }} - # arch: 'x64' - - # - name: Build arm64 - # timeout-minutes: 30 - # uses: ./.github/actions/build - # with: - # electron: ${{ matrix.electron }} - # arch: 'arm64' - - # - name: Upload artifacts - # uses: actions/upload-artifact@v4 - # if: success() - # with: - # name: electron-edge-js-${{ matrix.electron }}.0.0 - # path: | - # release + build-30: + runs-on: windows-2022 + outputs: + electron: ${{ steps.electron-version.outputs.electron }} + + name: build electron-30.0.0 + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build Electron 30.0.0 + uses: ./.github/actions/build-electron + with: + electron: 30 + os: ${{ runner.os }} + + - name: Electron version + shell: bash + id: electron-version + run: echo "electron=30.5.1" >> $GITHUB_OUTPUT + + build-31: + runs-on: windows-2022 + outputs: + electron: ${{ steps.electron-version.outputs.electron }} + + name: build electron-31.0.0 + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build Electron 31.0.0 + uses: ./.github/actions/build-electron + with: + electron: 31 + os: ${{ runner.os }} + + - name: Electron version + shell: bash + id: electron-version + run: echo "electron=31.7.5" >> $GITHUB_OUTPUT + + build-32: + runs-on: windows-2022 + outputs: + electron: ${{ steps.electron-version.outputs.electron }} + + name: build electron-32.0.0 + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build Electron 32.0.0 + uses: ./.github/actions/build-electron + with: + electron: 32 + os: ${{ runner.os }} + + - name: Electron version + shell: bash + id: electron-version + run: echo "electron=32.2.6" >> $GITHUB_OUTPUT + + build-33: + runs-on: windows-2022 + outputs: + electron: ${{ steps.electron-version.outputs.electron }} + + name: build electron-33.0.0 + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build Electron 33.0.0 + uses: ./.github/actions/build-electron + with: + electron: 33 + os: ${{ runner.os }} + + - name: Electron version + shell: bash + id: electron-version + run: echo "electron=33.2.1" >> $GITHUB_OUTPUT test-29: strategy: @@ -91,9 +126,7 @@ jobs: runs-on: ${{ matrix.os }} needs: build-29 - # fail-fast: false - - name: test ${{ matrix.os }}-v ${{needs.build-29.outputs.electron}} + name: test ${{ matrix.os }}-v${{needs.build-29.outputs.electron}} steps: - name: Checkout code @@ -105,4 +138,79 @@ jobs: electron: ${{ needs.build-29.outputs.electron }} os: ${{ matrix.os }} - \ No newline at end of file + test-30: + strategy: + matrix: + os: [windows-2022] + runs-on: ${{ matrix.os }} + needs: build-30 + + name: test ${{ matrix.os }}-v${{needs.build-30.outputs.electron}} + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Test build + uses: ./.github/actions/test-build + with: + electron: ${{ needs.build-30.outputs.electron }} + os: ${{ matrix.os }} + + test-31: + strategy: + matrix: + os: [windows-2022] + runs-on: ${{ matrix.os }} + needs: build-31 + + name: test ${{ matrix.os }}-v${{needs.build-31.outputs.electron}} + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Test build + uses: ./.github/actions/test-build + with: + electron: ${{ needs.build-31.outputs.electron }} + os: ${{ matrix.os }} + + test-32: + strategy: + matrix: + os: [windows-2022] + runs-on: ${{ matrix.os }} + needs: build-32 + + name: test ${{ matrix.os }}-v${{needs.build-32.outputs.electron}} + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Test build + uses: ./.github/actions/test-build + with: + electron: ${{ needs.build-32.outputs.electron }} + os: ${{ matrix.os }} + + test-33: + strategy: + matrix: + os: [windows-2022] + runs-on: ${{ matrix.os }} + needs: build-33 + + name: test ${{ matrix.os }}-v${{needs.build-33.outputs.electron}} + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Test build + uses: ./.github/actions/test-build + with: + electron: ${{ needs.build-33.outputs.electron }} + os: ${{ matrix.os }} + From cd9adffaa398e60e1e88c1e179eebf5b66a2e9f4 Mon Sep 17 00:00:00 2001 From: agracio Date: Thu, 5 Dec 2024 19:58:18 +0000 Subject: [PATCH 05/14] updating CI --- .github/workflows/build.yml | 31 ++-- .npmignore | 3 +- package-lock.json | 345 ++++++++++++++++++++++++++++++++++++ package.json | 1 + tools/getVersion.js | 29 +++ 5 files changed, 396 insertions(+), 13 deletions(-) create mode 100644 tools/getVersion.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04469bb..1c4cc3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,21 +45,28 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Resolve Electron version from major + - name: Get latestElectron version for v${{ inputs.build-version }} id: electron-test-version shell: bash run: | - if [[ ${{ inputs.build-version }} == '29' ]]; then - echo "test-version=29.4.6" >> $GITHUB_OUTPUT - elif [[ ${{ inputs.build-version }} == '30' ]]; then - echo "test-version=30.5.1" >> $GITHUB_OUTPUT - elif [[ ${{ inputs.build-version }} == '31' ]]; then - echo "test-version=31.7.5" >> $GITHUB_OUTPUT - elif [[ ${{ inputs.build-version }} == '32' ]]; then - echo "test-version=32.2.6" >> $GITHUB_OUTPUT - elif [[ ${{ inputs.build-version }} == '33' ]]; then - echo "test-version=33.2.1" >> $GITHUB_OUTPUT - fi + node tools/getVersion.js ${{ inputs.build-version }} + echo "test-version=$(cat electron.txt)" >> $GITHUB_OUTPUT + + # - name: Resolve Electron version from major + # id: electron-test-version + # shell: bash + # run: | + # if [[ ${{ inputs.build-version }} == '29' ]]; then + # echo "test-version=29.4.6" >> $GITHUB_OUTPUT + # elif [[ ${{ inputs.build-version }} == '30' ]]; then + # echo "test-version=30.5.1" >> $GITHUB_OUTPUT + # elif [[ ${{ inputs.build-version }} == '31' ]]; then + # echo "test-version=31.7.5" >> $GITHUB_OUTPUT + # elif [[ ${{ inputs.build-version }} == '32' ]]; then + # echo "test-version=32.2.6" >> $GITHUB_OUTPUT + # elif [[ ${{ inputs.build-version }} == '33' ]]; then + # echo "test-version=33.2.1" >> $GITHUB_OUTPUT + # fi - name: Setup env uses: ./.github/actions/setup-env diff --git a/.npmignore b/.npmignore index 2bcafbb..631bbc8 100644 --- a/.npmignore +++ b/.npmignore @@ -107,4 +107,5 @@ mochawesome.json *.sln xunit*.* getVersion*.js -*.vcxproj \ No newline at end of file +*.vcxproj +getVersion*.js \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 69d4be8..21aad1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "devDependencies": { "electron": "^33.2.0", "follow-redirects": "^1.15.9", + "isomorphic-git": "^1.27.2", "mocha": "10.8.2", "mochawesome": "^7.1.3", "mochawesome-merge": "^4.3.0", @@ -178,6 +179,13 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "dev": true, + "license": "MIT" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -332,6 +340,13 @@ "fsevents": "~2.3.2" } }, + "node_modules/clean-git-ref": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", + "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -380,6 +395,19 @@ "dev": true, "license": "MIT" }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -512,6 +540,13 @@ "node": ">=0.3.1" } }, + "node_modules/diff3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", + "dev": true, + "license": "MIT" + }, "node_modules/edge-cs": { "name": "@agracio/edge-cs", "version": "1.3.7", @@ -1016,6 +1051,16 @@ "node": ">=10.19.0" } }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1104,6 +1149,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/isomorphic-git": { + "version": "1.27.2", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.27.2.tgz", + "integrity": "sha512-nCiz+ieOkWb5kDJSSckDTiMjTcgkxqH2xuiQmw1Y6O/spwx4d6TKYSfGCd4f71HGvUYcRSUGqJEI+3uN6UQlOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-lock": "^1.4.1", + "clean-git-ref": "^2.0.1", + "crc-32": "^1.2.0", + "diff3": "0.0.3", + "ignore": "^5.1.4", + "minimisted": "^2.0.0", + "pako": "^1.0.10", + "path-browserify": "^1.0.1", + "pify": "^4.0.1", + "readable-stream": "^3.4.0", + "sha.js": "^2.4.9", + "simple-get": "^4.0.1" + }, + "bin": { + "isogit": "cli.cjs" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1275,6 +1347,26 @@ "node": ">=10" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimisted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", + "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + } + }, "node_modules/mocha": { "version": "10.8.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", @@ -1776,6 +1868,20 @@ "node": ">=6" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1813,6 +1919,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -1870,6 +1986,21 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -2002,6 +2133,67 @@ "dev": true, "license": "ISC" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", @@ -2009,6 +2201,16 @@ "dev": true, "optional": true }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -2129,6 +2331,13 @@ "node": ">= 4.0.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -2388,6 +2597,12 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "dev": true + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2499,6 +2714,12 @@ "readdirp": "~3.6.0" } }, + "clean-git-ref": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", + "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", + "dev": true + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2540,6 +2761,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true + }, "dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -2629,6 +2856,12 @@ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, + "diff3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", + "dev": true + }, "edge-cs": { "version": "npm:@agracio/edge-cs@1.3.7", "resolved": "https://registry.npmjs.org/@agracio/edge-cs/-/edge-cs-1.3.7.tgz", @@ -2982,6 +3215,12 @@ "resolve-alpn": "^1.0.0" } }, + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3046,6 +3285,26 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "isomorphic-git": { + "version": "1.27.2", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.27.2.tgz", + "integrity": "sha512-nCiz+ieOkWb5kDJSSckDTiMjTcgkxqH2xuiQmw1Y6O/spwx4d6TKYSfGCd4f71HGvUYcRSUGqJEI+3uN6UQlOw==", + "dev": true, + "requires": { + "async-lock": "^1.4.1", + "clean-git-ref": "^2.0.1", + "crc-32": "^1.2.0", + "diff3": "0.0.3", + "ignore": "^5.1.4", + "minimisted": "^2.0.0", + "pako": "^1.0.10", + "path-browserify": "^1.0.1", + "pify": "^4.0.1", + "readable-stream": "^3.4.0", + "sha.js": "^2.4.9", + "simple-get": "^4.0.1" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3184,6 +3443,21 @@ "brace-expansion": "^2.0.1" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "minimisted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", + "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "mocha": { "version": "10.8.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", @@ -3555,6 +3829,18 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3579,6 +3865,12 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -3627,6 +3919,17 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -3722,6 +4025,33 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true + }, + "simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "requires": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", @@ -3729,6 +4059,15 @@ "dev": true, "optional": true }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3816,6 +4155,12 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", diff --git a/package.json b/package.json index b17434e..7ce9daa 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "devDependencies": { "electron": "^33.2.0", "follow-redirects": "^1.15.9", + "isomorphic-git": "^1.27.2", "mocha": "10.8.2", "mochawesome": "^7.1.3", "mochawesome-merge": "^4.3.0", diff --git a/tools/getVersion.js b/tools/getVersion.js new file mode 100644 index 0000000..1db663b --- /dev/null +++ b/tools/getVersion.js @@ -0,0 +1,29 @@ +const fs = require("fs"); +const http = require('isomorphic-git/http/web'); +const git = require("isomorphic-git"); + + + git.getRemoteInfo({ + http, + //corsProxy: "https://cors.isomorphic-git.org", + url: "https://github.com/electron/electron" + }).then(info =>{ + let result = Object.keys(info.refs.tags); + result = result + .filter(function (str) { return !str.includes('^'); }) + .filter(function (str) { return !str.includes('-'); }) + .filter(function (str) { return str.startsWith(`v${process.argv[2]}.`); }) + .sort() + .reverse(); + + if(result.length !== 0){ + let version = result[0].replace('v', '') + fs.writeFileSync('electron.txt', version); + console.log(version); + } + else{ + throw `Unable to resolve latest version for Electron ${process.argv[2]}` + } + }); + + From 16c179c08bd78b29af660225e6a6ab95e62ab4f9 Mon Sep 17 00:00:00 2001 From: agracio Date: Thu, 5 Dec 2024 20:02:08 +0000 Subject: [PATCH 06/14] updating CI --- .github/workflows/build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c4cc3f..9098220 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,13 +45,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Get latestElectron version for v${{ inputs.build-version }} - id: electron-test-version - shell: bash - run: | - node tools/getVersion.js ${{ inputs.build-version }} - echo "test-version=$(cat electron.txt)" >> $GITHUB_OUTPUT - # - name: Resolve Electron version from major # id: electron-test-version # shell: bash @@ -73,6 +66,14 @@ jobs: with: electron: '${{ inputs.build-version }}.0.0' os: ${{ matrix.os }} + + - name: Get latestElectron version for v${{ inputs.build-version }} + id: electron-test-version + shell: bash + run: | + node tools/getVersion.js ${{ inputs.build-version }} + echo "test-version=$(cat electron.txt)" >> $GITHUB_OUTPUT + - name: install node-gyp run: npm i -g node-gyp From fdf003d6fc4e08685538c6ebc2e5d2b6adcf6e6a Mon Sep 17 00:00:00 2001 From: agracio Date: Thu, 5 Dec 2024 20:45:12 +0000 Subject: [PATCH 07/14] updating CI, merging changes from edge-js --- .github/workflows/build-all.yml | 42 ++-- .github/workflows/build.yml | 30 +-- src/double/Edge.js/Edge.js.csproj | 2 +- .../Edge.js/dotnetcore/coreclrembedding.cs | 204 ++++++++---------- test/test.csproj | 2 +- 5 files changed, 124 insertions(+), 156 deletions(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 9a42689..52e49c3 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -26,10 +26,12 @@ jobs: electron: 29 os: ${{ runner.os }} - - name: Electron version - shell: bash + - name: Get latest Electron version for 29.0.0 id: electron-version - run: echo "electron=29.4.6" >> $GITHUB_OUTPUT + shell: bash + run: | + node tools/getVersion.js 29 + echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT build-30: runs-on: windows-2022 @@ -48,11 +50,13 @@ jobs: electron: 30 os: ${{ runner.os }} - - name: Electron version - shell: bash + - name: Get latest Electron version for 30.0.0 id: electron-version - run: echo "electron=30.5.1" >> $GITHUB_OUTPUT - + shell: bash + run: | + node tools/getVersion.js 30 + echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT + build-31: runs-on: windows-2022 outputs: @@ -70,10 +74,12 @@ jobs: electron: 31 os: ${{ runner.os }} - - name: Electron version - shell: bash + - name: Get latest Electron version for 31.0.0 id: electron-version - run: echo "electron=31.7.5" >> $GITHUB_OUTPUT + shell: bash + run: | + node tools/getVersion.js 31 + echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT build-32: runs-on: windows-2022 @@ -92,10 +98,12 @@ jobs: electron: 32 os: ${{ runner.os }} - - name: Electron version - shell: bash + - name: Get latest Electron version for 32.0.0 id: electron-version - run: echo "electron=32.2.6" >> $GITHUB_OUTPUT + shell: bash + run: | + node tools/getVersion.js 32 + echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT build-33: runs-on: windows-2022 @@ -114,10 +122,12 @@ jobs: electron: 33 os: ${{ runner.os }} - - name: Electron version - shell: bash + - name: Get latest Electron version for 33.0.0 id: electron-version - run: echo "electron=33.2.1" >> $GITHUB_OUTPUT + shell: bash + run: | + node tools/getVersion.js 33 + echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT test-29: strategy: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9098220..64144b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,43 +31,25 @@ env: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: windows-2022 outputs: test-version: ${{ steps.electron-test-version.outputs.test-version }} strategy: - # fail-fast: false - matrix: - os: [windows-2022] + fail-fast: true - name: build ${{ matrix.os }}-electron-${{ inputs.build-version }} + name: build electron-${{ inputs.build-version }} steps: - name: Checkout code uses: actions/checkout@v4 - # - name: Resolve Electron version from major - # id: electron-test-version - # shell: bash - # run: | - # if [[ ${{ inputs.build-version }} == '29' ]]; then - # echo "test-version=29.4.6" >> $GITHUB_OUTPUT - # elif [[ ${{ inputs.build-version }} == '30' ]]; then - # echo "test-version=30.5.1" >> $GITHUB_OUTPUT - # elif [[ ${{ inputs.build-version }} == '31' ]]; then - # echo "test-version=31.7.5" >> $GITHUB_OUTPUT - # elif [[ ${{ inputs.build-version }} == '32' ]]; then - # echo "test-version=32.2.6" >> $GITHUB_OUTPUT - # elif [[ ${{ inputs.build-version }} == '33' ]]; then - # echo "test-version=33.2.1" >> $GITHUB_OUTPUT - # fi - - name: Setup env uses: ./.github/actions/setup-env with: electron: '${{ inputs.build-version }}.0.0' - os: ${{ matrix.os }} - - - name: Get latestElectron version for v${{ inputs.build-version }} + os: ${{ runner.os }} + + - name: Get latest Electron version for ${{ inputs.build-version }}.0.0 id: electron-test-version shell: bash run: | diff --git a/src/double/Edge.js/Edge.js.csproj b/src/double/Edge.js/Edge.js.csproj index ad283bd..748b21f 100644 --- a/src/double/Edge.js/Edge.js.csproj +++ b/src/double/Edge.js/Edge.js.csproj @@ -62,6 +62,6 @@ - + diff --git a/src/double/Edge.js/dotnetcore/coreclrembedding.cs b/src/double/Edge.js/dotnetcore/coreclrembedding.cs index b7cc41f..c3ac81c 100644 --- a/src/double/Edge.js/dotnetcore/coreclrembedding.cs +++ b/src/double/Edge.js/dotnetcore/coreclrembedding.cs @@ -249,8 +249,6 @@ private void AddDependencies(DependencyContext dependencyContext, bool standalon AddCompileDependencies(dependencyContext, standalone); - var runtimePath = Path.GetDirectoryName(RuntimeEnvironment.RuntimePath); - foreach (RuntimeLibrary runtimeLibrary in dependencyContext.RuntimeLibraries) { DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing runtime dependency {1} {0}", runtimeLibrary.Name, runtimeLibrary.Type); @@ -259,12 +257,15 @@ private void AddDependencies(DependencyContext dependencyContext, bool standalon { DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added runtime assembly {1} from {0}", CompileAssemblies[runtimeLibrary.Name], runtimeLibrary.Name); _libraries[runtimeLibrary.Name] = CompileAssemblies[runtimeLibrary.Name]; + AddNativeAssemblies(dependencyContext, runtimeLibrary); + AddSupplementaryRuntime(runtimeLibrary); + continue; + } if (_libraries.ContainsKey(runtimeLibrary.Name) && CompileAssemblies.ContainsKey(runtimeLibrary.Name)) { - AddNativeAssemblies(dependencyContext, runtimeLibrary); - AddSupplementaryRuntime(runtimeLibrary); + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Already present in the runtime assemblies list, skipping"); continue; } @@ -278,25 +279,8 @@ private void AddDependencies(DependencyContext dependencyContext, bool standalon if (assets.Any()) { string assetPath = assets[0]; - - string assemblyPath; - if(runtimeLibrary.Type == "project") - assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, assetPath); - else if (standalone) - assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(assetPath)); - else - { - assemblyPath = Path.Combine(_packagesPath, runtimeLibrary.Name.ToLower(), runtimeLibrary.Version, assetPath.Replace('/', Path.DirectorySeparatorChar).ToLower()); - if(!File.Exists(assemblyPath)) - assemblyPath = Path.Combine(_packagesPath, runtimeLibrary.Name.ToLower(), runtimeLibrary.Version, assetPath.Replace('/', Path.DirectorySeparatorChar)); - - } - string libraryNameFromPath = Path.GetFileNameWithoutExtension(assemblyPath); - - if (!File.Exists(assemblyPath) && !string.IsNullOrEmpty(runtimePath)) - { - assemblyPath = Path.Combine(runtimePath, Path.GetFileName(assemblyPath)); - } + + var assemblyPath = ResolveAssemblyPath(assetPath, runtimeLibrary.Version, runtimeLibrary.Type, standalone); if (!_libraries.ContainsKey(runtimeLibrary.Name)) { @@ -305,12 +289,7 @@ private void AddDependencies(DependencyContext dependencyContext, bool standalon _libraries[runtimeLibrary.Name] = assemblyPath; DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added runtime assembly {1} from {0}", assemblyPath, runtimeLibrary.Name); CompileAssemblies.TryAdd(runtimeLibrary.Name, assemblyPath); - if (!string.Equals(runtimeLibrary.Name, libraryNameFromPath, StringComparison.CurrentCultureIgnoreCase)) - { - _libraries.TryAdd(libraryNameFromPath, assemblyPath); - CompileAssemblies.TryAdd(libraryNameFromPath, assemblyPath); - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added supplementary runtime assembly {1} from {0}", assemblyPath, libraryNameFromPath); - } + AddSupplementaryRuntime(runtimeLibrary); } else { @@ -332,6 +311,52 @@ private void AddDependencies(DependencyContext dependencyContext, bool standalon AddNativeAssemblies(dependencyContext, runtimeLibrary); } } + + private string ResolveAssemblyPath(string libraryName, string libraryVersion, string libraryType, bool standalone) + { + var runtimePath = Path.GetDirectoryName(RuntimeEnvironment.RuntimePath); + var assemblyPath = libraryName.Replace('/', Path.DirectorySeparatorChar); + var normalizedPath = libraryName.Replace('/', Path.DirectorySeparatorChar); + + if (libraryType == "project") + { + assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)); + } + if (standalone) + { + if (File.Exists(Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)))) + { + assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)); + } + else if (File.Exists(Path.Combine(RuntimeEnvironment.ApplicationDirectory, "refs", Path.GetFileName(normalizedPath)))) + { + assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, "refs", Path.GetFileName(normalizedPath)); + } + else if(!string.IsNullOrEmpty(runtimePath)) + { + assemblyPath = Path.Combine(runtimePath, Path.GetFileName(normalizedPath)); + } + } + else + { + assemblyPath = Path.Combine(_packagesPath, libraryName.ToLower(), libraryVersion, normalizedPath.ToLower()); + if(!File.Exists(assemblyPath)) + { + assemblyPath = Path.Combine(_packagesPath, libraryName.ToLower(), libraryVersion, normalizedPath); + } + if(!File.Exists(assemblyPath) && File.Exists(Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)))) + { + assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)); + } + } + + if (!File.Exists(assemblyPath) && !string.IsNullOrEmpty(runtimePath)) + { + assemblyPath = Path.Combine(runtimePath, Path.GetFileName(assemblyPath)); + } + + return assemblyPath; + } private void AddSupplementaryRuntime(RuntimeLibrary runtimeLibrary) { @@ -360,6 +385,10 @@ private void AddNativeAssemblies(DependencyContext dependencyContext, RuntimeLib { nativeAssemblyPath = Path.Combine(runtimePath, nativeAssembly.Replace('/', Path.DirectorySeparatorChar)); } + if (!File.Exists(nativeAssemblyPath) && !string.IsNullOrEmpty(runtimePath)) + { + nativeAssemblyPath = Path.Combine(runtimePath, Path.GetFileName(nativeAssembly.Replace('/', Path.DirectorySeparatorChar))); + } if (File.Exists(nativeAssemblyPath)) { @@ -379,7 +408,7 @@ private void AddDependencyFromRuntime(RuntimeLibrary runtimeLibrary) if (CompileAssemblies.ContainsKey(runtimeLibrary.Name) && _libraries.ContainsKey(runtimeLibrary.Name)) return; var runtimePath = Path.GetDirectoryName(RuntimeEnvironment.RuntimePath); - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing dependency {1} {0} using runtime path {2}", runtimeLibrary.Name, runtimeLibrary.Type, runtimePath); + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing runtime dependency {1} {0} using runtime path {2}", runtimeLibrary.Name, runtimeLibrary.Type, runtimePath); if (string.IsNullOrEmpty(runtimePath)) { DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - runtime path could not be resolved, skipping"); @@ -387,20 +416,7 @@ private void AddDependencyFromRuntime(RuntimeLibrary runtimeLibrary) } var asset = runtimeLibrary.Name; - if (!asset.EndsWith(".dll") && !asset.EndsWith(".sni")) - { - asset += ".dll"; - } - - if (asset == "runtime.native.System.dll") - { - asset = "System.dll"; - } - - if (asset == "NETStandard.Library.dll") - { - asset = "netstandard.dll"; - } + asset = ReplaceAssetName(asset); var assemblyPath = Path.Combine(runtimePath, Path.GetFileName(asset)); if (File.Exists(assemblyPath)) @@ -408,39 +424,23 @@ private void AddDependencyFromRuntime(RuntimeLibrary runtimeLibrary) CompileAssemblies.TryAdd(runtimeLibrary.Name, assemblyPath); _libraries.TryAdd(runtimeLibrary.Name, assemblyPath); - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added dependency {1} from {0}", assemblyPath, runtimeLibrary.Name); - - var libraryNameFromPath = Path.GetFileNameWithoutExtension(assemblyPath); - if (!string.Equals(runtimeLibrary.Name, libraryNameFromPath, StringComparison.CurrentCultureIgnoreCase)) - { - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added supplementary assembly {1} from {0}", assemblyPath, libraryNameFromPath); - CompileAssemblies.TryAdd(libraryNameFromPath, assemblyPath); - _libraries.TryAdd(libraryNameFromPath, assemblyPath); - } + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added runtime dependency {1} from {0}", assemblyPath, runtimeLibrary.Name); + AddSupplementaryRuntime(runtimeLibrary); } else { - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Could not add dependency {0}", assemblyPath); + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Could not runtime add dependency {0}", assemblyPath); } - } private void AddDependencyFromAppDirectory(RuntimeLibrary runtimeLibrary) { if (CompileAssemblies.ContainsKey(runtimeLibrary.Name) && _libraries.ContainsKey(runtimeLibrary.Name)) return; - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing dependency {1} {0} using .nuget packages and ApplicationDirectory path.", runtimeLibrary.Name, runtimeLibrary.Type); + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing runtime dependency {1} {0} using .nuget packages and ApplicationDirectory path.", runtimeLibrary.Name, runtimeLibrary.Type); var asset = runtimeLibrary.Name; - if (!asset.EndsWith(".dll") && !asset.EndsWith(".sni")) - { - asset += ".dll"; - } - - if (asset == "runtime.native.System.dll") - { - asset = "System.dll"; - } + asset = ReplaceAssetName(asset); var assemblyPath = Path.Combine(_packagesPath, runtimeLibrary.Name.ToLower(), runtimeLibrary.Version, Path.GetFileName(asset)); @@ -453,75 +453,51 @@ private void AddDependencyFromAppDirectory(RuntimeLibrary runtimeLibrary) CompileAssemblies.TryAdd(runtimeLibrary.Name, assemblyPath); _libraries.TryAdd(runtimeLibrary.Name, assemblyPath); - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added dependency {1} from {0}", assemblyPath, runtimeLibrary.Name); - - var libraryNameFromPath = Path.GetFileNameWithoutExtension(assemblyPath); - if (!string.Equals(runtimeLibrary.Name, libraryNameFromPath, StringComparison.CurrentCultureIgnoreCase)) - { - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added supplementary assembly {1} from {0}", assemblyPath, libraryNameFromPath); - CompileAssemblies.TryAdd(libraryNameFromPath, assemblyPath); - _libraries.TryAdd(libraryNameFromPath, assemblyPath); - } + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added runtime dependency {1} from {0}", assemblyPath, runtimeLibrary.Name); + AddSupplementaryRuntime(runtimeLibrary); } else { - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Could not add dependency {0}", assemblyPath); + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Could not runtime add dependency {0}", assemblyPath); + } + } + + private string ReplaceAssetName(string asset) + { + if (!asset.EndsWith(".dll") && !asset.EndsWith(".sni")) + { + asset += ".dll"; + } + + if (asset == "runtime.native.System.dll") + { + asset = "System.dll"; } + + if (asset == "NETStandard.Library.dll") + { + asset = "netstandard.dll"; + } + return asset; } private void AddCompileDependencies(DependencyContext dependencyContext, bool standalone) { - var runtimePath = Path.GetDirectoryName(RuntimeEnvironment.RuntimePath); foreach (CompilationLibrary compileLibrary in dependencyContext.CompileLibraries) { if (compileLibrary.Assemblies.Count == 0 || CompileAssemblies.ContainsKey(compileLibrary.Name)) { continue; } - - var assemblyPath = compileLibrary.Assemblies[0].Replace('/', Path.DirectorySeparatorChar); - var normalizedPath = compileLibrary.Assemblies[0].Replace('/', Path.DirectorySeparatorChar); - - DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing compile assembly {1} {0} {2}", compileLibrary.Name, compileLibrary.Type, compileLibrary.Assemblies[0]); - - if (standalone) - { - if (File.Exists(Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)))) - { - assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)); - } - else if (File.Exists(Path.Combine(RuntimeEnvironment.ApplicationDirectory, "refs", Path.GetFileName(normalizedPath)))) - { - assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, "refs", Path.GetFileName(normalizedPath)); - } - else if(!string.IsNullOrEmpty(runtimePath) && File.Exists(Path.Combine(runtimePath, Path.GetFileName(normalizedPath)))) - { - assemblyPath = Path.Combine(runtimePath, Path.GetFileName(normalizedPath)); - } - } - else - { - assemblyPath = Path.Combine(_packagesPath, compileLibrary.Name.ToLower(), compileLibrary.Version, normalizedPath.ToLower()); - if(!File.Exists(assemblyPath)) - { - assemblyPath = Path.Combine(_packagesPath, compileLibrary.Name.ToLower(), compileLibrary.Version, normalizedPath); - } - if(!File.Exists(assemblyPath) && File.Exists(Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)))) - { - assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, Path.GetFileName(normalizedPath)); - } - } - if (!File.Exists(assemblyPath) && !string.IsNullOrEmpty(runtimePath)) - { - assemblyPath = Path.Combine(runtimePath, Path.GetFileName(assemblyPath)); - } + DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing compile assembly {1} {0} {2}", compileLibrary.Name, compileLibrary.Type, compileLibrary.Assemblies[0]); + var assemblyPath = ResolveAssemblyPath(compileLibrary.Assemblies[0], compileLibrary.Version, compileLibrary.Type, standalone); if (!CompileAssemblies.ContainsKey(compileLibrary.Name)) { - var libraryNameFromPath = Path.GetFileNameWithoutExtension(assemblyPath); if (File.Exists(assemblyPath)) { + var libraryNameFromPath = Path.GetFileNameWithoutExtension(assemblyPath); CompileAssemblies[compileLibrary.Name] = assemblyPath; DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Added compile assembly {1} from {0}", assemblyPath, compileLibrary.Name); if (!string.Equals(compileLibrary.Name, libraryNameFromPath, StringComparison.CurrentCultureIgnoreCase)) diff --git a/test/test.csproj b/test/test.csproj index 0e9d214..fabe35f 100644 --- a/test/test.csproj +++ b/test/test.csproj @@ -37,7 +37,7 @@ - + From 2ef07e6165d7d0e803373b89fa9285169fc3af4f Mon Sep 17 00:00:00 2001 From: agracio Date: Thu, 5 Dec 2024 23:41:41 +0000 Subject: [PATCH 08/14] updating CI --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4e8f1e..71fe129 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -84,7 +84,7 @@ jobs: os: [macos-13, macos-14, ubuntu-22.04, windows-2022] # os: [ macos-14, ubuntu-22.04] # electron: [32.1.2] - electron: [29.4.6, 30.5.1, 31.7.5, 32.2.6, 33.2.1] + electron: [29.4.6, 30.5.1, 31.7.6, 32.2.7, 33.3.0] # electron: [31.6.0, 32.1.0] name: test-${{ matrix.os }}-v${{ matrix.electron }} From f5af65178b926ed5a6048c8be8ab0a8a745284c1 Mon Sep 17 00:00:00 2001 From: agracio Date: Fri, 6 Dec 2024 00:15:04 +0000 Subject: [PATCH 09/14] updating CI --- .github/actions/create-test-report/action.yml | 3 ++- tools/mergeTests.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/create-test-report/action.yml b/.github/actions/create-test-report/action.yml index 4b780f9..c122f40 100644 --- a/.github/actions/create-test-report/action.yml +++ b/.github/actions/create-test-report/action.yml @@ -17,7 +17,7 @@ runs: steps: - name: "Merge test files" shell: bash - run: node tools/mergeTests.js + run: node tools/mergeTests.js ${{ inputs.electron }} - name: Read mochawesome.json uses: actions/github-script@v7 @@ -47,6 +47,7 @@ runs: path: | test/mochawesome-report/mochawesome.json test/mochawesome-report/mochawesome.html + test/mochawesome-report/assets/ - name: Create test report uses: phoenix-actions/test-reporting@v15 diff --git a/tools/mergeTests.js b/tools/mergeTests.js index b7e3891..e5bf2fe 100644 --- a/tools/mergeTests.js +++ b/tools/mergeTests.js @@ -11,7 +11,9 @@ const options = { const margeOptions = { reportFilename: 'mochawesome.html', - reportDir: './test/mochawesome-report' + reportDir: './test/mochawesome-report', + overwrite: true, + reportTitle: `electron-edge-js Electron ${process.argv[2]}` } merge.merge(options).then(report => { From 9e7c313300f58469319251854fc6fbb22def21e3 Mon Sep 17 00:00:00 2001 From: agracio Date: Fri, 6 Dec 2024 00:29:30 +0000 Subject: [PATCH 10/14] updating CI --- .github/workflows/build-all.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 52e49c3..afd5225 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -9,8 +9,12 @@ env: DOTNET_NOLOGO: 1 jobs: + build-29: runs-on: windows-2022 + timeout-minutes: 20 + strategy: + fail-fast: false outputs: electron: ${{ steps.electron-version.outputs.electron }} @@ -35,6 +39,9 @@ jobs: build-30: runs-on: windows-2022 + timeout-minutes: 20 + strategy: + fail-fast: false outputs: electron: ${{ steps.electron-version.outputs.electron }} @@ -59,6 +66,9 @@ jobs: build-31: runs-on: windows-2022 + timeout-minutes: 20 + strategy: + fail-fast: false outputs: electron: ${{ steps.electron-version.outputs.electron }} @@ -83,6 +93,9 @@ jobs: build-32: runs-on: windows-2022 + timeout-minutes: 20 + strategy: + fail-fast: false outputs: electron: ${{ steps.electron-version.outputs.electron }} @@ -107,6 +120,9 @@ jobs: build-33: runs-on: windows-2022 + timeout-minutes: 20 + strategy: + fail-fast: false outputs: electron: ${{ steps.electron-version.outputs.electron }} @@ -131,9 +147,11 @@ jobs: test-29: strategy: + fail-fast: false matrix: os: [windows-2022] runs-on: ${{ matrix.os }} + timeout-minutes: 10 needs: build-29 name: test ${{ matrix.os }}-v${{needs.build-29.outputs.electron}} @@ -150,9 +168,11 @@ jobs: test-30: strategy: + fail-fast: false matrix: os: [windows-2022] runs-on: ${{ matrix.os }} + timeout-minutes: 10 needs: build-30 name: test ${{ matrix.os }}-v${{needs.build-30.outputs.electron}} @@ -169,9 +189,11 @@ jobs: test-31: strategy: + fail-fast: false matrix: os: [windows-2022] runs-on: ${{ matrix.os }} + timeout-minutes: 10 needs: build-31 name: test ${{ matrix.os }}-v${{needs.build-31.outputs.electron}} @@ -188,9 +210,11 @@ jobs: test-32: strategy: + fail-fast: false matrix: os: [windows-2022] runs-on: ${{ matrix.os }} + timeout-minutes: 10 needs: build-32 name: test ${{ matrix.os }}-v${{needs.build-32.outputs.electron}} @@ -207,9 +231,11 @@ jobs: test-33: strategy: + fail-fast: false matrix: os: [windows-2022] runs-on: ${{ matrix.os }} + timeout-minutes: 10 needs: build-33 name: test ${{ matrix.os }}-v${{needs.build-33.outputs.electron}} From 303489bea8da599278e747b4ab1fc8a650860bcb Mon Sep 17 00:00:00 2001 From: agracio Date: Fri, 6 Dec 2024 17:45:33 +0000 Subject: [PATCH 11/14] updating CI --- .github/workflows/main.yml | 37 +++++++++++++++++++++++++++++++- tools/getVersion.js | 42 ++++++++++++++++++------------------- tools/getVersions.js | 43 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 22 deletions(-) create mode 100644 tools/getVersions.js diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71fe129..8db264c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,15 +76,30 @@ env: DOTNET_NOLOGO: 1 jobs: + electron-versions: + runs-on: ubuntu-22.04 + outputs: + matrix: ${{ steps.electron-versions.outputs.matrix }} + + name: Resolve latest electron versions + steps: + - name: Get latest Electron versions for 29, 30, 31, 32, 33 + id: electron-versions + shell: bash + run: | + node tools/getVersions.js + echo "matrix=$(cat electron.txt)" >> $GITHUB_OUTPUT + test: runs-on: ${{ matrix.os }} + needs: electron-versions strategy: fail-fast: false matrix: os: [macos-13, macos-14, ubuntu-22.04, windows-2022] # os: [ macos-14, ubuntu-22.04] # electron: [32.1.2] - electron: [29.4.6, 30.5.1, 31.7.6, 32.2.7, 33.3.0] + electron: ${{ fromJSON(needs.electron-versions.outputs.matrix) }} # electron: [31.6.0, 32.1.0] name: test-${{ matrix.os }}-v${{ matrix.electron }} @@ -136,3 +151,23 @@ jobs: os: ${{ matrix.os }} +# electron-versions: +# runs-on: ubuntu-22.04 +# outputs: +# matrix: ${{ steps.electron-test-versions.outputs.matrix }} + +# needs: build +# name: electron-versions +# steps: +# - name: Electron versions +# shell: bash +# id: electron-versions +# run: echo "matrix={'include':[{'electron':'29.4.6', 'os':'windows-2022'},{'electron':'30.5.1', 'os':'windows-2022'},{'electron':'31.7.5', 'os':'windows-2022'},{'electron':'32.2.6', 'os':'windows-2022'},{'electron':'33.2.1', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT + +# test1: +# strategy: +# matrix: +# electron: ${{ fromJSON(needs.electron-versions.outputs.matrix) }} +# os: [1] +# runs-on: ${{ matrix.os }} +# needs: electron-versions \ No newline at end of file diff --git a/tools/getVersion.js b/tools/getVersion.js index 1db663b..148c331 100644 --- a/tools/getVersion.js +++ b/tools/getVersion.js @@ -3,27 +3,27 @@ const http = require('isomorphic-git/http/web'); const git = require("isomorphic-git"); - git.getRemoteInfo({ - http, - //corsProxy: "https://cors.isomorphic-git.org", - url: "https://github.com/electron/electron" - }).then(info =>{ - let result = Object.keys(info.refs.tags); - result = result - .filter(function (str) { return !str.includes('^'); }) - .filter(function (str) { return !str.includes('-'); }) - .filter(function (str) { return str.startsWith(`v${process.argv[2]}.`); }) - .sort() - .reverse(); +git.getRemoteInfo({ + http, + //corsProxy: "https://cors.isomorphic-git.org", + url: "https://github.com/electron/electron" +}).then(info =>{ + let result = Object.keys(info.refs.tags); + result = result + .filter(function (str) { return !str.includes('^'); }) + .filter(function (str) { return !str.includes('-'); }) + .filter(function (str) { return str.startsWith(`v${process.argv[2]}.`); }) + .sort() + .reverse(); - if(result.length !== 0){ - let version = result[0].replace('v', '') - fs.writeFileSync('electron.txt', version); - console.log(version); - } - else{ - throw `Unable to resolve latest version for Electron ${process.argv[2]}` - } - }); + if(result.length !== 0){ + let version = result[0].replace('v', '') + fs.writeFileSync('electron.txt', version); + console.log(version); + } + else{ + throw `Unable to resolve latest version for Electron ${process.argv[2]}` + } +}); diff --git a/tools/getVersions.js b/tools/getVersions.js new file mode 100644 index 0000000..c537113 --- /dev/null +++ b/tools/getVersions.js @@ -0,0 +1,43 @@ +const fs = require("fs"); +const http = require('isomorphic-git/http/web'); +const git = require("isomorphic-git"); +const { get } = require("https"); + +const majors = [29, 30, 31, 32, 33]; + +git.getRemoteInfo({ + http, + //corsProxy: "https://cors.isomorphic-git.org", + url: "https://github.com/electron/electron" +}).then(info =>{ + let result = Object.keys(info.refs.tags); + let versions = []; + majors.forEach((major) => { + versions.push(getVersion(result, major)); + }); + let res = `{'include':${JSON.stringify(versions)}}` + fs.writeFileSync('electron.txt', res); + console.log(res); +}); + +function getVersion(result, major){ + result = result + .filter(function (str) { return !str.includes('^'); }) + .filter(function (str) { return !str.includes('-'); }) + .filter(function (str) { return str.startsWith(`v${major}.`); }) + .sort() + .reverse(); + + if(result.length !== 0){ + return {'electron':`${result[0].replace('v', '')}`} + //fs.writeFileSync('electron.txt', version); + //console.log(version); + } + else{ + throw `Unable to resolve latest version for Electron ${major}` + } + +} + + + From 37266a3f601a41cb8c74f6c88504e715f43123a3 Mon Sep 17 00:00:00 2001 From: agracio Date: Fri, 6 Dec 2024 17:47:01 +0000 Subject: [PATCH 12/14] updating CI --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8db264c..ec8084b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,6 +83,10 @@ jobs: name: Resolve latest electron versions steps: + + - name: Checkout code + uses: actions/checkout@v4 + - name: Get latest Electron versions for 29, 30, 31, 32, 33 id: electron-versions shell: bash From 962b03a6b99b54f6225cc8eb94e8126ee5a0535a Mon Sep 17 00:00:00 2001 From: agracio Date: Fri, 6 Dec 2024 17:51:42 +0000 Subject: [PATCH 13/14] updating CI --- .github/workflows/main.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec8084b..b96a7b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,10 +83,28 @@ jobs: name: Resolve latest electron versions steps: - + - name: Checkout code uses: actions/checkout@v4 + - name: Cache node modules + id: cache-nodemodules + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }} + + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' # SDK Version to use; x will use the latest version of the 8.0 channel + + - name: npm install + shell: bash + run: npm i + - name: Get latest Electron versions for 29, 30, 31, 32, 33 id: electron-versions shell: bash From a705875d41d1f4d882f2c26730e59e0a5e772add Mon Sep 17 00:00:00 2001 From: agracio Date: Fri, 6 Dec 2024 17:57:04 +0000 Subject: [PATCH 14/14] updating CI --- .github/workflows/main.yml | 60 +------------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b96a7b2..ffa3b4a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,53 +76,15 @@ env: DOTNET_NOLOGO: 1 jobs: - electron-versions: - runs-on: ubuntu-22.04 - outputs: - matrix: ${{ steps.electron-versions.outputs.matrix }} - - name: Resolve latest electron versions - steps: - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Cache node modules - id: cache-nodemodules - uses: actions/cache@v4 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }} - - - name: Setup dotnet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' # SDK Version to use; x will use the latest version of the 8.0 channel - - - name: npm install - shell: bash - run: npm i - - - name: Get latest Electron versions for 29, 30, 31, 32, 33 - id: electron-versions - shell: bash - run: | - node tools/getVersions.js - echo "matrix=$(cat electron.txt)" >> $GITHUB_OUTPUT - test: runs-on: ${{ matrix.os }} - needs: electron-versions strategy: fail-fast: false matrix: os: [macos-13, macos-14, ubuntu-22.04, windows-2022] # os: [ macos-14, ubuntu-22.04] # electron: [32.1.2] - electron: ${{ fromJSON(needs.electron-versions.outputs.matrix) }} - # electron: [31.6.0, 32.1.0] + electron: [29.4.6, 30.5.1, 31.7.5, 32.2.6, 33.2.1] name: test-${{ matrix.os }}-v${{ matrix.electron }} steps: @@ -173,23 +135,3 @@ jobs: os: ${{ matrix.os }} -# electron-versions: -# runs-on: ubuntu-22.04 -# outputs: -# matrix: ${{ steps.electron-test-versions.outputs.matrix }} - -# needs: build -# name: electron-versions -# steps: -# - name: Electron versions -# shell: bash -# id: electron-versions -# run: echo "matrix={'include':[{'electron':'29.4.6', 'os':'windows-2022'},{'electron':'30.5.1', 'os':'windows-2022'},{'electron':'31.7.5', 'os':'windows-2022'},{'electron':'32.2.6', 'os':'windows-2022'},{'electron':'33.2.1', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT - -# test1: -# strategy: -# matrix: -# electron: ${{ fromJSON(needs.electron-versions.outputs.matrix) }} -# os: [1] -# runs-on: ${{ matrix.os }} -# needs: electron-versions \ No newline at end of file