Skip to content

Commit

Permalink
Adding Electron 32 build
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 26, 2024
1 parent a030e75 commit 39fd8c7
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,20 @@ jobs:
elif [[ ${{ inputs.build-version }} == '32.0.0' ]]; then
echo "test-version=32.1.2" >> $GITHUB_OUTPUT
fi
# else
# core.setFailed("Unable to resolve Electron version for testing")
# fi
# - name: Resolve Node.js version
# id: node-version
# shell: bash
# run: |
# if [[ ${{ inputs.build-version }} == '29.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# elif [[ ${{ inputs.build-version }} == '30.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# elif [[ ${{ inputs.build-version }} == '31.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# elif [[ ${{ inputs.build-version }} == '32.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# fi

- name: Setup env
uses: ./.github/actions/setup-env
Expand All @@ -81,15 +92,33 @@ jobs:
- name: Build ia32
timeout-minutes: 30
shell: pwsh
run: |
node-gyp configure build --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=ia32
node-gyp configure --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=ia32
if ( '${{ inputs.build-version }}' -eq '32.0.0'){
(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\ia32\${{ inputs.build-version }}
cmd /c rmdir /S /Q build
- name: Build x64
timeout-minutes: 30
shell: pwsh
run: |
node-gyp configure build --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=x64
node-gyp configure --target=${{ inputs.build-version }} --disturl=https://electronjs.org/headers --runtime=electron --release --arch=x64
if ( '${{ inputs.build-version }}' -eq '32.0.0'){
(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\x64\${{ inputs.build-version }}
cmd /c rmdir /S /Q build
Expand All @@ -103,6 +132,12 @@ jobs:
(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.build-version }}' -eq '32.0.0'){
(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\arm64\${{ inputs.build-version }}
cmd /c rmdir /S /Q build
Expand Down

0 comments on commit 39fd8c7

Please sign in to comment.