Skip to content

Commit f8882b8

Browse files
committed
add github actions to test linux builds
1 parent 366d61a commit f8882b8

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build-linux:
11+
name: Build on Linux (${{ matrix.arch }})
12+
runs-on: ${{ matrix.runner }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- arch: x86_64
18+
runner: ubuntu-latest
19+
- arch: arm64
20+
runner: ubuntu-24.04-arm64
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Install dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y build-essential cmake curl
30+
31+
- name: Build project
32+
run: make
33+
34+
- name: Verify executables
35+
run: |
36+
ls -lh webserver webclient
37+
file webserver webclient
38+
39+
- name: Run basic test
40+
run: |
41+
# Start webserver in background
42+
./webserver &
43+
WEBSERVER_PID=$!
44+
45+
# Wait for server to start
46+
sleep 2
47+
48+
# Test with curl
49+
curl -f http://127.0.0.1:8000/ || (kill $WEBSERVER_PID; exit 1)
50+
51+
# Run webclient test
52+
./webclient || (kill $WEBSERVER_PID; exit 1)
53+
54+
# Stop webserver
55+
kill $WEBSERVER_PID
56+
57+
echo "Tests passed!"

0 commit comments

Comments
 (0)