Skip to content

Commit

Permalink
Merge pull request #1 from 0xz/pr
Browse files Browse the repository at this point in the history
run action in PR
  • Loading branch information
PhilipDeegan committed Jan 21, 2024
2 parents 3978808 + 24bf334 commit 1bc922a
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 121 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build_nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: ubuntu-latest

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- run: |
sudo apt update && sudo apt install ninja-build ccache
chmod +x sh/run.sh && ./sh/run.sh
4 changes: 2 additions & 2 deletions sh/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" && cd $CWD/.. && CWD=$PWD # move to project root

DIRS=(build CMakeFiles)
for D in ${DIRS[@]}; do find tut -type d -name $D | xargs rm -rf; done
for D in ${DIRS[@]}; do find tut* -type d -name $D | xargs rm -rf; done

FILES=(CMakeCache.txt)
for F in ${FILES[@]}; do find tut -type f -name $F | xargs rm -rf; done
for F in ${FILES[@]}; do find tut* -type f -name $F | xargs rm -rf; done
2 changes: 1 addition & 1 deletion tut/001/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.18)

project(hello_world)
cmake_minimum_required (VERSION 3.18)

add_executable(${PROJECT_NAME} main.cpp)
enable_testing()
Expand Down
2 changes: 1 addition & 1 deletion tut/002/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.18)

project(hello_library)
cmake_minimum_required (VERSION 3.18)

set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})

Expand Down
2 changes: 1 addition & 1 deletion tut/003/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(hello_library)
cmake_minimum_required (VERSION 3.18)
project(hello_library)

set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})

Expand Down
2 changes: 1 addition & 1 deletion tut/004/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(hello_library)
cmake_minimum_required (VERSION 3.18)
project(hello_library)

set(CMAKE_BUILD_TYPE "Debug")
set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion tut/005/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(hello_library)
cmake_minimum_required (VERSION 3.18)
project(hello_library)

set(CMAKE_BUILD_TYPE "Release")
set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion tut/006/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(hello_library)
cmake_minimum_required (VERSION 3.18)
project(hello_library)

set(CMAKE_BUILD_TYPE "Release")
set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion tut/007/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(hello_library)
cmake_minimum_required (VERSION 3.18)
project(hello_library)

set(CMAKE_BUILD_TYPE "Release")
set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion tut/008/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(hello_library)
cmake_minimum_required (VERSION 3.18)
project(hello_library)

option(BUILD_RELEASE "Build for release" OFF)

Expand Down
2 changes: 1 addition & 1 deletion tut/009/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(fetch_tpp)
cmake_minimum_required (VERSION 3.18)
project(fetch_tpp)

set(CMAKE_BUILD_TYPE "Debug")
set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
11 changes: 0 additions & 11 deletions tut_adv/002/.run.sh.err

This file was deleted.

95 changes: 0 additions & 95 deletions tut_adv/002/.run.sh.out

This file was deleted.

4 changes: 0 additions & 4 deletions tut_adv/002/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

std::size_t static constexpr N_DOUBLES = 1e8;

double memory_consumption(){
return N_DOUBLES * 3 * sizeof(double) / 1e9;
}

auto now_in_milliseconds(){
return std::chrono::high_resolution_clock::now();
}
Expand Down

0 comments on commit 1bc922a

Please sign in to comment.