Skip to content

Commit cf35674

Browse files
committed
publishing n shit
1 parent 5aa32ef commit cf35674

3 files changed

Lines changed: 82 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-windows:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up MSVC
16+
uses: ilammy/msvc-dev-cmd@v1
17+
with:
18+
arch: x86
19+
20+
- name: Build Windows DLL
21+
run: |
22+
cl.exe /nologo /std:c11 /O2 /LD /DNDEBUG prof.c ws2_32.lib /Fe:prof.dll
23+
24+
- name: Upload Windows artifact
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: windows-dll
28+
path: prof.dll
29+
30+
build-linux:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
36+
- name: Install dependencies
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y gcc-multilib
40+
41+
- name: Build Linux SO
42+
run: |
43+
gcc -std=c11 -m32 -shared -fPIC -Ofast -s -DNDEBUG prof.c -pthread -o libprof.so
44+
45+
- name: Upload Linux artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: linux-so
49+
path: libprof.so
50+
51+
release:
52+
needs: [build-windows, build-linux]
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Get Short Git Hash
59+
id: git_hash
60+
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
61+
62+
- uses: actions/download-artifact@v4
63+
64+
- name: Display structure of downloaded files
65+
run: ls -R
66+
67+
- name: Create Release
68+
id: create_release
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
tag_name: build-${{ steps.git_hash.outputs.hash }}
72+
name: Build ${{ steps.git_hash.outputs.hash }}
73+
files: |
74+
windows-dll/prof.dll
75+
linux-so/libprof.so

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
prof.*
2+
!prof.c

readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## byond-tracy
22
byond-tracy glues together a byond server with the tracy profiler allowing you to analyze and visualize proc calls
33

4+
45
## supported byond versions
56
| windows | linux |
67
| -------- | -------- |
@@ -95,6 +96,10 @@ UTRACY_BIND_PORT
9596
```
9697

9798
## building
99+
100+
You can download a precompiled byond-tracy executable from the [Releases page](https://github.com/spacestation13/byond-tracy/releases).
101+
The Linux one is unlikely to work. No guarantees on these.
102+
98103
no build system included, simply invoke your preferred c11 compiler.
99104
examples:
100105
```console
@@ -108,6 +113,3 @@ clang.exe -std=c11 -m32 -shared -Ofast3 -DNDEBUG -fuse-ld=lld-link prof.c -lws2_
108113
```console
109114
gcc -std=c11 -m32 -shared -fPIC -Ofast -s -DNDEBUG prof.c -pthread -o libprof.so
110115
```
111-
112-
## remarks
113-
byond-tracy is in its infancy and is not production ready for live servers.

0 commit comments

Comments
 (0)