Skip to content

Commit 91fbdee

Browse files
authored
Update c-cpp.yml
1 parent 4120d2e commit 91fbdee

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

.github/workflows/c-cpp.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
name: C/C++ CI
1+
name: C++ Build
22

3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
3+
on: [push, pull_request]
84

95
jobs:
106
build:
117
runs-on: ubuntu-latest
128

139
steps:
14-
- uses: actions/checkout@v4
10+
- name: Check out repository
11+
uses: actions/checkout@v4
1512

16-
# Directly run make (if applicable)
17-
- name: make
18-
run: make
13+
- name: Set up C++ environment
14+
run: sudo apt-get install g++
1915

20-
- name: make check
21-
run: make check
22-
23-
- name: make distcheck
24-
run: make distcheck
16+
- name: Find and compile all C++ files
17+
run: |
18+
find problems -name "main.cpp" | while read file; do
19+
# Compile each main.cpp to an executable with a unique name
20+
dir=$(dirname "$file")
21+
g++ "$file" -o "${dir}/output"
22+
done

0 commit comments

Comments
 (0)