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

merge from master #171

Merged
merged 14 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/actions/build-electron/action.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion .github/actions/create-test-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
267 changes: 208 additions & 59 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,86 +9,236 @@ env:
DOTNET_NOLOGO: 1

jobs:
build:
runs-on: ${{ matrix.os }}

build-29:
runs-on: windows-2022
timeout-minutes: 20
strategy:
# fail-fast: false
matrix:
electron: [29, 30, 31, 32, 33]
# electron: [32, 33]
os: [windows-2022]
fail-fast: false
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.0.0
uses: ./.github/actions/build-electron
with:
electron: '${{ matrix.electron }}.0.0'
os: ${{ matrix.os }}

- name: install node-gyp
run: npm i -g node-gyp
electron: 29
os: ${{ runner.os }}

- name: Create release folder
- name: Get latest Electron version for 29.0.0
id: electron-version
shell: bash
run: |
mkdir "release\ia32\${{ matrix.electron }}.0.0"
mkdir "release\x64\${{ matrix.electron }}.0.0"
mkdir "release\arm64\${{ matrix.electron }}.0.0"
node tools/getVersion.js 29
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

- name: Build ia32
timeout-minutes: 30
uses: ./.github/actions/build
with:
electron: ${{ matrix.electron }}
arch: 'ia32'
build-30:
runs-on: windows-2022
timeout-minutes: 20
strategy:
fail-fast: false
outputs:
electron: ${{ steps.electron-version.outputs.electron }}

name: build electron-30.0.0
steps:

- name: Build x64
timeout-minutes: 30
uses: ./.github/actions/build
with:
electron: ${{ matrix.electron }}
arch: 'x64'
- name: Checkout code
uses: actions/checkout@v4

- name: Build arm64
timeout-minutes: 30
uses: ./.github/actions/build
- name: Build Electron 30.0.0
uses: ./.github/actions/build-electron
with:
electron: ${{ matrix.electron }}
arch: 'arm64'

- name: Upload artifacts
uses: actions/upload-artifact@v4
if: success()
electron: 30
os: ${{ runner.os }}

- name: Get latest Electron version for 30.0.0
id: electron-version
shell: bash
run: |
node tools/getVersion.js 30
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

build-31:
runs-on: windows-2022
timeout-minutes: 20
strategy:
fail-fast: false
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:
name: electron-edge-js-${{ matrix.electron }}.0.0
path: |
release
electron: 31
os: ${{ runner.os }}

electron-versions:
runs-on: ubuntu-22.04
- name: Get latest Electron version for 31.0.0
id: electron-version
shell: bash
run: |
node tools/getVersion.js 31
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

build-32:
runs-on: windows-2022
timeout-minutes: 20
strategy:
fail-fast: false
outputs:
matrix: ${{ steps.electron-test-versions.outputs.matrix }}
electron: ${{ steps.electron-version.outputs.electron }}

name: build electron-32.0.0
steps:

needs: build
name: electron-versions
- 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: Get latest Electron version for 32.0.0
id: electron-version
shell: bash
run: |
node tools/getVersion.js 32
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

build-33:
runs-on: windows-2022
timeout-minutes: 20
strategy:
fail-fast: false
outputs:
electron: ${{ steps.electron-version.outputs.electron }}

name: build electron-33.0.0
steps:
- name: Electron versions

- 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: Get latest Electron version for 33.0.0
id: electron-version
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: |
node tools/getVersion.js 33
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

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}}
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
electron: ${{ needs.build-29.outputs.electron }}
os: ${{ matrix.os }}

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}}
steps:

- name: Checkout code
uses: actions/checkout@v4

test:
- name: Test build
uses: ./.github/actions/test-build
with:
electron: ${{ needs.build-30.outputs.electron }}
os: ${{ matrix.os }}

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}}
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:
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}}
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: ${{ fromJSON(needs.electron-versions.outputs.matrix) }}
fail-fast: false
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
needs: electron-versions
# fail-fast: false
timeout-minutes: 10
needs: build-33

name: test ${{ matrix.os }}-v${{ matrix.electron }}
name: test ${{ matrix.os }}-v${{needs.build-33.outputs.electron}}
steps:

- name: Checkout code
Expand All @@ -97,7 +247,6 @@ jobs:
- name: Test build
uses: ./.github/actions/test-build
with:
electron: ${{ matrix.electron }}
electron: ${{ needs.build-33.outputs.electron }}
os: ${{ matrix.os }}


Loading
Loading