Skip to content

Commit 195989d

Browse files
authored
Update c-cpp.yml
1 parent 1e2167d commit 195989d

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

.github/workflows/c-cpp.yml

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

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

59
jobs:
610
build:
711
runs-on: ubuntu-latest
812

913
steps:
10-
- name: Check out repository
11-
uses: actions/checkout@v4
12-
13-
- name: Set up C++ environment
14-
run: sudo apt-get install g++
15-
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
14+
- uses: actions/checkout@v4
15+
16+
# Ensure configure is executable and then run it
17+
- name: Ensure configure is executable
18+
run: chmod +x ./configure
19+
20+
- name: configure
21+
run: ./configure
22+
23+
- name: make
24+
run: make
25+
26+
- name: make check
27+
run: make check
28+
29+
- name: make distcheck
30+
run: make distcheck

0 commit comments

Comments
 (0)