Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system upgrades #406

Merged
merged 135 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
97d8ff2
[build] Clean up dependencies after codegen removal
FallenChromium Jul 1, 2024
179572b
[build] WIP: Conan support
FallenChromium Jul 27, 2024
5d69293
[build] Use system-wide gtest and benchmark libs
FallenChromium Aug 8, 2024
cee1b4e
[build][cmake] fix glib variables
FallenChromium Aug 30, 2024
20f7fb5
[docs][build] Rename exported package, update docs
FallenChromium Aug 30, 2024
76e9cb2
[cmake] delete SC_AUTO_TEST flag
FallenChromium Aug 30, 2024
ce980b4
[build] update default CMake presets
FallenChromium Aug 30, 2024
4886a9a
[build][docs] Add documentation about library consumption
FallenChromium Aug 30, 2024
e7ee079
[build] fix export dirs and targets
FallenChromium Aug 30, 2024
896fbce
[cmake] Fix paths in tests
NikitaZotov Oct 7, 2024
63a8e9d
[cmake] Fix install path for extensions
NikitaZotov Oct 7, 2024
e66968b
[cmake] Remove duplicating project version
NikitaZotov Oct 7, 2024
77eb7ed
[ci][scripts] Remove duplicating build tests scripts
NikitaZotov Oct 7, 2024
d32ab51
[cmake] Add conand provider
NikitaZotov Oct 7, 2024
6f7a16c
[ci][docker] Use ubuntu 24.04
NikitaZotov Oct 7, 2024
5b5ca92
[build] Fix performance tests build
NikitaZotov Oct 7, 2024
1befbe8
[ci][docs] Allow build scope
NikitaZotov Oct 7, 2024
3870c7b
[scripts][ci] Remove pushd and popd for coverage
NikitaZotov Oct 7, 2024
fcdb1c4
[memory][tests] Include missed algoritm lib
NikitaZotov Oct 7, 2024
a034cfa
[docker] Fix bin path in docker file
NikitaZotov Oct 7, 2024
c089cdb
[cmake] Cache find glib
NikitaZotov Oct 8, 2024
a37631f
[docs] Correct typos in build system
NikitaZotov Oct 8, 2024
bac1239
[cmake][scripts] Create custom target to generate server and builder …
NikitaZotov Oct 8, 2024
08db1f6
[docker] Update binary path
NikitaZotov Oct 8, 2024
9117962
[ci] Update native ci; implement conan ci
NikitaZotov Oct 8, 2024
a825c18
[docker][scripts] Set extensions path
NikitaZotov Oct 8, 2024
84d8943
[cmake][tools][builder][tests] Fix repo path for generator after rebase
NikitaZotov Oct 11, 2024
5e2ac89
[cmake][wip] Separate libraries and extensions
NikitaZotov Oct 11, 2024
470951d
[build] Avoid CMake crashes when Conan Toolchain was used and build f…
FallenChromium Oct 15, 2024
2112716
[docker] Fixes for the new preset systems and extensions path
FallenChromium Oct 15, 2024
436b66c
[build][ci] Get rid of CMake script wrappers
FallenChromium Oct 15, 2024
c032fc8
[scripts] Add Ninja as a dev requirement on apt distros
FallenChromium Oct 15, 2024
467a60c
[docker][ci][fix] Improve dependencies caching in CI
FallenChromium Oct 15, 2024
3193306
[build][fix] Fix Conan provider for release-with-tests preset
FallenChromium Oct 15, 2024
5f393e9
[ci] Use Buildx in Docker workflow
FallenChromium Oct 15, 2024
7fa68e4
[ci] Use default cache action for ccache
FallenChromium Oct 15, 2024
2c62b1e
[build] Conan: add gtest as a build requirement unconditionally
FallenChromium Oct 15, 2024
bd26fea
[build] Conan: Add dependencies for benchmarking and gwf translator
FallenChromium Oct 15, 2024
92706a9
[tests][refactor][fix] Configure tests in pre-execution stage, not du…
NikitaZotov Oct 27, 2024
b3b73d2
[ci][fix] Use correct presets to launch tests
NikitaZotov Oct 27, 2024
eb1102e
[build][conan][file][fix] Package info
NikitaZotov Oct 27, 2024
79b8bc5
[cmake][refactor] File install.cmake
NikitaZotov Oct 27, 2024
7cb138b
[cmake] Make extensions path configurable
NikitaZotov Oct 27, 2024
5057ec4
[docs][build][fix] Build instructions; deps info
NikitaZotov Oct 27, 2024
d330ae8
[cmake][conan] Fix install dir usage for consumers
NikitaZotov Oct 28, 2024
54f8d67
[ci][conan] Remove extra preset for debug tests
NikitaZotov Oct 28, 2024
a037ca4
[cmake][tools][kpm] Fix includes
NikitaZotov Oct 28, 2024
4b4e970
[cmake] Fix rpath for ubuntu
NikitaZotov Oct 28, 2024
3f4ee65
[memory][tests] Check ScLock is locked before lock
NikitaZotov Oct 28, 2024
1717fe2
[ci] Provide sc-machine extensions via arguments
NikitaZotov Oct 28, 2024
df593b7
[scripts] Remove build-depended scripts
NikitaZotov Oct 28, 2024
8181cc7
[scripts] Remove unused script vars
NikitaZotov Oct 28, 2024
ddbff77
[docker] Fix binary and library paths
NikitaZotov Oct 28, 2024
34d92c2
[ci] Implement archive release
NikitaZotov Oct 31, 2024
3ed9d42
[tests] Try to fix coverage
NikitaZotov Nov 1, 2024
4ab4e94
[scripts][fix] stop using env_vars in healthcheck.sh
FallenChromium Nov 1, 2024
bc66bfb
[ci] Use workflow_call in release to check tests beforehand
FallenChromium Nov 1, 2024
9c1375f
[build] use asio in Conan's websocketpp
FallenChromium Nov 1, 2024
569d6e7
[cmake][fix] An attempt to return at macro-based FindGLIB
FallenChromium Nov 1, 2024
7750760
[build][fix] Use appropriate requirement types in Conan package defin…
FallenChromium Nov 1, 2024
e2e1560
[build][fix] Bump Conan's glib recipe version to handle Python 3.12 s…
FallenChromium Nov 4, 2024
a75b60d
[ci] Update ci conan
NikitaZotov Nov 5, 2024
e49063d
[docs][agents][guide] Update test cmake
NikitaZotov Nov 5, 2024
cad5a76
[docker][refactor] Replace as with AS
NikitaZotov Nov 5, 2024
0dd66d9
[tools][machine-runner] Remove machine setup
NikitaZotov Nov 5, 2024
4afcfca
[tools][refactor] Rename test-repo to test-kb-bin
NikitaZotov Nov 5, 2024
3f38c24
[docs] Update readme
NikitaZotov Nov 5, 2024
79479b3
[refactor] Format code
NikitaZotov Nov 5, 2024
bc6d49b
[ci] Try to fix mismatched endline by newer codecov version
NikitaZotov Nov 5, 2024
2f5bf7c
[ci] Revert to ubuntu-22.04 for coverage
NikitaZotov Nov 5, 2024
3c19e51
[build] fix absolute rpaths
FallenChromium Nov 5, 2024
3b8b9ff
[ci] Don't build bench tests for coverage
NikitaZotov Nov 6, 2024
9c77e51
[tools][server][tests] Test run/stop sc-server module
NikitaZotov Nov 7, 2024
34cb32a
[cmake][refactor] Fix indentions
NikitaZotov Nov 7, 2024
1c33578
[cmake][kpm][fix] Loading sc-common extension
NikitaZotov Nov 7, 2024
0affbc4
[tests] Add default config for launching tests in vscode
NikitaZotov Nov 7, 2024
a972a11
[docs] Add info about good vscode extension for tests
NikitaZotov Nov 7, 2024
b154dd3
[docs] Apply changes
NikitaZotov Nov 7, 2024
88892d7
[build][conan][fix] libxml2 is build requirement
NikitaZotov Nov 7, 2024
d0df09c
[ci] Use macos-14 in release CD and macos15 in test native CI
NikitaZotov Nov 8, 2024
fb0b231
[review] vscode tests config
NikitaZotov Nov 13, 2024
049544f
[docker][docs] Update information about entrypoints for docker
NikitaZotov Nov 13, 2024
333ea0a
[cmake][conan] Fix parsing version
NikitaZotov Nov 13, 2024
70c624d
[docs] Clarify cmake problems for ubuntu-22.04; clarify target install
NikitaZotov Nov 13, 2024
095a839
[kpm][common] Leave TODO about transitive dependencies for agent tests
NikitaZotov Nov 13, 2024
6c06653
[docs][refactor] Fix indentions in changelog
NikitaZotov Nov 13, 2024
3ebb647
[docs] Eliminate `now` in changelog
NikitaZotov Nov 13, 2024
e272232
[tools][config] Leave TODO author
NikitaZotov Nov 13, 2024
b4e7c0c
[docs] Update CMake requirements and configuration instructions
NikitaZotov Nov 15, 2024
2de7ba1
[docs] Improve description of install target
NikitaZotov Nov 15, 2024
4ab1c93
[docs] Describe cmake presets
NikitaZotov Nov 15, 2024
b0217f1
[docs][review] Improve mentions about build system
NikitaZotov Nov 15, 2024
3a00c6a
[cmake][tools][builder] Make link with libxml2 private
NikitaZotov Nov 18, 2024
4631700
[cmake][refactor] Rename FindGLIB to find_glib
NikitaZotov Nov 18, 2024
2c79676
Review fixes
FallenChromium Nov 22, 2024
449146e
Review fixes
NikitaZotov Nov 23, 2024
cb70fec
[tests][vscode] Add settings for TestMate
NikitaZotov Nov 23, 2024
4feda73
[docs] Add notes for extensions directory
NikitaZotov Nov 24, 2024
32c74ca
[memory][tools][tests] Rename performance directories to benchmark
NikitaZotov Nov 25, 2024
1b05595
[docs][tools] Update paths to binaries
NikitaZotov Nov 25, 2024
da673db
[docs][review] Use sc-machine::sc-memory instead of sc-memory
NikitaZotov Nov 25, 2024
7cd84c5
[memory] Merge features from main
NikitaZotov Nov 27, 2024
74b336d
[docs][build][refactor] Header namings
NikitaZotov Dec 2, 2024
e951006
[docs][conan] Update sc-machine recipe description
NikitaZotov Dec 2, 2024
da73550
[docs] Abstract example conanfile.txt
NikitaZotov Dec 2, 2024
94acb12
[ci] Add checkout in test_conan
NikitaZotov Dec 3, 2024
e4d0244
[cmake] Fix typos
NikitaZotov Dec 3, 2024
82a7f07
[docs] Add Quick Start page
FallenChromium Nov 22, 2024
32a4b13
[docs] Mention python version for mkdocs
NikitaZotov Dec 2, 2024
6ec7b1e
[docs][quick-start] Make conan section the first
NikitaZotov Dec 2, 2024
7943ced
[docs] Simplify and clarify commands
NikitaZotov Dec 2, 2024
f9a58ca
[docs] Apply changes
NikitaZotov Dec 3, 2024
4704452
[tools][machine-runner] Allow launch sc-machine without config
NikitaZotov Dec 3, 2024
5e23a53
[tools][machine-runner][tests] Configure extensions path
NikitaZotov Dec 3, 2024
d74aeab
[docs] Update cmake flags
NikitaZotov Dec 3, 2024
ae07edf
[scripts] Update clang-format scripts
NikitaZotov Dec 3, 2024
579d5b4
[docs] Devide docs into user guides and developer guides; make pretty…
NikitaZotov Dec 3, 2024
da323e3
[docs] Quick start for developers
NikitaZotov Dec 3, 2024
cf7cb28
[docs][refactor] Rename developer instructions to build instructions
NikitaZotov Dec 4, 2024
a279a6b
[docs] Make architecture section separated
NikitaZotov Dec 4, 2024
cca0ca6
[docs] Remove license md
NikitaZotov Dec 4, 2024
e2ab11f
[docs] Update launching ctest
NikitaZotov Dec 4, 2024
fce3c74
[build][conan] Fix duplicating parse sc-machine version
NikitaZotov Dec 5, 2024
bd2441b
[docs][review] Remove misleading text
NikitaZotov Dec 5, 2024
01fb8a6
[ci] Install cmake via pipx for ubuntu-22.04
NikitaZotov Dec 5, 2024
a1bbce9
[docker][docs] Remove repo.path from KB_PATH
NikitaZotov Dec 5, 2024
cdc4ed6
[docs] Update changelog
NikitaZotov Dec 6, 2024
38b6e5e
[docs] Remove -C argument during launching ctest
NikitaZotov Dec 6, 2024
1e1730f
[build][conan] gtest is build requirement
NikitaZotov Dec 6, 2024
4dd7949
[docs][docker] Clarify docker image pulling during run
NikitaZotov Dec 9, 2024
9c1b044
[build][conan] gtest is test requirement
NikitaZotov Dec 9, 2024
6dc08de
[refactor][memory][tests] Ignore prints by clang
NikitaZotov Dec 9, 2024
35958da
[docs] Clarify comments in docker container docs
NikitaZotov Dec 10, 2024
a875241
[docs] Apply changes
NikitaZotov Dec 13, 2024
bedc630
[memory][tests][benchmark] Change using NodeVar to using VarNode
NikitaZotov Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ README.md
codecov.yml
.git
.venv
**/*.scdb
/CMakeUserPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,22 @@ jobs:
with:
submodules: recursive

- name: apt cache
uses: actions/cache@v4
with:
path: |
/var/cache/apt/
/var/lib/apt/
key: apt-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/install_deps_ubuntu.sh') }}

- name: Install dependencies
id: install_deps
run: scripts/install_deps_ubuntu.sh --dev

- name: Restore build caches
uses: hendrikmuhs/[email protected]
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ github.job }}-${{ matrix.config.os }}-${{ matrix.config.cxx }}-${{ matrix.config.build_type }}

- name: Build
Expand All @@ -47,25 +56,25 @@ jobs:
BUILD_TYPE: ${{ matrix.config.build_type }}
COVERAGE: ON
SANITIZER_TYPE: none
run: scripts/ci/make_tests.sh
run: cmake --preset debug -DSC_COVERAGE=ON -DSC_BUILD_BENCH=OFF && cmake --build --preset debug

- name: Prepare coverage
id: prepare_coverage
run: scripts/ci/prepare_coverage.sh

- name: Run tests
id: run_tests
run: scripts/ci/run_tests.sh
run: cd build/Debug && ctest -C Debug -V

- name: Export coverage report
id: export_coverage
run: scripts/ci/export_coverage.sh

- name: Upload coverage report to CodeCov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v4.6.0
with:
token: ${{secrets.CODECOV_TOKEN}}
directory: ${{github.workspace}}/build
directory: ${{github.workspace}}/build/Debug
files: coverage.info
flags: unittests
fail_ci_if_error: true
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/check_dockerfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker

on:
pull_request:
branches: [main]
workflow_call:

jobs:
build:
name: Build and Run
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v6
with:
push: false
load: true
tags: ostis/sc-machine:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run Docker Compose
run: docker compose up -d --wait
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
config:
- {
name: "Sanitizer - address",
os: ubuntu-22.04,
os: ubuntu-24.04,
sanitizer: "address",
cc: clang,
cxx: clang++,
Expand All @@ -30,13 +30,22 @@ jobs:
with:
submodules: recursive

- name: apt cache
uses: actions/cache@v4
with:
path: |
/var/cache/apt/
/var/lib/apt/
key: apt-${{ runner.os }}-dev-${{ hashFiles('**/install_deps_ubuntu.sh') }}

