-
-
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.
Merge pull request #166 from agracio/clr-runtime
Merging from clr-runtime branch
- Loading branch information
Showing
44 changed files
with
374 additions
and
144 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'Build Windows binaries' | ||
description: 'Build Windows binaries' | ||
inputs: | ||
electron: | ||
description: 'Electron version' | ||
required: true | ||
arch: | ||
description: 'Target arch' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Build ${{ inputs.arch }} | ||
shell: pwsh | ||
run: | | ||
node-gyp configure --target=${{ inputs.electron }}.0.0 --disturl=https://electronjs.org/headers --runtime=electron --release --arch=${{ inputs.arch }} | ||
if ( '${{ inputs.arch }}' -eq '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 | ||
} | ||
if ( '${{ inputs.electron }}' -ge 32 -And '${{ inputs.arch }}' -eq 'arm64'){ | ||
(Get-Content -Raw build/build_managed.vcxproj) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 build/build_managed.vcxproj | ||
(Get-Content -Raw build/edge_coreclr.vcxproj) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 build/edge_coreclr.vcxproj | ||
(Get-Content -Raw build/edge_nativeclr.vcxproj) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 build/edge_nativeclr.vcxproj | ||
} | ||
node-gyp build | ||
cmd /c copy /y build\Release\edge_*.node release\${{ inputs.arch }}\${{ inputs.electron }}.0.0 | ||
cmd /c rmdir /S /Q build |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Get Electron version' | ||
description: 'Get Electron version' | ||
inputs: | ||
electron: | ||
description: 'Electron version' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Resolve Electron version from major | ||
shell: bash | ||
run: | | ||
if [[ ${{ inputs.electron }} == '29' ]]; then | ||
echo "test-version=29.4.6" >> $GITHUB_OUTPUT | ||
elif [[ ${{ inputs.electron }} == '30' ]]; then | ||
echo "test-version=30.5.1" >> $GITHUB_OUTPUT | ||
elif [[ ${{ inputs.electron }} == '31' ]]; then | ||
echo "test-version=31.7.2" >> $GITHUB_OUTPUT | ||
elif [[ ${{ inputs.electron }} == '32' ]]; then | ||
echo "test-version=32.2.2" >> $GITHUB_OUTPUT | ||
elif [[ ${{ inputs.electron }} == '33' ]]; then | ||
echo "test-version=33.0.2" >> $GITHUB_OUTPUT | ||
fi |
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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 'Test built Windows binary' | ||
description: 'Test built Windows binary' | ||
inputs: | ||
os: | ||
description: 'runs-on' | ||
required: false | ||
default: 'windows-2022' | ||
electron: | ||
description: 'Electron version' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Setup env | ||
uses: ./.github/actions/setup-env | ||
with: | ||
electron: ${{ inputs.electron }} | ||
os: ${{ inputs.os }} | ||
replace-version: true | ||
|
||
- uses: agracio/[email protected] | ||
id: electron_version | ||
with: | ||
value: ${{ inputs.electron }} | ||
length_from_start: 2 | ||
|
||
- name: Create release folder | ||
shell: pwsh | ||
run: | | ||
cmd /c if not exist "lib\native\win32\ia32\${{ steps.electron_version.outputs.substring }}.0.0" mkdir "lib\native\win32\ia32\${{ steps.electron_version.outputs.substring }}.0.0" | ||
cmd /c if not exist "lib\native\win32\x64\${{ steps.electron_version.outputs.substring }}.0.0" mkdir "lib\native\win32\x64\${{ steps.electron_version.outputs.substring }}.0.0" | ||
cmd /c if not exist "lib\native\win32\arm64\${{ steps.electron_version.outputs.substring }}.0.0" mkdir "lib\native\win32\arm64\${{ steps.electron_version.outputs.substring }}.0.0" | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: release | ||
pattern: electron-edge-js-${{ steps.electron_version.outputs.substring }}.0.0* | ||
|
||
- name: List artifacts | ||
shell: bash | ||
run: ls -R release | ||
|
||
- name: Copy artifacts | ||
shell: pwsh | ||
run: | | ||
cmd /c copy /y release\electron-edge-js-${{ steps.electron_version.outputs.substring }}.0.0\x64\${{ steps.electron_version.outputs.substring }}.0.0\edge_*.node lib\native\win32\x64\${{ steps.electron_version.outputs.substring }}.0.0 | ||
- name: Test | ||
uses: ./.github/actions/test-windows | ||
with: | ||
electron: ${{ inputs.electron }} | ||
|
||
- name: Test report | ||
uses: ./.github/actions/create-test-report | ||
with: | ||
electron: ${{ inputs.electron }} | ||
os: ${{ inputs.os }} | ||
name: 'build-tests' | ||
|
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 |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Build All | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_NOLOGO: 1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
outputs: | ||
test-version: ${{ steps.electron-test-version.outputs.test-version }} | ||
strategy: | ||
# fail-fast: false | ||
matrix: | ||
electron: [29, 30, 31, 32, 33] | ||
os: [windows-2022] | ||
|
||
name: build ${{ matrix.os }}-v${{ matrix.electron }} | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Resolve Electron version from major | ||
id: electron-test-version | ||
shell: bash | ||
run: | | ||
if [[ ${{ matrix.electron }} == '29' ]]; then | ||
echo "test-version=29.4.6" >> $GITHUB_OUTPUT | ||
elif [[ ${{ matrix.electron }} == '30' ]]; then | ||
echo "test-version=30.5.1" >> $GITHUB_OUTPUT | ||
elif [[ ${{ matrix.electron }} == '31' ]]; then | ||
echo "test-version=31.7.2" >> $GITHUB_OUTPUT | ||
elif [[ ${{ matrix.electron }} == '32' ]]; then | ||
echo "test-version=32.2.2" >> $GITHUB_OUTPUT | ||
elif [[ ${{ matrix.electron }} == '33' ]]; then | ||
echo "test-version=33.0.2" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Setup env | ||
uses: ./.github/actions/setup-env | ||
with: | ||
electron: '${{ matrix.electron }}.0.0' | ||
os: ${{ matrix.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: Build ia32 | ||
timeout-minutes: 30 | ||
uses: ./.github/actions/build | ||
with: | ||
electron: ${{ inputs.build-version }} | ||
arch: 'ia32' | ||
|
||
- name: Build x64 | ||
timeout-minutes: 30 | ||
uses: ./.github/actions/build | ||
with: | ||
electron: ${{ inputs.build-version }} | ||
arch: 'x64' | ||
|
||
- name: Build arm64 | ||
timeout-minutes: 30 | ||
uses: ./.github/actions/build | ||
with: | ||
electron: ${{ inputs.build-version }} | ||
arch: 'arm64' | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: success() | ||
with: | ||
name: electron-edge-js-${{ matrix.electron }}.0.0 | ||
path: | | ||
release | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
needs: build | ||
strategy: | ||
matrix: | ||
os: [windows-2022] | ||
# fail-fast: false | ||
|
||
name: test ${{ matrix.os }}-v${{ needs.build.outputs.test-version }} | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test build | ||
uses: ./.github/actions/test-build | ||
with: | ||
electron: ${{ needs.build.outputs.test-version }} | ||
os: ${{ matrix.os }} | ||
|
||
|
Oops, something went wrong.