Skip to content

Commit 4e662a3

Browse files
authored
Create c-cpp.yml
1 parent 2797352 commit 4e662a3

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/c-cpp.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: C++ CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Set up dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y g++ make
21+
22+
- name: Build
23+
run: |
24+
make all
25+
26+
- name: Run executable
27+
run: |
28+
# Example execution; adjust arguments as needed
29+
./lab4 trace 1,2-4,3 100 3 \
30+
P1,0,5 P2,2,3 P3,4,2
31+
32+
- name: Verify build artifacts
33+
run: |
34+
# Verify that the executable exists and is executable
35+
if [ ! -x ./cpu-scheduler ]; then echo "Executable not found" && exit 1; fi

0 commit comments

Comments
 (0)