Skip to content

Commit 6b2f9ad

Browse files
committed
add C++ source and compile job
1 parent 2494188 commit 6b2f9ad

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ on:
99
- main
1010

1111
jobs:
12+
compile:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: g++ -Wall -Wextra -o test source.cpp
17+
- run: ./test
18+
1219
test:
20+
needs:
21+
- compile
1322
runs-on: ubuntu-latest
1423
steps:
1524
- uses: actions/checkout@v4

source.cpp

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

0 commit comments

Comments
 (0)