diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87768c3..3002d57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -103,6 +132,12 @@ jobs: (Get-Content -Raw build/edge_coreclr.vcxproj) -replace 'Strict', '' | Out-File -Encoding Utf8 build/edge_coreclr.vcxproj (Get-Content -Raw build/edge_nativeclr.vcxproj) -replace 'Strict', '' | 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