-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
194bce5
commit e4199f7
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.conan/data | ||
key: binaries-${{ runner.os }}-x86_64 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install --yes build-essential cmake ninja-build python3-pip | ||
pip3 install "conan<2.0" | ||
- name: Configure project | ||
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWITH_BINARIES=ON -DWITH_CONAN=ON | ||
- name: Build executable | ||
run: cmake --build build --target caracal-bin | ||
# | ||
# macos: | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ~/.conan/data | ||
# key: binaries-${{ runner.os }}-x86_64 | ||
# - name: Install dependencies | ||
# run: brew install cmake gcovr ninja | ||
# - name: Install Conan | ||
# run: pip3 install "conan<2.0" | ||
# - name: Configure project (try 1/2) | ||
# run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage -fsanitize=address -fsanitize=undefined" -DWITH_CONAN=ON -DWITH_TESTS=ON | ||
# continue-on-error: true | ||
# # For some unknown reasons bison fails to build on GitHub macOS 12 runners. | ||
# # However, if we call conan twice, it seems to work...¯\(◉‿◉)/¯ | ||
# - name: Configure project (try 2/2) | ||
# run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage -fsanitize=address -fsanitize=undefined" -DWITH_CONAN=ON -DWITH_TESTS=ON | ||
# - name: Build tests | ||
# run: cmake --build build --target caracal-test | ||
# - name: Run tests | ||
# run: sudo --preserve-env=CI build/caracal-test --benchmark-warmup-time 0 --benchmark-samples 1 | ||
# - name: Compute coverage | ||
# run: gcovr --exclude-unreachable-branches --exclude-throw-branches --exclude apps --exclude extern --exclude tests --output coverage.xml --xml | ||
# - uses: codecov/codecov-action@v3 |