Skip to content

Commit c408746

Browse files
authored
feat: add hello_world.cpp and related pipeline
1 parent 015d18a commit c408746

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/example2.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: build-hello-world
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-hello-world:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: install g++
16+
run: sudo apt install -y g++
17+
18+
- name: check build
19+
run: |
20+
g++ hello_world.cpp -o hello_world
21+
./hello_world

hello_world.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main() {
5+
6+
cout << "Hello World" << endl;
7+
8+
return 0;
9+
}

0 commit comments

Comments
 (0)