Merge pull request #206 from bitshares/github-auto-build

Add macOS to Github Autobuild
This commit is contained in:
Abit 2020-07-02 17:04:17 +02:00 committed by GitHub
commit 9e14f238f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 6 deletions

View file

@ -5,7 +5,7 @@ env:
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros
jobs:
test-release:
name: Build and run tests in Release mode
name: Build and run tests in Ubuntu, Release mode
runs-on: ubuntu-latest
steps:
- name: Install dependencies
@ -64,7 +64,7 @@ jobs:
task_cancel_test
_EOT_
test-debug:
name: Build and run tests in Debug mode
name: Build and run tests in Ubuntu, Debug mode
runs-on: ubuntu-latest
steps:
- name: Install dependencies
@ -122,3 +122,49 @@ jobs:
hmac_test
task_cancel_test
_EOT_
test-macos:
name: Build and run tests in macOS
runs-on: macos-latest
steps:
- name: Install dependencies
run: |
brew install autoconf automake libtool
brew install ccache
brew search boost
brew install boost@1.60
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure
run: |
mkdir -p _build
pushd _build
cmake -D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D BOOST_ROOT=/usr/local/opt/boost@1.60 \
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \
..
popd
- name: Load Cache
uses: actions/cache@v1
with:
path: ccache
key: ccache-osx-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-osx-${{ github.ref }}-
ccache-osx-
- name: Build
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build
df -h
- name: Unit-Tests
run: |
pushd _build/tests
./all_tests -l message
./bloom_test -- README.md
./ecc_test README.md
./hmac_test
./task_cancel_test

View file

@ -33,14 +33,16 @@ BOOST_AUTO_TEST_CASE(time_point_sec_test)
BOOST_CHECK_EQUAL( "20380119T031407", tp2gm1.to_non_delimited_iso_string() );
time_point_sec tp2g(0x80000000U);
#if BOOST_VERSION != 106000
BOOST_CHECK_EQUAL( "2038-01-19T03:14:08", tp2g.to_iso_string() );
BOOST_CHECK_EQUAL( "20380119T031408", tp2g.to_non_delimited_iso_string() );
#endif
time_point_sec tp3g(0xc0000000U);
if (BOOST_VERSION >= BOOST_VERSION_NUMBER(1,64,0)) {
BOOST_CHECK_EQUAL( "2072-01-28T16:51:12", tp3g.to_iso_string() );
BOOST_CHECK_EQUAL( "20720128T165112", tp3g.to_non_delimited_iso_string() );
}
#if BOOST_VERSION >= 106400
BOOST_CHECK_EQUAL( "2072-01-28T16:51:12", tp3g.to_iso_string() );
BOOST_CHECK_EQUAL( "20720128T165112", tp3g.to_non_delimited_iso_string() );
#endif
BOOST_CHECK( tp0 == time_point_sec() );
BOOST_CHECK( tp0 < tp1 );