Skip to content

Commit

Permalink
Updated runners
Browse files Browse the repository at this point in the history
  • Loading branch information
gherynos committed Mar 14, 2024
1 parent 4c10cc8 commit 968bbac
Show file tree
Hide file tree
Showing 3 changed files with 689 additions and 147 deletions.
54 changes: 18 additions & 36 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push]

jobs:
linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
Expand All @@ -14,59 +14,41 @@ jobs:

- name: Dependencies
run: |
sudo apt-get install -y build-essential clang-9 lcov wget cmake
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-9 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-9 10
- name: MsgPack
run: |
wget https://github.com/msgpack/msgpack-c/releases/download/cpp-2.0.0/msgpack-2.0.0.tar.gz
tar -xvzf msgpack-2.0.0.tar.gz
pushd msgpack-2.0.0
cmake .
make
sudo make install
popd
- name: LibSodium
run: |
wget https://github.com/jedisct1/libsodium/releases/download/1.0.9/libsodium-1.0.9.tar.gz
tar -xvzf libsodium-1.0.9.tar.gz
pushd libsodium-1.0.9
./configure
make
sudo make install
popd
sudo apt-get install -y build-essential wget cmake python3-pip libsodium-dev libmsgpack-dev
sudo pip install gcovr==7.2
- name: Build
run: |
mkdir build
cd build
cmake ..
cmake .. -DENABLE_COVERAGE=true -DCMAKE_BUILD_TYPE=Debug
make
./saltpack-test
make saltpack-coverage-xml
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: build/saltpack-coverage-xml.xml
github-token: ${{ secrets.GITHUB_TOKEN }}

macos:
runs-on: macos-10.15
runs-on: macos-13

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Dependencies
run: brew install libsodium msgpack msgpack-cxx lcov
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_AUTO_UPDATE: 1
run: brew install libsodium msgpack msgpack-cxx

- name: Build
run: |
mkdir build
cd build
cmake .. -DENABLE_COVERAGE=true -DCMAKE_BUILD_TYPE=Debug
cmake ..
make
make saltpack-coverage
- name: Coveralls
uses: coverallsapp/[email protected]
with:
path-to-lcov: build/coverage.info.cleaned
github-token: ${{ secrets.GITHUB_TOKEN }}
./saltpack-test
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ gtest_discover_tests(saltpack-test)
# Code coverage
if (ENABLE_COVERAGE)
include(CodeCoverage)
set(COVERAGE_EXCLUDE '*/ext/*')
setup_target_for_coverage(saltpack-coverage saltpack-test coverage)

setup_target_for_coverage_gcovr_html(
NAME saltpack-coverage-html
EXECUTABLE saltpack-test
EXCLUDE "ext/*" "build/_deps/*" "test/*"
)
setup_target_for_coverage_gcovr_xml(
NAME saltpack-coverage-xml
EXECUTABLE saltpack-test
EXCLUDE "ext/*" "build/_deps/*" "test/*"
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
endif()

Expand Down
Loading

0 comments on commit 968bbac

Please sign in to comment.