Skip to content

Commit

Permalink
updating CI
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Dec 5, 2024
1 parent 7389322 commit adf4a49
Show file tree
Hide file tree
Showing 2 changed files with 182 additions and 102 deletions.
182 changes: 182 additions & 0 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: Build All

on:
workflow_dispatch:

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
node: 20

jobs:
build-16:
runs-on: windows-2022

name: build node-16
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Build Node 16
uses: ./.github/actions/build-node
with:
node: 16
os: ${{ runner.os }}

build-18:
runs-on: windows-2022

name: build node-18
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Build Node 18
uses: ./.github/actions/build-node
with:
node: 18
os: ${{ runner.os }}

build-20:
runs-on: windows-2022

name: build node-20
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Build Node 20
uses: ./.github/actions/build-node
with:
node: 20
os: ${{ runner.os }}

build-22:
runs-on: windows-2022

name: build node-22
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Build Node 22
uses: ./.github/actions/build-node
with:
node: 22
os: ${{ runner.os }}

build-23:
runs-on: windows-2022

name: build node-23
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Build Node 23
uses: ./.github/actions/build-node
with:
node: 23
os: ${{ runner.os }}

test-16:
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
needs: build-16

name: test ${{ matrix.os }}-node-16
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
node: 16
os: ${{ matrix.os }}

test-18:
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
needs: build-18

name: test ${{ matrix.os }}-node-18
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
node: 18
os: ${{ matrix.os }}

test-20:
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
needs: build-20

name: test ${{ matrix.os }}-node-20
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
node: 20
os: ${{ matrix.os }}

test-22:
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
needs: build-22

name: test ${{ matrix.os }}-node-22
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
node: 22
os: ${{ matrix.os }}

test-23:
strategy:
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
needs: build-23

name: test ${{ matrix.os }}-node-23
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
node: 23
os: ${{ matrix.os }}

102 changes: 0 additions & 102 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
node: 20

jobs:
build:
Expand All @@ -40,107 +39,6 @@ jobs:
node: ${{ inputs.build-version }}
os: ${{ runner.os }}

# - name: Setup env
# uses: ./.github/actions/setup-env
# with:
# node: ${{ env.node }}
# os: windows-2022

# - name: Get latest Node.js version for v${{ inputs.build-version }}
# id: node-test-version
# shell: bash
# run: |
# node tools/getVersionAction.js ${{ inputs.build-version }}
# echo "node-version=$(cat node.txt)" >> $GITHUB_OUTPUT

# - name: install node-gyp
# run: npm i -g node-gyp

# - name: Create release folder
# uses: actions/github-script@v7
# with:
# result-encoding: string
# script: |
# try {
# const fs = require('fs')
# if(${{ inputs.build-version }} <23){
# fs.mkdirSync('release/ia32/${{ inputs.build-version }}', { recursive: true });
# }
# fs.mkdirSync('release/x64/${{ inputs.build-version }}', { recursive: true });
# if(${{ inputs.build-version }} >=20){
# fs.mkdirSync('release/arm64/${{ inputs.build-version }}', { recursive: true });
# }
# } catch(err) {
# core.error("Error creating release directory")
# core.setFailed(err)
# }

# - name: Create node.version file
# uses: actions/github-script@v7
# with:
# result-encoding: string
# script: |
# try {
# const fs = require('fs')
# if(${{ inputs.build-version }} <23){
# fs.writeFileSync('release/ia32/${{ inputs.build-version }}/node.version', '${{ steps.node-test-version.outputs.node-version }}');
# }
# fs.writeFileSync('release/x64/${{ inputs.build-version }}/node.version', '${{ steps.node-test-version.outputs.node-version }}');
# if(${{ inputs.build-version }} >=20){
# fs.writeFileSync('release/arm64/${{ inputs.build-version }}/node.version', '${{ steps.node-test-version.outputs.node-version }}');
# }
# } catch(err) {
# core.error("Error writing node.version file")
# core.setFailed(err)
# }

# - name: Cache node-gyp
# uses: actions/cache@v4
# env:
# cache-name: cache-node-gyp
# with:
# path: ~\AppData\Local\node-gyp\Cache
# key: ${{ steps.node-test-version.outputs.node-version }}

# - name: Build ia32
# timeout-minutes: 30
# if: ${{ inputs.build-version <23 }}
# run: |
# node-gyp configure build --target=${{ steps.node-test-version.outputs.node-version }} --runtime=node --release --arch=ia32
# 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
# run: |
# node-gyp configure build --target=${{ steps.node-test-version.outputs.node-version }} --runtime=node --release --arch=x64
# cmd /c copy /y build\Release\edge_*.node release\x64\${{ inputs.build-version }}
# cmd /c rmdir /S /Q build

# - name: Build arm64
# timeout-minutes: 30
# if: ${{ inputs.build-version >=20 }}
# shell: pwsh
# run: |
# node-gyp configure --target=${{ steps.node-test-version.outputs.node-version }} --runtime=node --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\${{ inputs.build-version }}
# cmd /c rmdir /S /Q build


# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# if: success()
# with:
# name: edge-js-${{ inputs.build-version }}
# path: |
# release

test:
runs-on: ${{ matrix.os }}
needs: build
Expand Down

0 comments on commit adf4a49

Please sign in to comment.