- name: Install dependencies
id: install_deps
run: scripts/install_deps_ubuntu.sh --dev

- name: Restore build caches
uses: hendrikmuhs/[email protected]
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ github.job }}-${{ matrix.config.os}}-${{ matrix.config.cxx }}-${{ matrix.config.build_type }}

- name: Build
Expand All @@ -47,8 +56,8 @@ jobs:
BUILD_TYPE: ${{ matrix.config.build_type }}
COVERAGE: OFF
SANITIZER_TYPE: ${{ matrix.config.sanitizer }}
run: scripts/ci/make_tests.sh
run: cmake --preset debug -DSC_USE_SANITIZER=${{ matrix.config.sanitizer }} && cmake --build --preset debug

- name: Run tests
id: run_tests
run: scripts/ci/run_tests.sh
run: cd build/Debug && ctest -C Debug -V
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
check_pr_commits:
name: Check commit messages
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: GS Commit Message Checker
Expand All @@ -19,7 +19,7 @@ jobs:
uses: GsActions/commit-message-checker@v2
with:
# A regex pattern to check if a commit message is valid.
pattern: "((\\[(builder|changelog|ci|thirdparty|config|doc|docs|docker|kpm|test|tests|memory|tools|review|refactor|scripts|server|git|cmake)\\])+(.)+)|(Review fixes)$"
pattern: "((\\[(builder|changelog|ci|thirdparty|config|doc|docs|docker|kpm|test|tests|memory|tools|review|refactor|scripts|server|git|cmake|build)\\])+(.)+)|(Review fixes)$"
# Expression flags change how the expression is interpreted.
flags: # optional, default is gm
# A error message which will be returned in case of an error.
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/docker.yml

