-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,25 @@ name: Build | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
build-version: | ||
description: 'Electron version to build' | ||
required: true | ||
default: '31.0.0' | ||
type: choice | ||
options: | ||
- 29.0.0 | ||
- 30.0.0 | ||
- 31.0.0 | ||
test-version: | ||
description: 'Electron version to test build' | ||
required: true | ||
default: '31.6.0' | ||
type: choice | ||
options: | ||
- 29.4.6 | ||
- 30.5.1 | ||
- 31.6.0 | ||
|
||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # required to setup CSC | ||
|
@@ -12,13 +31,13 @@ jobs: | |
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
# fail-fast: false | ||
matrix: | ||
electron: [29.0.0, 30.0.0, 31.0.0] | ||
# electron: [29.0.0, 30.0.0, 31.0.0] | ||
# electron: [29.0.0] | ||
os: [windows-2022] | ||
|
||
name: build ${{ matrix.os }}-v${{ matrix.electron }} | ||
name: build ${{ matrix.os }}-v${{ inputs.build-version }} | ||
steps: | ||
|
||
- name: Checkout code | ||
|
@@ -27,57 +46,58 @@ jobs: | |
- name: Setup env | ||
uses: ./.github/actions/setup-env | ||
with: | ||
electron: ${{ matrix.electron }} | ||
electron: ${{ inputs.build-version }} | ||
os: ${{ matrix.os }} | ||
|
||
- name: install node-gyp | ||
run: npm i -g node-gyp | ||
|
||
- uses: agracio/[email protected] | ||
id: electron_version | ||
with: | ||
value: "${{ matrix.electron }}" | ||
value: "${{ inputs.build-version }}" | ||
length_from_start: 2 | ||
|
||
- name: Create release folder | ||
run: | | ||
mkdir "release\ia32\${{ matrix.electron }}" | ||
mkdir "release\x64\${{ matrix.electron }}" | ||
mkdir "release\arm64\${{ matrix.electron }}" | ||
mkdir "release\ia32\${{ inputs.build-version }}" | ||
mkdir "release\x64\${{ inputs.build-version }}" | ||
mkdir "release\arm64\${{ inputs.build-version }}" | ||
- name: Build ia32 | ||
timeout-minutes: 30 | ||
run: | | ||
node-gyp configure build --target=${{ matrix.electron }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=ia32 | ||
cmd /c copy /y build\Release\edge_*.node release\ia32\${{ matrix.electron }} | ||
node-gyp configure build --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=ia32 | ||
cmd /c copy /y build\Release\edge_*.node release\ia32\${{ inputs.build-version }} | ||
cmd /c rmdir /S /Q build | ||
- name: Build x64 | ||
timeout-minutes: 30 | ||
run: | | ||
node-gyp configure build --target=${{ matrix.electron }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=x64 | ||
cmd /c copy /y build\Release\edge_*.node release\x64\${{ matrix.electron }} | ||
node-gyp configure build --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=x64 | ||
cmd /c copy /y build\Release\edge_*.node release\x64\${{ inputs.build-version }} | ||
cmd /c rmdir /S /Q build | ||
- name: Build arm64 | ||
timeout-minutes: 30 | ||
shell: pwsh | ||
run: | | ||
node-gyp configure --target=${{ matrix.electron }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=arm64 | ||
node-gyp configure --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=arm64 | ||
(Get-Content -Raw build/build_managed.vcxproj) -replace '<FloatingPointModel>Strict</FloatingPointModel>', '<!-- <FloatingPointModel>Strict</FloatingPointModel> -->' | Out-File -Encoding Utf8 build/build_managed.vcxproj | ||
(Get-Content -Raw build/edge_coreclr.vcxproj) -replace '<FloatingPointModel>Strict</FloatingPointModel>', '<!-- <FloatingPointModel>Strict</FloatingPointModel> -->' | Out-File -Encoding Utf8 build/edge_coreclr.vcxproj | ||
(Get-Content -Raw build/edge_nativeclr.vcxproj) -replace '<FloatingPointModel>Strict</FloatingPointModel>', '<!-- <FloatingPointModel>Strict</FloatingPointModel> -->' | Out-File -Encoding Utf8 build/edge_nativeclr.vcxproj | ||
node-gyp build | ||
cmd /c copy /y build\Release\edge_*.node release\arm64\${{ matrix.electron }} | ||
cmd /c copy /y build\Release\edge_*.node release\arm64\${{ inputs.build-version }} | ||
cmd /c rmdir /S /Q build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: success() | ||
with: | ||
name: ${{ matrix.electron }} | ||
name: ${{ inputs.build-version }} | ||
path: | | ||
release | ||
|
@@ -86,26 +106,27 @@ jobs: | |
needs: build | ||
strategy: | ||
matrix: | ||
electron: [29.4.6, 30.5.1, 31.6.0] | ||
# electron: [29.4.6, 30.5.1, 31.6.0] | ||
# electron: [29.4.6] | ||
os: [windows-2022] | ||
fail-fast: false | ||
# fail-fast: false | ||
|
||
name: test ${{ matrix.os }}-v${{ matrix.electron }} | ||
name: test ${{ matrix.os }}-v${{ inputs.test-version }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup env | ||
uses: ./.github/actions/setup-env | ||
with: | ||
electron: ${{ matrix.electron }} | ||
electron: ${{ inputs.test-version }} | ||
os: ${{ matrix.os }} | ||
replace-version: true | ||
|
||
- uses: agracio/[email protected] | ||
id: electron_version | ||
with: | ||
value: ${{ matrix.electron }} | ||
value: ${{ inputs.test-version }} | ||
length_from_start: 2 | ||
|
||
- name: Create release folder | ||
|
@@ -130,12 +151,12 @@ jobs: | |
timeout-minutes: 10 | ||
uses: ./.github/actions/test-windows | ||
with: | ||
electron: ${{ matrix.electron }} | ||
electron: ${{ inputs.test-version }} | ||
|
||
- name: Test report | ||
uses: ./.github/actions/create-test-report | ||
with: | ||
electron: ${{ matrix.electron }} | ||
electron: ${{ inputs.test-version }} | ||
os: ${{ matrix.os }} | ||
name: 'build-tests' | ||
|
||
|