Skip to content

Commit

Permalink
Add fail-able docker build for gcc trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-loki committed Aug 2, 2019
1 parent 3d2dfcc commit 4763888
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build/
.vscode/
lokinet
lokinet.exe
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ matrix:
dist: xenial
env: DOCKER_FILE=docker/alpine-windows.Dockerfile
services: docker
- os: linux
dist: xenial
env: DOCKER_FILE=docker/gcc-trunk.Dockerfile
services: docker
- os: linux
dist: xenial
compiler: gcc
Expand Down Expand Up @@ -57,6 +61,10 @@ matrix:
dist: xenial
env: DOCKER_FILE=docker/alpine-windows.Dockerfile
services: docker
- os: linux
dist: xenial
env: DOCKER_FILE=docker/gcc-trunk.Dockerfile
services: docker

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion docker/alpine-windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ RUN apk update && \
WORKDIR /src/
COPY . /src/

RUN make windows NINJA=ninja
RUN make windows-release NINJA=ninja STATIC_LINK=ON
14 changes: 14 additions & 0 deletions docker/gcc-trunk.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM gcc:latest

RUN apt update && \
apt install -y cmake git libcap-dev curl ninja-build libuv1-dev

WORKDIR /src/

COPY . /src/

RUN mkdir build && \
cd build && \
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DWARNINGS_AS_ERRORS=ON && \
ninja -k0 && \
./test/testAll
4 changes: 2 additions & 2 deletions llarp/messages/relay_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ namespace llarp
}

bool
LR_StatusMessage::AddFrame(const SharedSecret& pathKey, uint64_t status)
LR_StatusMessage::AddFrame(const SharedSecret& pathKey, uint64_t newStatus)
{
frames[7] = frames[6];
frames[6] = frames[5];
Expand All @@ -188,7 +188,7 @@ namespace llarp

LR_StatusRecord record;

record.status = status;
record.status = newStatus;
record.version = LLARP_PROTO_VERSION;

llarp_buffer_t buf(frame.data(), frame.size());
Expand Down
2 changes: 1 addition & 1 deletion llarp/messages/relay_status.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace llarp
uint64_t status);

bool
AddFrame(const SharedSecret &pathKey, uint64_t status);
AddFrame(const SharedSecret &pathKey, uint64_t newStatus);

static void
QueueSendMessage(AbstractRouter *router, const RouterID nextHop,
Expand Down
1 change: 0 additions & 1 deletion llarp/net/net_addr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ namespace llarp
bool
Addr::from_char_array(string_view in)
{
auto str = in.begin();
auto pPosition = in.find(':');
if(pPosition != string_view::npos)
{
Expand Down
4 changes: 2 additions & 2 deletions llarp/path/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ namespace llarp
}

bool
Path::HandleLRSM(uint64_t status, std::array< EncryptedFrame, 8 >& frames,
AbstractRouter* r)
Path::HandleLRSM(ABSL_ATTRIBUTE_UNUSED uint64_t status,
std::array< EncryptedFrame, 8 >& frames, AbstractRouter* r)
{
uint64_t currentStatus = status;

Expand Down
2 changes: 1 addition & 1 deletion llarp/router/router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ namespace llarp
}

void
Router::HandleDHTLookupForExplore(RouterID remote,
Router::HandleDHTLookupForExplore(ABSL_ATTRIBUTE_UNUSED RouterID remote,
const std::vector< RouterContact > &results)
{
for(const auto &rc : results)
Expand Down
15 changes: 0 additions & 15 deletions llarp/router_contact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,21 +382,6 @@ namespace llarp
return BDecode(&buf);
}

RouterContact &
RouterContact::operator=(const RouterContact &other)
{
addrs = other.addrs;
exits = other.exits;
signature = other.signature;
last_updated = other.last_updated;
enckey = other.enckey;
pubkey = other.pubkey;
nickname = other.nickname;
version = other.version;
netID = other.netID;
return *this;
}

std::ostream &
RouterContact::print(std::ostream &stream, int level, int spaces) const
{
Expand Down
3 changes: 0 additions & 3 deletions llarp/router_contact.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ namespace llarp
bool
DecodeKey(const llarp_buffer_t &k, llarp_buffer_t *buf);

RouterContact &
operator=(const RouterContact &other);

bool
HasNick() const;

Expand Down
4 changes: 2 additions & 2 deletions llarp/service/endpoint_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace llarp
if(k == "paths")
{
const auto val = atoi(v.c_str());
if(val >= 1 && val <= path::PathSet::max_paths)
if(val >= 1 && val <= static_cast<int>(path::PathSet::max_paths))
{
ep.numPaths = val;
LogInfo(name, " set number of paths to ", ep.numHops);
Expand All @@ -56,7 +56,7 @@ namespace llarp
if(k == "hops")
{
const auto val = atoi(v.c_str());
if(val >= 1 && val <= path::max_len)
if(val >= 1 && val <= static_cast<int>(path::max_len))
{
ep.numHops = val;
LogInfo(name, " set number of hops to ", ep.numHops);
Expand Down

0 comments on commit 4763888

Please sign in to comment.