Build #19
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
name: Build | |
on: | |
workflow_dispatch: | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # required to setup CSC | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
jobs: | |
build: | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: true | |
matrix: | |
# electron: [29.0.0, 30.0.0, 31.0.0] | |
electron: [29.0.0] | |
name: build electron-${{ matrix.electron }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup env | |
uses: ./.github/actions/setup-env | |
with: | |
electron: ${{ matrix.electron }} | |
- name: install node-gyp | |
run: npm i -g node-gyp | |
- uses: agracio/[email protected] | |
id: electron_version | |
with: | |
value: "${{ matrix.electron }}" | |
length_from_start: 2 | |
- name: Create release folder | |
run: | | |
mkdir "release\ia32\${{ matrix.electron }}" | |
mkdir "release\x64\${{ matrix.electron }}" | |
mkdir "release\arm64\${{ matrix.electron }}" | |
- 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 }} | |
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 }} | |
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 | |
(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 rmdir /S /Q build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: ${{ matrix.electron }} | |
path: | | |
release | |
test: | |
runs-on: ${{ matrix.os }} | |
needs: build | |
strategy: | |
matrix: | |
# electron: [29.4.6, 30.5.1, 31.6.0] | |
electron: [29.4.6] | |
os: [windows-2022] | |
fail-fast: false | |
name: test electron-${{ matrix.electron }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup env | |
uses: ./.github/actions/setup-env | |
with: | |
electron: ${{ matrix.electron }} | |
replace-version: true | |
- uses: agracio/[email protected] | |
id: electron_version | |
with: | |
value: ${{ matrix.electron }} | |
length_from_start: 2 | |
- name: Create release folder | |
shell: cmd | |
run: | | |
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" | |
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" | |
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: ${{ steps.electron_version.outputs.substring }}.0.0* | |
- run: ls -R release | |
- name: Copy artifacts | |
shell: cmd | |
run: | | |
copy /y release\${{ 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 | |
timeout-minutes: 10 | |
uses: ./.github/actions/test-windows | |
with: | |
electron: ${{ matrix.electron }} | |
- name: Test report | |
uses: ./.github/actions/create-test-report | |
with: | |
electron: ${{ matrix.electron }} | |