Skip to content

Commit

Permalink
ci: fix macos build and load built-in nexttrace
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeboboliu committed Nov 13, 2023
1 parent 07edaf4 commit 5b91d32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
self_contained: "--self-contained"
framework: net6.0
nt_file: nexttrace_darwin_amd64
nt_fn: nexttrace
nt_fn: OpenTrace.app/Contents/MacOS/nexttrace
pack_target: OpenTrace.app

steps:
- name: Checkout
Expand Down Expand Up @@ -67,12 +68,12 @@ jobs:
cd ${{ matrix.artifact_path }}
mv ./nexttrace_* ./${{ matrix.nt_fn }}
chmod +x ./${{ matrix.nt_fn }}
tar -cvzf ../../../../../${{ matrix.runtime }}.tar.gz .
tar -cvzf ${{ github.workspace }}/${{ matrix.runtime }}.tar.gz ${{ matrix.pack_target == '' && '.' || matrix.pack_target }}
- name: Edit release for ${{ matrix.runtime }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.runtime }}.tar.gz
asset_name: ${{ matrix.runtime }}.tar.gz
tag: ${{ github.ref }}
tag: ${{ github.ref }}
7 changes: 6 additions & 1 deletion NextTraceWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ public NextTraceWrapper()
break;
}
}
if(nexttracePath != null) break;
if (nexttracePath != null) break;
else if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OpenTrace.app/Contents/MacOS", otherBinaryName)))
{
nexttracePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OpenTrace.app/Contents/MacOS", otherBinaryName);
break;
}
}
}
}
Expand Down

0 comments on commit 5b91d32

Please sign in to comment.