Add fail-able docker build for gcc trunk

pull/746/head
Michael 5 years ago
parent 3d2dfcc027
commit 4763888d2c
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C

@ -1,2 +1,4 @@
build/ build/
.vscode/ .vscode/
lokinet
lokinet.exe

@ -16,6 +16,10 @@ matrix:
dist: xenial dist: xenial
env: DOCKER_FILE=docker/alpine-windows.Dockerfile env: DOCKER_FILE=docker/alpine-windows.Dockerfile
services: docker services: docker
- os: linux
dist: xenial
env: DOCKER_FILE=docker/gcc-trunk.Dockerfile
services: docker
- os: linux - os: linux
dist: xenial dist: xenial
compiler: gcc compiler: gcc
@ -57,6 +61,10 @@ matrix:
dist: xenial dist: xenial
env: DOCKER_FILE=docker/alpine-windows.Dockerfile env: DOCKER_FILE=docker/alpine-windows.Dockerfile
services: docker services: docker
- os: linux
dist: xenial
env: DOCKER_FILE=docker/gcc-trunk.Dockerfile
services: docker
env: env:
global: global:

@ -6,4 +6,4 @@ RUN apk update && \
WORKDIR /src/ WORKDIR /src/
COPY . /src/ COPY . /src/
RUN make windows NINJA=ninja RUN make windows-release NINJA=ninja STATIC_LINK=ON

@ -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

@ -172,7 +172,7 @@ namespace llarp
} }
bool bool
LR_StatusMessage::AddFrame(const SharedSecret& pathKey, uint64_t status) LR_StatusMessage::AddFrame(const SharedSecret& pathKey, uint64_t newStatus)
{ {
frames[7] = frames[6]; frames[7] = frames[6];
frames[6] = frames[5]; frames[6] = frames[5];
@ -188,7 +188,7 @@ namespace llarp
LR_StatusRecord record; LR_StatusRecord record;
record.status = status; record.status = newStatus;
record.version = LLARP_PROTO_VERSION; record.version = LLARP_PROTO_VERSION;
llarp_buffer_t buf(frame.data(), frame.size()); llarp_buffer_t buf(frame.data(), frame.size());

@ -86,7 +86,7 @@ namespace llarp
uint64_t status); uint64_t status);
bool bool
AddFrame(const SharedSecret &pathKey, uint64_t status); AddFrame(const SharedSecret &pathKey, uint64_t newStatus);
static void static void
QueueSendMessage(AbstractRouter *router, const RouterID nextHop, QueueSendMessage(AbstractRouter *router, const RouterID nextHop,

@ -83,7 +83,6 @@ namespace llarp
bool bool
Addr::from_char_array(string_view in) Addr::from_char_array(string_view in)
{ {
auto str = in.begin();
auto pPosition = in.find(':'); auto pPosition = in.find(':');
if(pPosition != string_view::npos) if(pPosition != string_view::npos)
{ {

@ -103,8 +103,8 @@ namespace llarp
} }
bool bool
Path::HandleLRSM(uint64_t status, std::array< EncryptedFrame, 8 >& frames, Path::HandleLRSM(ABSL_ATTRIBUTE_UNUSED uint64_t status,
AbstractRouter* r) std::array< EncryptedFrame, 8 >& frames, AbstractRouter* r)
{ {
uint64_t currentStatus = status; uint64_t currentStatus = status;

@ -714,7 +714,7 @@ namespace llarp
} }
void void
Router::HandleDHTLookupForExplore(RouterID remote, Router::HandleDHTLookupForExplore(ABSL_ATTRIBUTE_UNUSED RouterID remote,
const std::vector< RouterContact > &results) const std::vector< RouterContact > &results)
{ {
for(const auto &rc : results) for(const auto &rc : results)

@ -382,21 +382,6 @@ namespace llarp
return BDecode(&buf); 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 & std::ostream &
RouterContact::print(std::ostream &stream, int level, int spaces) const RouterContact::print(std::ostream &stream, int level, int spaces) const
{ {

@ -150,9 +150,6 @@ namespace llarp
bool bool
DecodeKey(const llarp_buffer_t &k, llarp_buffer_t *buf); DecodeKey(const llarp_buffer_t &k, llarp_buffer_t *buf);
RouterContact &
operator=(const RouterContact &other);
bool bool
HasNick() const; HasNick() const;

@ -43,7 +43,7 @@ namespace llarp
if(k == "paths") if(k == "paths")
{ {
const auto val = atoi(v.c_str()); 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; ep.numPaths = val;
LogInfo(name, " set number of paths to ", ep.numHops); LogInfo(name, " set number of paths to ", ep.numHops);
@ -56,7 +56,7 @@ namespace llarp
if(k == "hops") if(k == "hops")
{ {
const auto val = atoi(v.c_str()); 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; ep.numHops = val;
LogInfo(name, " set number of hops to ", ep.numHops); LogInfo(name, " set number of hops to ", ep.numHops);

Loading…
Cancel
Save