Skip to content

Commit b113840

Browse files
authored
fix clang build (#98)
* fix build * install libgtest-dev * sudo
1 parent cf18244 commit b113840

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

.github/workflows/linux.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Linux
2+
3+
on: [push]
4+
5+
jobs:
6+
ubuntu:
7+
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#example-running-with-more-than-one-operating-system
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
matrix:
12+
os:
13+
- ubuntu-18.04
14+
- ubuntu-20.04
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- run: sudo apt install -y libgtest-dev libbenchmark-dev
20+
- run: |
21+
mkdir /tmp/gtest
22+
cd /tmp/gtest
23+
cmake /usr/src/googletest -DCMAKE_CXX_FLAGS=-std=c++11 -Dgtest_disable_pthreads=1
24+
sudo make install
25+
26+
- run: ./configure --examples --tests --benchmarks
27+
- run: make
28+
- run: make test

.github/workflows/windows.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Windows
22

33
on: [push]
44

tests/test_tensor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ struct test_5d_array {
8787

8888
if (write) {
8989
int idx = 0;
90-
for (const auto &t1 : t) {
91-
for (const auto &t2 : t1) {
92-
for (const auto &t3 : t2) {
90+
for (const auto &&t1 : t) {
91+
for (const auto &&t2 : t1) {
92+
for (const auto &&t3 : t2) {
9393
for (const auto &&t4 : t3) {
9494
for (auto &&t5 : t4) {
9595
++idx;

0 commit comments

Comments
 (0)