Skip to content

Commit

Permalink
Merge pull request #248 from bitshares/improve-safe-t
Browse files Browse the repository at this point in the history
Improve safe<T>
  • Loading branch information
abitmore authored Mar 29, 2023
2 parents 4d024a8 + e30d286 commit 2405393
Show file tree
Hide file tree
Showing 9 changed files with 434 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
brew install parallel
brew search boost
brew install bitshares/boost/[email protected]
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
Expand All @@ -29,11 +29,11 @@ jobs:
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D BOOST_ROOT=/usr/local/opt/[email protected] \
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 \
..
popd
- name: Load Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ccache
key: ccache-${{ matrix.os }}-${{ github.ref }}-${{ github.sha }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test-ubuntu-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build and run tests in Debug mode
strategy:
matrix:
os: [ ubuntu-18.04, ubuntu-20.04 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
Expand All @@ -32,7 +32,7 @@ jobs:
libboost-context-dev \
libboost-regex-dev \
libboost-coroutine-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
Expand All @@ -49,7 +49,7 @@ jobs:
..
popd
- name: Load Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ccache
key: ccache-debug-${{ matrix.os }}-${{ github.ref }}-${{ github.sha }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test-ubuntu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build and run tests in Release mode
strategy:
matrix:
os: [ ubuntu-18.04, ubuntu-20.04 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
Expand All @@ -32,7 +32,7 @@ jobs:
libboost-context-dev \
libboost-regex-dev \
libboost-coroutine-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
Expand All @@ -49,7 +49,7 @@ jobs:
..
popd
- name: Load Cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ccache
key: ccache-release-${{ matrix.os }}-${{ github.ref }}-${{ github.sha }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Scan with SonarScanner
strategy:
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: Download and install latest SonarScanner CLI tool
Expand Down Expand Up @@ -38,6 +38,7 @@ jobs:
sudo apt-get install -y --allow-downgrades openssl=${openssl_ver} libssl-dev=${libssl_ver}
sudo apt-get install -y \
ccache \
gcovr \
parallel \
libboost-thread-dev \
libboost-iostreams-dev \
Expand All @@ -50,7 +51,7 @@ jobs:
libboost-context-dev \
libboost-regex-dev \
libboost-coroutine-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
Expand All @@ -74,11 +75,10 @@ jobs:
- run: |
echo "OS_VERSION=`lsb_release -sr`" >> $GITHUB_ENV
- name: Load Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
ccache
sonar_cache
key: sonar-${{ env.OS_VERSION }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
sonar-${{ env.OS_VERSION }}-${{ github.ref }}-
Expand All @@ -99,9 +99,6 @@ jobs:
_EOT_
- name: Prepare for scanning with SonarScanner
run: |
mkdir -p sonar_cache
find _build/CMakeFiles/fc.dir -type d -print \
| while read d; do gcov -o "$d" "${d/_build*.dir/.}"/*.cpp; done >/dev/null
if [ -z "$GITHUB_HEAD_REF" ]; then \
if [ "$GITHUB_REF" != "refs/heads/master" ]; then \
echo "sonar.branch.target=master" >> sonar-project.properties; \
Expand All @@ -114,6 +111,10 @@ jobs:
echo "sonar.branch.name=${GITHUB_REF}" >> sonar-project.properties; \
fi \
fi
pushd _build
gcovr --version
gcovr --exclude-unreachable-branches --sonarqube ../coverage.xml -r ..
popd
- name: Scan with SonarScanner
env:
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
Expand Down
Loading

0 comments on commit 2405393

Please sign in to comment.