Memory tests #804
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
name: "Memory tests" | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * 5' | |
jobs: | |
analyze: | |
name: Analyse, Compile. Unit Tests and Coverage. | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'cpp' ] | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{github.token}} # needs other token https://github.com/styfle/cancel-workflow-action/issues/7 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install deps | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends build-essential cmake gcovr qtbase5-dev qtdeclarative5-dev qttools5-dev qttools5-dev-tools | |
sudo apt-get install -y --no-install-recommends valgrind python3 astyle libgl1-mesa-dev libjemalloc-dev libcurl4-openssl-dev | |
sudo apt-get install -y --no-install-recommends libdwarf-dev libelf-dev libjansson-dev libabsl-dev | |
rustup default nightly | |
rustup update | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
cache: 'pip' # caching pip dependencies | |
- run: pip install -r requirements.txt -r src/mtg_search_engine/requirements.txt | |
- name: Run Tests and Coverage | |
shell: bash | |
run: | | |
mkdir -p build | |
cd build | |
rm -rf * | |
cmake .. -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_C_COMPILER=/bin/gcc" "-DCMAKE_CXX_COMPILER=/bin/g++" | |
cmake --build . -j | |
ctest -V | |