File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Nodepp C++ Cross-Platform CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build_and_test :
11+ # 1. Define the runners for the matrix strategy
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [ubuntu-latest, macos-latest, windows-latest]
16+
17+ # 2. Use the matrix variable to set the runner OS
18+ runs-on : ${{ matrix.os }}
19+
20+ steps :
21+ - name : ⬇️ Checkout code
22+ uses : actions/checkout@v4
23+
24+ # --- 🧪 Unit Test Compilation and Run ---
25+
26+ - name : 🧪 Unit Test (Linux/macOS)
27+ # Uses -lssl -lcrypto -lpthread flags
28+ if : runner.os != 'Windows'
29+ run : |
30+ echo "Running Unix-like Unit Test build..." ; cd ./test
31+ g++ -o main main.cpp -I../include -lpthread ; ./main
32+
33+ - name : 🧪 Unit Test (Windows)
34+ # Uses -lssl -lcrypto -lws2_32 flags
35+ if : runner.os == 'Windows'
36+ run : |
37+ echo "Running Windows Unit Test build..." ; cd ./test
38+ g++ -o main main.cpp -I../include -lws2_32; ./main.exe
39+
40+ # --- End of the workflow ---
You can’t perform that action at this time.
0 commit comments