Skip to content

Commit

Permalink
testing macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Mar 9, 2025
1 parent 9321d96 commit 0b67482
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ runs:
if ( '${{ runner.os }}' -eq 'macOS'){
Get-ChildItem -Path build/Release
Copy-Item "build/Release/edge_coreclr.node" -Destination "release/darwin/${{ inputs.arch }}/${{ inputs.node-major }}"
node-gyp clean
Copy-Item "build/Release/edge_nativeclr.node" -Destination "release/darwin/${{ inputs.arch }}/${{ inputs.node-major }}"
Copy-Item "build/Release/MonoEmbedding.exe" -Destination "release/darwin/${{ inputs.arch }}/${{ inputs.node-major }}"
node-gyp clean
}
8 changes: 6 additions & 2 deletions .github/actions/test-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ runs:
try {
const fs = require('fs')
fs.copyFileSync('release/darwin-edge-js-${{ inputs.node }}/darwin/x64/${{ inputs.node }}/edge_coreclr.node', 'lib/native/darwin/x64/${{ inputs.node }}/edge_coreclr.node');
fs.copyFileSync('release/darwin-edge-js-${{ inputs.node }}/darwin/x64/${{ inputs.node }}/edge_nativeclr.node', 'lib/native/darwin/x64/${{ inputs.node }}/edge_nativeclr.node');
fs.copyFileSync('release/darwin-edge-js-${{ inputs.node }}/darwin/x64/${{ inputs.node }}/MonoEmbedding.exe', 'lib/native/darwin/x64/${{ inputs.node }}/MonoEmbedding.exe');
fs.copyFileSync('release/darwin-edge-js-${{ inputs.node }}/darwin/arm64/${{ inputs.node }}/edge_coreclr.node', 'lib/native/darwin/arm64/${{ inputs.node }}/edge_coreclr.node');
fs.copyFileSync('release/darwin-edge-js-${{ inputs.node }}/darwin/arm64/${{ inputs.node }}/edge_nativeclr.node', 'lib/native/darwin/arm64/${{ inputs.node }}/edge_nativeclr.node');
fs.copyFileSync('release/darwin-edge-js-${{ inputs.node }}/darwin/arm64/${{ inputs.node }}/MonoEmbedding.exe', 'lib/native/darwin/arm64/${{ inputs.node }}/MonoEmbedding.exe');
} catch(err) {
core.error("Error creating release directory")
core.setFailed(err)
Expand All @@ -93,12 +97,12 @@ runs:
if: runner.os == 'macOS'
uses: andstor/file-existence-action@v3
with:
files: "lib/native/darwin/${{ runner.arch }}/${{ inputs.node }}/edge_coreclr.node"
files: "lib/native/darwin/${{ runner.arch }}/${{ inputs.node }}/edge_coreclr.node, lib/native/darwin/${{ runner.arch }}/${{ inputs.node }}/edge_nativeclr.node"
fail: true
ignore_case: true

- name: Run .NET 4.5 tests
if: runner.os == 'Windows'
# if: runner.os == 'Windows'
shell: bash
run: node tools/test.js CI

Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ jobs:
node: ${{ inputs.build-version }}
os: ${{ matrix.os }}

# test:
# runs-on: ${{ matrix.os }}
# needs: build
# strategy:
# matrix:
# # os: [windows-2022]
# os: [windows-2022, macos-13, macos-15]
# fail-fast: false
test:
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
os: [macos-13, macos-14]
# os: [windows-2022, macos-13, macos-15]
fail-fast: false

# name: test node-${{ inputs.build-version }} ${{ matrix.os }}
# steps:
name: test node-${{ inputs.build-version }} ${{ matrix.os }}
steps:

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

# - name: Test build
# uses: ./.github/actions/test-build
# with:
# node: ${{ inputs.build-version }}
# os: ${{ matrix.os }}
- name: Test build
uses: ./.github/actions/test-build
with:
node: ${{ inputs.build-version }}
os: ${{ matrix.os }}
2 changes: 1 addition & 1 deletion lib/edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ else if (process.platform === 'win32') {
edgeNative = path.resolve(__dirname, './native/' + process.platform + '/' + process.arch + '/' + determineVersion() + '/' + (process.env.EDGE_USE_CORECLR ? 'edge_coreclr' : 'edge_nativeclr'));
}
else if(process.platform === 'darwin'){
edgeNative = path.resolve(__dirname, './native/' + process.platform + '/' + process.arch + '/' + nodeVersion + '/' + 'edge_coreclr.node');
edgeNative = path.resolve(__dirname, './native/' + process.platform + '/' + process.arch + '/' + nodeVersion + '/' + (process.env.EDGE_USE_CORECLR ? 'edge_coreclr.node' : 'edge_nativeclr.node'));
if(!fs.existsSync(edgeNative)){
edgeNative = builtEdge;
if(!fs.existsSync(edgeNative)){
Expand Down

0 comments on commit 0b67482

Please sign in to comment.