Skip to content

optimized journals/new (#87) #323

optimized journals/new (#87)

optimized journals/new (#87) #323

Workflow file for this run

name: "Backend tests"
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: install dependencies
run: sudo apt install cmake sqlite3
- name: setup gcc
uses: egor-tensin/setup-gcc@v1
with:
version: latest
platform: x64
- uses: actions/cache@v4
with:
path: build
key: cmake
- uses: actions/[email protected]
with:
submodules: recursive
- name: build
run: cmake -B build && cmake --build build
env:
CXX: g++-13
format:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: setup env
run: sudo apt install cpplint
- name:
run: cpplint --filter='-legal/copyright,-whitespace/line_length,-build/namespaces,-build/c++11,-runtime/references' --recursive src include
naming:
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.11
- name: build
run: nix build .#packages.x86_64-linux.ncc
- name: run test
run: ./result/bin/ncc --style files/style.yml --recurse --path include src
test-all:
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: actions/cache/restore@v4
with:
path: build
key: cmake
- name: setup-env
run: sudo apt install sqlite3
- name: test-all
run: ctest --test-dir build
valgrind:
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: actions/cache/restore@v4
with:
path: build
key: cmake
- name: setup-env
run: sudo apt install sqlite3 valgrind
- name: test-database-tests
run: valgrind ./build/bin/database_test
- name: test-utils-tests
run: valgrind ./build/bin/utils_test
- name: test-predictions-test
run: valgrind ./build/bin/predictions_test
api-test:
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
with:
submodules: recursive
- uses: actions/cache/restore@v4
with:
path: build
key: cmake
- name: setup-env
run: sudo apt install sqlite3 curl jq python-is-python3
- name: setup-venv
run: python -m venv venv && source venv/bin/activate && pip install transformers torch
- name: run-test
run: source venv/bin/activate && bash ./tests/api-test.sh build -vvvvv