Skip to content

Commit

Permalink
Merge branch '266-add-name-component' of https://github.com/GameDevTe…
Browse files Browse the repository at this point in the history
…cnico/cubos into 266-add-name-component
  • Loading branch information
diogomsmiranda committed Feb 10, 2024
2 parents 181678b + 8120bbd commit a2f5903
Show file tree
Hide file tree
Showing 219 changed files with 1,952 additions and 1,506 deletions.
Binary file removed .DS_Store
Binary file not shown.
8 changes: 3 additions & 5 deletions .github/workflows/build-doxygen-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@ on:
branches: [ main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

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

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev doxygen
sudo apt-get install xorg-dev libglu1-mesa-dev gcc-11 g++-11 doxygen
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -36,7 +35,6 @@ jobs:
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_DOCUMENTATION=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target generate-docs

- name: Deploy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-engine-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest

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

Expand All @@ -33,7 +33,7 @@ jobs:
run: |
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CCACHE_COMPILERTYPE }}-${{ env.BUILD_TYPE }}-${{ github.ref }}-${{ steps.ccache_vars.outputs.timestamp }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-engine-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: macos-latest

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

Expand All @@ -33,7 +33,7 @@ jobs:
run: |
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CCACHE_COMPILERTYPE }}-${{ env.BUILD_TYPE }}-${{ github.ref }}-${{ steps.ccache_vars.outputs.timestamp }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-engine-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
runs-on: windows-2022

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

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -39,7 +39,7 @@ jobs:
run: |
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CCACHE_COMPILERTYPE }}-${{ env.BUILD_TYPE }}-${{ github.ref }}-${{ steps.ccache_vars.outputs.timestamp }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Conventional Commits

on:
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: webiny/[email protected]
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/copy-labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: [pull_request]
name: 🏷️ Copy Labels

on:
pull_request:
branches: [ main ]

jobs:
copy-labels:
Expand Down
50 changes: 44 additions & 6 deletions .github/workflows/create-coverage-report.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,72 @@
name: 📃 Create Coverage Report

on: [push]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
BUILD_TYPE: Debug
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: "${{ github.workspace }}/.ccache"
CCACHE_COMPILERTYPE: gcc

jobs:
build:
runs-on: ubuntu-latest

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

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev gcc-11 g++-11 lcov
sudo apt-get install xorg-dev libglu1-mesa-dev gcc-11 g++-11 ccache lcov
- name: Get timestamp
shell: bash
id: ccache_vars
run: |
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CCACHE_COMPILERTYPE }}-${{ env.BUILD_TYPE }}-${{ github.ref }}-${{ steps.ccache_vars.outputs.timestamp }}
restore-keys: |
ccache-${{ env.CCACHE_COMPILERTYPE }}-${{ env.BUILD_TYPE }}-${{ github.ref }}-
ccache-${{ env.CCACHE_COMPILERTYPE }}-${{ env.BUILD_TYPE }}-
ccache-${{ env.CCACHE_COMPILERTYPE }}-
ccache-
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_COVERAGE=ON -DBUILD_CORE_TESTS=ON -DUSE_CLANG_TIDY=OFF
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_COVERAGE=ON -DBUILD_CORE_TESTS=ON -DBUILD_ENGINE_TESTS=ON -DUSE_CLANG_TIDY=OFF
shell: bash
env:
CC: gcc-11
CXX: g++-11

- name: CCache Prolog
run: |-
ccache -s # Print current cache stats
ccache -z # Zero cache entry
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target coverage

- name: CCache Epilog
run: |
ccache -s # Print current cache stats
- name: Upload
run: bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/build/coverage.info

uses: codecov/codecov-action@v4
with:
directory: ${{github.workspace}}/build/
fail_ci_if_error: true
files: ./coverage-core.info,./coverage-engine.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
12 changes: 4 additions & 8 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ name: 📖 Deploy Documentation Previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
branches: [ main ]

env:
BUILD_TYPE: Release
Expand All @@ -18,17 +14,17 @@ jobs:
runs-on: ubuntu-latest

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

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev doxygen
sudo apt-get install xorg-dev libglu1-mesa-dev gcc-11 g++-11 doxygen
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,5 @@ imgui.ini
# direnv - maybe .envrc is ok if 'use flake' doesn't break non nixos machines
/.envrc
/.direnv

.DS_store
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Voxel palette editor plugin (#662).
- Scene editor plugin (#265, #551).
- Metrics panel plugin, which only shows FPS statistics for now (#275).
- Parent-child hierarchies to the transform plugin, at last (#334).

### Changed

- Also track test coverage of engine (#941)
- Start using reflection on most of the ECS (#462).
- Change the ECS to be archetype-based (#819)
- Move the Cubos class to the core (#900).
- Switch to new system syntax (#896).
- Bump `glad` from `d08b1aa` to `73eaae0`.
- Bump `json` from `v3.11.2` to `v3.11.3`.
- Change Gizmo plugin to use the Screen picker plugin (#870).

### Deprecated

Expand Down
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,26 @@ if(ENABLE_COVERAGE)
append_coverage_compiler_flags()

setup_target_for_coverage_lcov(
NAME coverage
NAME coverage-core
EXECUTABLE core/tests/cubos-core-tests
DEPENDENCIES cubos-core-tests

EXCLUDE "core/lib/*" "core/tests/*" "tools/quadrados" "*-components.cpp"
EXCLUDE "core/lib/*" "core/tests/*" "engine/*" "lib/*" "tools/*" "*-components.cpp"

LCOV_ARGS "--no-external"
)

setup_target_for_coverage_lcov(
NAME coverage-engine
EXECUTABLE engine/tests/cubos-engine-tests
DEPENDENCIES cubos-engine-tests

EXCLUDE "engine/lib/*" "engine/tests/*" "core/*" "lib/*" "tools/*" "*-components.cpp"

LCOV_ARGS "--no-external"
)

add_custom_target(coverage DEPENDS coverage-core coverage-engine)
endif()

# Enable CCache
Expand Down
Loading

0 comments on commit a2f5903

Please sign in to comment.