This file was deleted.

File renamed without changes.
57 changes: 0 additions & 57 deletions .github/workflows/main.yml

This file was deleted.

84 changes: 83 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,88 @@ on:
workflow_dispatch:

jobs:
build:
tests-conan:
uses: ./.github/workflows/test_conan.yml
check-dockerfile:
uses: ./.github/workflows/check_dockerfile.yml
build-conan:
needs: tests-conan
strategy:
fail-fast: true
matrix:
config:
- { os: ubuntu-22.04, cc: "gcc", cxx: "g++" }
- { os: macos-14, cc: "clang", cxx: "clang++" }

runs-on: ${{ matrix.config.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Restore ccache caches
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}

- name: Conan cache
uses: actions/cache@v4
with:
path: ~/.conan/data
key: conan-${{ runner.os }}-${{ hashFiles('**/conanfile.py') }}

- name: apt cache
uses: actions/cache@v4
if: runner.os == 'Linux'
with:
path: |
/var/cache/apt/
/var/lib/apt/
key: apt-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/install_deps_ubuntu.sh') }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Set up pipx
run: |
python -m pip install --user pipx
python -m pipx ensurepath
- name: Set up Conan
run: |
pipx install cmake
pipx install conan
- name: Install compilers (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt install build-essential ninja-build ccache

- name: Install compilers (macOS)
if: runner.os == 'macOS'
run: brew install cmake ninja ccache

- name: Build sc-machine
id: run_cmake
run: |
cmake --preset release-conan
cmake --build --preset release
- name: Create archive
run: |
cd ./build/Release
cpack -G TGZ
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: sc-machine-${{ matrix.config.os }}-${{ github.ref_name }}
path: ./build/Release/sc-machine-*.tar.gz

changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -29,6 +110,7 @@ jobs:
name: 'v${{ github.ref_name }}'

docker:
needs: check-dockerfile
runs-on: ubuntu-latest
steps:
-
Expand Down
Loading
Loading