Skip to content

Commit

Permalink
update for end of 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
gafferongames committed Dec 23, 2023
1 parent 4568ecf commit 593a6fa
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 123 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
uses: abel0b/setup-premake@v1

# Linux & MacOS-specific build steps
- name: Build (gmake2)
- name: Build (gmake)
if: runner.os != 'Windows'
run: |
premake5 gmake2
premake5 gmake
make clean
make all config=${{ matrix.configuration }}_x64
- name: Test (gmake2)
make all config=${{ matrix.configuration }}
- name: Test (gmake)
if: runner.os != 'Windows'
run: ./bin/test

Expand All @@ -43,4 +43,4 @@ jobs:
msbuild reliable.sln -nologo -m -p:Configuration=${{ matrix.configuration }}
- name: Test (vs2019)
if: runner.os == 'Windows'
run: "& ./bin/x64/${{ matrix.configuration }}/test.exe"
run: "& ./bin/${{ matrix.configuration }}/test.exe"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ Release
Secure
.vs
cov-int
Docker/reliable.io
docs
20 changes: 13 additions & 7 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
How to build reliable.io
========================
How to build reliable
=====================

## Building on Windows

Download [premake 5](https://premake.github.io/download.html) and copy the **premake5** executable somewhere in your path. Please make sure you have at least premake5 alpha 13.
Download [premake 5](https://premake.github.io/download.html) and copy the **premake5** executable somewhere in your path.

You need Visual Studio to build the source code. If you don't have Visual Studio 2019 you can [download the community edition for free](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16).

Expand All @@ -17,16 +17,22 @@ Now you can build the library and run individual test programs as you would for

## Building on MacOS and Linux

First, download and install [premake 5](https://premake.github.io/download.html). Please make sure you have at least premake5 alpha 13.
First, download and install [premake 5](https://premake.github.io/download.html).

Now go to the command line under the reliable.io directory and enter:
Now go to the command line under the reliable directory and enter:

premake5 gmake2
premake5 gmake

Which creates makefiles which you can use to build the source via:

make all

Then you can run binaries like this:

./bin/test
./bin/soak
./bin/fuzz

Alternatively, you can use the following shortcuts to build and run test programs directly:

premake5 test // build and run unit tests
Expand All @@ -35,7 +41,7 @@ Alternatively, you can use the following shortcuts to build and run test program

premake5 fuzz // run the fuzz test that tests the library is able to correctly handle random data

If you have questions please create an issue at https://github.com/networkprotocol/reliable.io and I'll do my best to help you out.
If you have questions please create an issue at https://github.com/mas-bandwidth/reliable and I'll do my best to help you out.

cheers

Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build status](https://github.com/networkprotocol/reliable/workflows/CI/badge.svg)](https://github.com/networkprotocol/reliable/actions?query=workflow%3ACI)
[![Build status](https://github.com/mas-bandwidth/reliable/workflows/CI/badge.svg)](https://github.com/mas-bandwidth/reliable/actions?query=workflow%3ACI)

# Introduction

Expand All @@ -14,9 +14,9 @@ reliable is stable and production ready.

# Author

The author of this library is [Glenn Fiedler](https://www.linkedin.com/in/glennfiedler).
The author of this library is Glenn Fiedler.

Open source libraries by the same author include: [netcode](http://netcode.io) and [yojimbo](http://libyojimbo.com)
Open source libraries by the same author include: [netcode](https://github.com/mas-bandwidth/netcode) and [yojimbo](https://github.com/mas-bandwidth/yojimbo)

# Source Code

Expand All @@ -42,10 +42,11 @@ These people are awesome:

* **Silver Sponsors**
* [Moon Studios](http://www.oriblindforest.com/#!moon-3/)
* [The Network Protocol Company](http://www.thenetworkprotocolcompany.com)
* [Mas Bandwidth](https://www.mas-bandwidth.com)
* The Network Protocol Company

* **Bronze Sponsors**
* [Kite & Lightning](http://kiteandlightning.la/)
* Kite & Lightning
* [Data Realms](http://datarealms.com)

And by individual supporters on Patreon. Thank you. You made this possible!
Expand Down
22 changes: 0 additions & 22 deletions docker/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions fuzz.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
reliable.io
reliable
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
57 changes: 7 additions & 50 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
solution "reliable"
kind "ConsoleApp"
language "C"
platforms { "x64" }
configurations { "Debug", "Release" }
if not os.istarget "windows" then
includedirs { ".", "/usr/local/include" } -- for clang scan-build only. for some reason it needs this to work =p
Expand All @@ -12,17 +11,13 @@ solution "reliable"
warnings "Extra"
staticruntime "On"
floatingpoint "Fast"
configuration "Debug"
filter "configurations:Debug"
symbols "On"
defines { "RELIABLE_DEBUG" }
links { debug_libs }
configuration "Release"
filter "configurations:Release"
symbols "Off"
optimize "Speed"
defines { "RELIABLE_RELEASE" }
links { release_libs }
configuration { "gmake2" }
linkoptions { "-lm" }

project "test"
files { "test.cpp" }
Expand All @@ -43,7 +38,7 @@ if os.ishost "windows" then
newaction
{
trigger = "solution",
description = "Create and open the reliable.io solution",
description = "Create and open the reliable solution",
execute = function ()
os.execute "premake5 vs2019"
os.execute "start reliable.sln"
Expand Down Expand Up @@ -71,7 +66,7 @@ else
trigger = "soak",
description = "Build and run soak test",
execute = function ()
os.execute "test ! -e Makefile && premake5 gmake2"
os.execute "test ! -e Makefile && premake5 gmake"
if os.execute "make -j32 soak" then
os.execute "./bin/soak"
end
Expand All @@ -83,7 +78,7 @@ else
trigger = "stats",
description = "Build and run stats example",
execute = function ()
os.execute "test ! -e Makefile && premake5 gmake2"
os.execute "test ! -e Makefile && premake5 gmake"
if os.execute "make -j32 stats" then
os.execute "./bin/stats"
end
Expand All @@ -95,49 +90,13 @@ else
trigger = "fuzz",
description = "Build and run fuzz test",
execute = function ()
os.execute "test ! -e Makefile && premake5 gmake2"
os.execute "test ! -e Makefile && premake5 gmake"
if os.execute "make -j32 fuzz" then
os.execute "./bin/fuzz"
end
end
}

newaction
{
trigger = "cppcheck",
description = "Run cppcheck over the source code",
execute = function ()
os.execute "cppcheck reliable.c"
end
}

newaction
{
trigger = "scan-build",
description = "Run clang scan-build over the project",
execute = function ()
os.execute "premake5 clean && premake5 gmake2 && scan-build make all -j32"
end
}

newaction
{
trigger = "docker",
description = "Build and run reliable.io tests inside docker",
execute = function ()
os.execute "rm -rf docker/reliable.io && mkdir -p docker/reliable.io && cp *.h docker/reliable.io && cp *.c docker/reliable.io && cp *.cpp docker/reliable.io && cp premake5.lua docker/reliable.io && cd docker && docker build -t \"networkprotocol:reliable.io-server\" . && rm -rf reliable.io && docker run -ti -p 40000:40000/udp networkprotocol:reliable.io-server"
end
}

newaction
{
trigger = "valgrind",
description = "Run valgrind over tests inside docker",
execute = function ()
os.execute "rm -rf valgrind/reliable.io && mkdir -p valgrind/reliable.io && cp *.h valgrind/reliable.io && cp *.c valgrind/reliable.io && cp *.cpp valgrind/reliable.io && cp premake5.lua valgrind/reliable.io && cd valgrind && docker build -t \"networkprotocol:reliable.io-valgrind\" . && rm -rf reliable.io && docker run -ti networkprotocol:reliable.io-valgrind"
end
}

newaction
{
trigger = "loc",
Expand Down Expand Up @@ -186,9 +145,7 @@ newaction
"release",
"cov-int",
"docs",
"xml",
"docker/reliable.io",
"valgrind/reliable.io"
"xml"
}

for i,v in ipairs( directories_to_delete ) do
Expand Down
4 changes: 2 additions & 2 deletions reliable.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
reliable.io
reliable
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions reliable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
reliable.io
reliable
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions soak.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
reliable.io
reliable
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions stats.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
reliable.io
reliable
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
reliable.io
reliable
Copyright © 2017 - 2019, The Network Protocol Company, Inc.
Copyright © 2017 - 2024, Mas Bandwidth LLC
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
20 changes: 0 additions & 20 deletions valgrind/Dockerfile

This file was deleted.

0 comments on commit 593a6fa

Please sign in to comment.