Commit Graph

43 Commits

Author SHA1 Message Date
Hamish Coleman
6c1ed021b1
expanded YAML linting to cover every yaml file found in this repo (#874) 2021-10-25 16:07:01 +05:45
Hamish Coleman
10b3464bd2
Linting for yaml files (#872)
* Add YAML file linting

* Add cmake-linux.yml lint and address its concerns
2021-10-25 01:37:21 +05:45
Hamish Coleman
7eb3f2cd7f
Rename scripts for better consistancy (#866)
* Address shellcheck concerns with n2n_gateway.sh script

* Rename n2n_gateway.sh to live with all the other scripts (and update docs)

* Rename hack_fakeautoconf to make it clearly a shell script

* Address shellcheck concerns with hack_fakeautoconf.sh

* Rename python scripts to match other n2n tools

* Fix windows compile - when streamlining the use of hack_fakeautoconf.sh, I forgot to update all uses of this script
2021-10-24 03:58:01 +05:45
Hamish Coleman
80b33cd1a9
Basic C Code lint checker and shell checker (#859)
* Factor build packages out into a more maintainable list

* Create a location for scripts to live

* Provide a make target to return the source dir as close as reasonable to the original distributed state

* Add a code lint step, checking the coding style

* Change test harness as recommended by shellcheck

* Ensure we actually have the linter tool installed

* Use the correct directory for cmake to run the tests

* Adjust for the older uncrustify in the current github ubuntu-latest

* Make one file pass the linter

* Integrate the lint with the existing test workflow

* Add files with minimal changes needed to the linter

* Add more files with minimal changes needed to the linter

* Dont build binaries if we fail the lint test

* Update the phony targets with the lint steps

* Ensure the flake8 package is installed in the new lint workflow job

* Use the makefile to drive the packages needed to install for linting

* No need to add dependancies on lint, just rely on the workflow status to show failure

* Update the scripts dir README to reflect current assumptions

* Rename and briefly document the indent.sh script

* Fix the ignore to ignore the right Makefile

* Rename the test_harness script to make it clear it is a shell script

* Provide a master lint make target and add a shell script lint tool

* Elminate stray tabs

* Drop include/auth.h from linter - there are inconsistant results with function definitions when using the current uncrustify rules
2021-10-24 01:21:18 +05:45
Hamish Coleman
bb3de5698c
added JSON interfaces to edge management port and scripts to further process output (#854)
* Add management commands to show data in JSON format

* Add a script to query the JSON management interface

* Suprisingly, the github runner does not have flake8 installed

* Add n2nctl debugging output to show the raw data received from the JSON

* Ensure well known tag wrap-around semantics

* Try to ensure we check every edge case in the protocol handling - only valid packets are allowed

* Add a very simple http to management port gateway

* Fix the lint issue
2021-10-16 00:11:39 +05:45
Hamish Coleman
1670b14d69
reduced the number of artifacts to a reasonable number (#853)
* Consolidate all binaries into one artifact bucket

* Remove unused variables from cmake matrix

* Consolidate dpkg and rpm packages into one bucket each

* Consolidate all the coverage reports into one bucket

* Consolidate all the test outputs into one bucket

* Avoid the artifact prefix removal using a simple hack, but upload the expected test results as a consequance
2021-10-15 20:19:52 +05:45
Hamish Coleman
7d4ff08200
added automated binary artifacts (#849)
* Allow an autobuilder with no access to private key material to create testable packages

* Initial dpkg build - will need helpers installed to work

* Start adding required dpkg helpers

* Tweak package artifact names

* Add a windows 'package' builder

* Ensure prefix path handling deals with current directory change when descending to tools dir

* The tools makefile currently only needs the SBINDIR path to install properly

* Add a macos 'package' builder

* Remove unused configure variables

* Without commit history, some of the automatic version numbering will fail

* Add an rpm builder

* Need to set the env var for the rpm build before we change our working dir

* Allow gpg signing to fail for generating test rpm packages

* Unfortunately the rpm spec file hardcodes some path assumptions, so we need to use hacks to work around them

* Return to the top dir before moving things around

* A small change to make actions re-run the pipeline

* Name this workflow file with a nicer looking name
2021-10-11 18:44:28 +05:45
Hamish Coleman
4438f1aa2a
added mingw test platform (#829)
* Provide a minimal reimplementation of our autoconf, to try windows builds

* Try building with windows

* Fix thinko in spelling

* Ensure shell script runs inside a shell

* Add a hack to aid include discovery

* Just keep adding tech debt...

* Assume that we will have slashes in some of the replacement strings and avoid that char with sed

* Restore one slash

* Hack around the tools makefile interdependancy bug

* A correct cflags include hack for each compile dir

* Ensure we link against winsock (note, even though this says 32bit, it should link the 64bit library ... I think)

* Bad link ordering if we dont use LDLIBS

* Remove unused make variable

* Remove makefile duplication using inheritance (this does mean you can no longer cd tools; make, but must do make tools)

* Add missing library for win32

* Show OS variable

* Make hack autoconf more robust for tests on non gitlab runners

* Remove no longer used substitutions from hack autoconf

* Add missing include path to tools under win32

* Build the win32 subdir when the compiler is Msys

* The different subdirs have different dependancies

* Ensure we can find the include files

* Fix library link ordering

* Ensure the tools dir can find the special win32 lib

* Deal with the differing basic type sizes on both linux/64bit and windows/64bit

* Document the steps to mimic the github windows/mingw build locally - to allow for simpler debugging

* Ensure branch name in instructions matches my test branch name

* Clarify the shell needed to build with mingw

* Since the makefile depends on knowing the OS, raise a fatal error if we cannot determine this

* Handling different compile environments is hard.

- Linux: sane and reasonable results for both uname -s (=Linux) and
  uname -o (=GNU/Linux)
- Windows/Mingw: insane results for uname -s
  (=MSYS_NT-$MAJOR.$MINOR-$BUILDNR) but sane results for uname -o (Msys)
- Macos: sane results for uname -s (=Darwin) but does not support
  uname -o at all

* Revamp the way that Mingw is detected

* Avoid attempting to generate gcovr report when running under windows

* Whoops, isolate the right step

* Fix spelling mistake

* win32/Makefile: Remove unused setting and add comment

* ensure that all win32 includes use the same expected path

* Allow simpler cross compilation by letting configure pass the CC and AR environment through

* Avoid multiple '_CRT_SECURE_NO_WARNINGS redefined' warnings

* Convert to a consolidated CONFIG_TARGET variable to select any different compile options

* Use the more generic printf defines to avoid warnings on mingw

* Update mingw build docs

* English better for reader happy make

* Address a number of mingw compiler warnings

* Fix Visual C compile

* Be sure to document some of the hacky nature of the mingw build
2021-10-06 00:52:15 +05:45
Hamish Coleman
dec1771d5f
added test platform MacOS (#828)
* Just for a laugh, lets naively throw the same build at non linux OS

* Only run apt commands on linux (yes, this is not actually right, but it is close enough for github actions at the moment)

* Start installing required macOS packages

* Only run apt commands on linux #2

* Ensure that we use a Bourne shell, even on Windows

* Until it is clear how to install autotools on windows in github runners, avoid fighting that bear

* Only try to run gcovr on ubuntu-latest

* Install the right macos dep

* Install gcovr on macos and upload all coverage report artifacts

* Upload a generated tests output artifact, even if the tests failed

* Prepend a quick smoke test to the full matrix and coverage builds

* Use short names for jobs
2021-09-29 16:51:02 +05:45
Hamish Coleman
b735ad6b9e
added test framework and code coverage reporting (#797)
* Add a simple test framework

* Add a code coverage report example oneliner

* Move the coverage report into a separate directory

* Add a github action to run tests and publish a branch with the coverage report

* Fix: Missing job separator

* Fix: remember to actually run configure

* Fix: Gotta autogen before I configure

* Dont try to upload coverage report unless this is a push

* Clearly show the git ref tested in the coverage report

* Add a test for the various transforms

* Add tests for the elliptic curve and pearson hash

* Ensure we ignore new generated output

* Remove unneeded boilerplate from the compression tests

* Add an example of a test of the encoded wire packets

* Ensure that correctly testable data is output even when zstd is not compiled

* Factor test runner out into its own script and attempt to add it to the cmake file

* Tell cmake about a new object file

* Stop trying to make Cmake work...

* Stop trying to make cmake work, round 2

* In the middle of a thousand lines of cmake output was one important one - windows could not find assert() - try again

* Try again to plumb the tests into cmake

* Add missing library to our superset install line

* Fix build error when libcap-dev is installed

* Switch to using artifact uploads instead of pages to store/show the coverage report

* Fix artifact upload yaml

* Upload coverage report to codecov

* Fix codecov - clearly it doesnt do a recursive search for coverage files

* Fix codecov - my hopeful use of a list of directories didnt work

* Fix codecov - unfortunately, it doesnt just consume the coverage data and needs us to generate the gcov output

* Fix codecov - nope, it still doesnt recursively search

* Fix codecov - it really helps if I run the gcov data generator

* Add a simple matrix build

* Fix older ubuntu versions of gcovr that do not support the '--html-title' option

* Ensure we use gcover options that are identical on older ubuntu

* Improve coverage generation and required build packages
2021-09-27 15:26:06 +05:45
Hamish Coleman
9caa8902b0
Fix build error when libcap-dev is installed (#798)
* Fix build error when libcap-dev is installed

* Revert 829ba29, allowing LDLIBS based fix to work
2021-09-17 15:20:55 +02:00
Luca Deri
829ba29a2b Fixes regression introduced by 35ec7336a6 that put libraries in wrong order causing edge to fail during linking 2021-09-17 10:14:11 +00:00
Hamish Coleman
35ec7336a6
simplified the makefiles (#795)
* Move the makefiles towards a clearer arrangement

* Break circular make dependancy and start using implicit rules for most compilation

* Fix old cmake to compile again after renames
2021-09-16 18:34:04 +05:45
Hamish Coleman
6b353141b4
addressed warnings (#790) 2021-09-15 22:08:45 +05:45
Luca Deri
85894715bd Added build target for Ubiquity EdgeRouter X 2021-02-16 11:31:23 +00:00
Logan oos Even
599e424b5d
Revert "changed timer source (#522)" (#536)
This reverts commit 0298efa36e.
2020-12-19 12:26:54 +01:00
Logan oos Even
0298efa36e
changed timer source (#522)
* changed timer source

* changed timer source

* changed timer source

* changed timer source

* changed timer source

* changed timer source
2020-12-08 15:46:00 +01:00
Luca Deri
159a088696 Added missing makefile dependency 2020-06-22 00:54:25 +02:00
Luca Deri
3eb82b2a32 Code reorganization 2020-06-21 22:26:27 +02:00
Logan007
43feafa1b6 prepared header encryption 2020-06-17 11:51:05 +05:45
Logan007
67a1cb1792 polished speck 2020-06-17 11:30:48 +05:45
Logan007
7de1ccd68c added XORSHIFT128+ random number generator 2020-06-08 16:08:08 +05:45
Logan007
fad7c191f6 added XORSHIFT128+ random number generator 2020-06-08 16:06:24 +05:45
lucaderi
cd62591ade CentOS6 fixes 2020-06-08 00:01:28 +02:00
Logan oos Even
78e72a2f9e
Merge branch 'dev' into speck 2020-06-06 18:12:11 +05:45
Logan007
9509634ca5 added SSE - Part II 2020-06-03 22:10:49 +05:45
Logan007
0477e476e8 added Speck 2020-05-28 03:17:21 +05:45
emanuele-f
a014f5a68b Windows compilation fix 2020-05-24 11:25:12 +02:00
Logan007
9e5934acc8 added ChaCha20 (cc20) 2020-04-26 15:46:41 +02:00
Luca Deri
97c8948113 MacOS fixes 2020-04-24 00:36:32 +02:00
Luca Deri
a13247f6c0
Merge pull request #209 from pojntfx/dev
Enable embedding the supernode, add more embedding examples (clean)
2020-04-23 23:51:02 +02:00
Logan oos Even
e60c10ebb1
Enable compiler optimizations (#218) 2020-03-28 18:22:55 +00:00
Felix Pojtinger
2058ab93c8 Add more embedding examples and initally decomposed sn_utils 2020-03-16 15:03:03 +01:00
emanuele-f
60a4ba90ce Add tools subdirectory 2019-09-21 16:13:52 +02:00
emanuele-f
b3995e7fbc Implemnent n2n-decode utility to decode and dump traffic to PCAP 2019-09-20 02:13:07 +02:00
emanuele-f
4d36f9f613 Package fixes 2019-07-06 14:40:16 +02:00
emanuele-f
cb43d0cf64 Unify n2n version 2019-07-06 13:52:17 +02:00
emanuele-f
4ca0ae34a4 Remove keyfile leftover 2019-06-17 09:54:53 +02:00
emanuele-f
c89ece71ca Code rework changes
- Remove keyschedule leftover and adapt to new API
- Fix cleanup functions
- Remove unused random_device_mac
2019-04-27 15:55:07 +02:00
emanuele-f
d689691599 n2n.h cleanup 2019-04-14 18:08:51 +02:00
emanuele-f
200cfd24a3 Fix benchmark AES lib 2019-01-28 01:44:47 +01:00
Simone Mainardi
8308098ef3 Fixes for OS X build with Macports 2018-10-09 17:28:09 +02:00
Luca Deri
a80fa1dd27 Added configure and autogen.sh 2018-10-07 11:37:19 +02:00