Skip to content

Commit

Permalink
Merge pull request #6 from oxen-io/dev
Browse files Browse the repository at this point in the history
1.0.2 release
  • Loading branch information
jagerman committed Apr 28, 2022
2 parents f9efc55 + aca24d7 commit 02ded69
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
29 changes: 29 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,33 @@ local full_llvm(version) = debian_pipeline(
},
],
},
{
kind: 'pipeline',
type: 'docker',
name: 'Windows (amd64)',
platform: { arch: 'amd64' },
steps: [
submodules,
{
name: 'build',
image: docker_base + 'debian-win32-cross',
pull: 'always',
commands: [
'echo "Building on ${DRONE_STAGE_MACHINE}"',
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
apt_get_quiet + ' update',
apt_get_quiet + ' install -y eatmydata',
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y build-essential cmake ninja-build ccache g++-mingw-w64-x86-64-posix wine64',
'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix',
'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix',
'mkdir build',
'cd build',
'cmake .. -G Ninja -DCMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++-posix -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_CXX_COMPILER_LAUNCHER=ccache',
'ninja -v',
'export WINEPATH="$$(dirname $$(/usr/bin/x86_64-w64-mingw32-g++-posix -print-libgcc-file-name));/usr/x86_64-w64-mingw32/lib"',
'wine64-stable ./tests/tests.exe --use-colour yes',
],
},
],
},
]
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(CCACHE_PROGRAM)
endif()

project(oxenc
VERSION 1.0.1
VERSION 1.0.2
DESCRIPTION "oxenc - Base 16/32/64 and Bittorrent Encoding/Decoding Header Only Library"
LANGUAGES CXX)

Expand All @@ -25,9 +25,6 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

option(WITH_DOCS "build documentation" ON)
option(WITH_TESTS "build tests" ON)

include(GNUInstallDirs)

message(STATUS "oxenc v${PROJECT_VERSION}")
Expand All @@ -39,6 +36,7 @@ else()
endif()

option(OXENC_BUILD_TESTS "Building and perform oxenc tests" ${oxenc_IS_TOPLEVEL_PROJECT})
option(OXENC_BUILD_DOCS "Build oxenc documentation" ${oxenc_IS_TOPLEVEL_PROJECT})
option(OXENC_INSTALL "Add oxenc headers to install target" ${oxenc_IS_TOPLEVEL_PROJECT})


Expand Down Expand Up @@ -90,10 +88,10 @@ if(OXENC_INSTALL)
endif()


if(WITH_DOCS)
if(OXENC_BUILD_DOCS)
add_subdirectory(docs)
endif()

if(WITH_TESTS)
if(OXENC_BUILD_TESTS)
add_subdirectory(tests)
endif()
2 changes: 2 additions & 0 deletions oxenc/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace oxenc {
#elif !defined(__BIG_ENDIAN__) && defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) \
&& __BYTE_ORDER == __BIG_ENDIAN
# define __BIG_ENDIAN__
#elif defined(_WIN32)
# define __LITTLE_ENDIAN__
#elif !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
# error "Error: don't know which endian this is"
#endif
Expand Down

0 comments on commit 02ded69

Please sign in to comment.