Skip to content

Commit

Permalink
updating workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Oct 27, 2024
1 parent a9f4f2f commit 1f23c7a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 11 deletions.
33 changes: 33 additions & 0 deletions .github/actions/build/action.yml
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
17 changes: 10 additions & 7 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,25 @@ jobs:
- name: Build ia32
timeout-minutes: 30
uses: ./.github/actions/build-ia32
uses: ./.github/actions/build
with:
electron: ${{ matrix.electron }}
electron: ${{ inputs.build-version }}
arch: 'ia32'

- name: Build x64
timeout-minutes: 30
uses: ./.github/actions/build-x64
uses: ./.github/actions/build
with:
electron: ${{ matrix.electron }}
electron: ${{ inputs.build-version }}
arch: 'x64'

- name: Build arm64
timeout-minutes: 30
uses: ./.github/actions/build-arm64
uses: ./.github/actions/build
with:
electron: ${{ matrix.electron }}

electron: ${{ inputs.build-version }}
arch: 'arm64'

- name: Upload artifacts
uses: actions/upload-artifact@v4
if: success()
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,24 @@ jobs:
- name: Build ia32
timeout-minutes: 30
uses: ./.github/actions/build-ia32
uses: ./.github/actions/build
with:
electron: ${{ inputs.build-version }}
arch: 'ia32'

- name: Build x64
timeout-minutes: 30
uses: ./.github/actions/build-x64
uses: ./.github/actions/build
with:
electron: ${{ inputs.build-version }}
arch: 'x64'

- name: Build arm64
timeout-minutes: 30
uses: ./.github/actions/build-arm64
uses: ./.github/actions/build
with:
electron: ${{ inputs.build-version }}
arch: 'arm64'

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '.github/FUNDING.YML'
- '.github/workflows/build.yml'
- '.github/workflows/build*.yml'
- '.github/actions/test-build/action.yml'
- '.github/actions/build*/*.*'
- '**/*.md'
- '**/*.d.ts'
Expand Down Expand Up @@ -42,6 +43,7 @@ on:
- '.github/FUNDING.YML'
- '.github/workflows/build.yml'
- '.github/workflows/build*.yml'
- '.github/actions/test-build/action.yml'
- '.github/actions/build*/*.*'
- '**/*.md'
- '**/*.d.ts'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ results

node_modules
npm-debug.log
build
/build

bin/
obj/
Expand Down

0 comments on commit 1f23c7a

Please sign in to comment.