Skip to content

Commit

Permalink
Merge branch 'main' into feat/skip_generating_type_arcs
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov authored Dec 17, 2024
2 parents cd6c7a9 + af259c9 commit ce172e5
Show file tree
Hide file tree
Showing 215 changed files with 3,868 additions and 1,989 deletions.
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/ccache-action@v1.2
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/ccache-action@v1.2
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/ccache-action@v1.2
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

0 comments on commit ce172e5

Please sign in to comment.