initial commit

main
Fabien Freling 2022-02-11 19:03:22 +01:00
commit 4e9f69da92
8 changed files with 53 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.zip
packing

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# Netatmo technical test
The subject is available here: [Test Algo](./test_algo.pdf)
## Installation
## Notes
### Question 1
### Question 2
### Question 3

0
Tupfile.ini Normal file
View File

18
justfile Normal file
View File

@ -0,0 +1,18 @@
name := "freling_netatmo_algo"
exe := "./packing"
build_sh := "build.sh"
build:
tup
run: build
{{exe}}
generate-build:
tup generate {{build_sh}}
debug: build
lldb {{exe}}
archive: generate-build
git archive --add-file={{build_sh}} --output={{name}}.zip --prefix={{name}}/ HEAD

10
shell.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
clang
just
tup
valgrind
];
}

3
src/.clang-format Normal file
View File

@ -0,0 +1,3 @@
---
BasedOnStyle: Chromium
IndentWidth: 4

9
src/Tupfile Normal file
View File

@ -0,0 +1,9 @@
CPPFLAGS_ = -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1
CPPFLAGS_ASAN = $(CPPFLAGS_) -fsanitize=address -fno-omit-frame-pointer
CPPFLAGS_THREAD = $(CPPFLAGS_) -fsanitize=thread
CPPFLAGS_MEM = $(CPPFLAGS_) -fsanitize=memory -fno-omit-frame-pointer
CPPFLAGS_UB = $(CPPFLAGS_) -fsanitize=undefined
CPPFLAGS = $(CPPFLAGS_)
: foreach *.cpp |> clang++ -c %f -o %o $(CPPFLAGS) |> %B.o {objs}
: {objs} |> clang++ %f -o %o $(CPPFLAGS) -lpthread |> ../packing

BIN
test_algo.pdf Normal file

Binary file not shown.