Skip to content

Commit 413ab66

Browse files
committed
feat: modify workflow
1 parent 14cf73d commit 413ab66

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

.github/workflows/build_node_shared.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
compiler: [gcc, clang]
17+
build_type: [debug, release]
1718
container:
1819
image: ghcr.io/ten-framework/ten_building_ubuntu2204
1920
steps:
@@ -25,31 +26,40 @@ jobs:
2526

2627
- name: Configure and Build
2728
run: |
28-
# if [ "$compiler" == "gcc" ]; then
29-
# export CC=gcc
30-
# export CXX=g++
31-
# else
32-
# export CC=clang
33-
# export CXX=clang++
34-
# fi
29+
if [ "$compiler" == "gcc" ]; then
30+
export CC=gcc
31+
export CXX=g++
32+
else
33+
export CC=clang
34+
export CXX=clang++
35+
fi
3536
36-
# ./configure --shared
37-
# make -j$(nproc)
37+
if [ "$build_type" == "debug" ]; then
38+
./configure --shared --debug
39+
else
40+
./configure --shared
41+
fi
3842
39-
# Mock build
40-
mkdir -p out/Release
41-
# Create a dummy file
42-
touch out/Release/libnode.so.127
43+
make -j$(nproc)
4344
4445
- name: Package assets
4546
if: startsWith(github.ref, 'refs/tags/')
4647
run: |
47-
cd out/Release
48-
zip node-shared-linux-x64-${{ matrix.compiler }}.zip libnode.so.127
48+
if [ "$build_type" == "debug" ]; then
49+
cd out/Debug
50+
else
51+
cd out/Release
52+
fi
53+
54+
zip node-shared-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip libnode.so.127
4955
5056
- name: Publish to release assets
5157
uses: softprops/action-gh-release@v2
5258
if: startsWith(github.ref, 'refs/tags/')
5359
with:
5460
files: |
55-
out/Release/node-shared-linux-x64-${{ matrix.compiler }}.zip
61+
if [ "$build_type" == "debug" ]; then
62+
out/Debug/node-shared-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip
63+
else
64+
out/Release/node-shared-linux-x64-${{ matrix.compiler }}-${{ matrix.build_type }}.zip
65+
fi

0 commit comments

Comments
 (0)