Skip to content

Commit 2755f8b

Browse files
committed
jh
1 parent b8dc2ce commit 2755f8b

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/run_tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
- uses: actions/checkout@v4
3232
with:
3333
submodules: true
34+
- name: Run test
35+
run: |
36+
clang++ test.cpp -o test -std=c++11
37+
./test
3438
- name: Set up Python version ${{ matrix.version }}
3539
uses: actions/setup-python@v4
3640
with:
@@ -45,6 +49,10 @@ jobs:
4549
echo "export CXXFLAGS=\"$CXXFLAGS -I/opt/homebrew/opt/libomp/include\"" >> ~/.bashrc
4650
echo "export LDFLAGS=\"$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp\"" >> ~/.bashrc
4751
source ~/.bashrc
52+
- name: Run test 2
53+
run: |
54+
clang++ test.cpp -o test -std=c++11
55+
./test
4856
- name: Install OMP (Linux)
4957
if: runner.os == 'Linux'
5058
run: |

test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <iostream>
2+
#include <algorithm>
3+
4+
int main(int argc, char* argv[])
5+
{
6+
char b[1000];
7+
char a[] = "0123456789";
8+
std::copy(&a[0], &a[5], &b[0]);
9+
std::cout << b << std::endl;
10+
return 0;
11+
}

0 commit comments

Comments
 (0)