Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 5900b6ede5af7e6ece01235f427944ad23568ddd
  • Loading branch information
Vertexwahn committed Aug 14, 2024
1 parent 0a50e4f commit cad7afd
Show file tree
Hide file tree
Showing 293 changed files with 6,612 additions and 2,756 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ sudo apt install lcov
Go to the directory that contains the `MODULE.bazel` file and execute:

```shell
./coverage.sh buchgr_remote_cache
./coverage.sh --additonal_bazel_config=buchgr_remote_cache
open coverage_report/index.html
```

Expand Down
8 changes: 7 additions & 1 deletion devertexwahn/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,14 @@ build:clang-tidy --cxxopt=-std=c++17
build:optimized build --copt=-O3

# IWYU
build:iwyu --aspects @com_github_storypku_bazel_iwyu//bazel/iwyu:iwyu.bzl%iwyu_aspect
# More details here: https://github.com/storypku/bazel_iwyu/pull/12
#build:iwyu --@bazel_iwyu//:iwyu_mappings=@my_repo//tools:iwyu_mappings
build:iwyu --config=gcc11
#build:iwyu --config=clang16
build:iwyu --aspects @bazel_iwyu//bazel/iwyu:iwyu.bzl%iwyu_aspect
build:iwyu --output_groups=report
build:iwyu --build_tag_filters=-no-iwyu # To include everything except the rules tagged with "no-iwyu"
build:iwyu --@bazel_iwyu//:iwyu_opts=--verbose=3,--no_fwd_decls,--cxx17ns,--max_line_length=127

try-import %workspace%/.bazelrc.remote_cache
try-import %workspace%/.bazelrc.build_meta
2 changes: 1 addition & 1 deletion devertexwahn/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.1
7.3.0
8 changes: 8 additions & 0 deletions devertexwahn/ci/macOS-12-apple-clang14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
# Apple Clang 14 on macOS 12
# Make sure we can build with Apple Clang13 in all different compilation modes
steps:
- script: |
df -h
displayName: 'Show disk space'
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: false

- script: |
df -h
displayName: 'Show disk space'
- script: |
sw_vers
uname
Expand Down
8 changes: 8 additions & 0 deletions devertexwahn/ci/macOS-12-clang14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
# Apple Clang 13 on macOS 12
# Make sure we can build with Apple Clang13 in all different compilation modes
steps:
- script: |
df -h
displayName: 'Show disk space'
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: false

- script: |
df -h
displayName: 'Show disk space'
- script: |
sw_vers
Expand Down
8 changes: 8 additions & 0 deletions devertexwahn/ci/macOS-13-apple-clang14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
# Apple Clang 14 on macOS 13
# Make sure we can build with Apple Clang13 in all different compilation modes
steps:
- script: |
df -h
displayName: 'Show disk space'
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: false

- script: |
df -h
displayName: 'Show disk space'
- script: |
sw_vers
uname
Expand Down
8 changes: 8 additions & 0 deletions devertexwahn/ci/macOS-14-apple-clang14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
# Apple Clang 14 on macOS 14
# Make sure we can build with Apple Clang13 in all different compilation modes
steps:
- script: |
df -h
displayName: 'Show disk space'
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: false

- script: |
df -h
displayName: 'Show disk space'
- script: |
sw_vers
uname
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-20.04-clang14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: 'Show OS version'
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-20.04-gcc9-dbg-part1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: 'Show OS version'
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-20.04-gcc9-dbg-part2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: 'Show OS version'
Expand Down
11 changes: 6 additions & 5 deletions devertexwahn/ci/ubuntu-20.04-gcc9-fast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

steps:
- script: |
df -H
df -h
displayName: 'Show disk space'
- checkout: self
Expand All @@ -18,12 +18,13 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: 'Show OS version'
- script: |
df -H
df -h
displayName: 'Show disk space'
- script: |
Expand All @@ -37,7 +38,7 @@ steps:
- script: |
df -H
df -h
displayName: 'Show disk space'
- script: |
Expand All @@ -46,7 +47,7 @@ steps:
displayName: "Show compiler information"
- script: |
df -H
df -h
displayName: 'Show disk space'
- script: |
Expand All @@ -55,7 +56,7 @@ steps:
displayName: 'Bazel build gcc9-fastbuild'
- script: |
df -H
df -h
displayName: 'Show disk space'
- script: |
Expand Down
7 changes: 4 additions & 3 deletions devertexwahn/ci/ubuntu-20.04-gcc9-opt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: 'Show OS version'
- script: |
df -H
df -h
displayName: 'Show disk space'
- script: |
Expand All @@ -37,7 +38,7 @@ steps:
- script: |
df -H
df -h
displayName: 'Show disk space'
- script: |
Expand All @@ -46,7 +47,7 @@ steps:
displayName: "Show compiler information"
- script: |
df -H
df -h
displayName: 'Show disk space'
# Qt compilation does not work: "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (and not with -fPIE)."
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-bazel-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: "Show OS version"
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-clang16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: "Show OS version"
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ steps:
fetchDepth: 1
lfs: false
submodules: false



- script: |
Expand Down
5 changes: 3 additions & 2 deletions devertexwahn/ci/ubuntu-22.04-cppcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: "Show OS version"
Expand All @@ -33,9 +34,9 @@ steps:
# displayName: "Install Cppcheck"

- script: |
curl -L -o cppcheck.tar.gz https://github.com/danmar/cppcheck/archive/refs/tags/2.14.1.tar.gz
curl -L -o cppcheck.tar.gz https://github.com/danmar/cppcheck/archive/refs/tags/2.14.2.tar.gz
tar xzf cppcheck.tar.gz
cd cppcheck-2.14.1
cd cppcheck-2.14.2
cmake -S . -B build
cmake --build build
sudo cmake --install build
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-gcc11-bzlmod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: 'Show OS version'
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-gcc11-dbg-part1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ steps:
fetchDepth: 1
lfs: false
submodules: false



- script: |
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-gcc11-dbg-part2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: "Show OS version"
Expand Down
1 change: 1 addition & 0 deletions devertexwahn/ci/ubuntu-22.04-gcc11-fast-opt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
submodules: false



- script: |
lsb_release -a
displayName: "Show OS version"
Expand Down
28 changes: 15 additions & 13 deletions devertexwahn/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@

set -euo pipefail

# Check arguments
if [ "$#" -ge 2 ]; then
echo "To many arguments detected. You can provide either one or no argument"
echo "Usage: $0 <additional_bazel_config>"
exit 1
fi

show_html_page=false
additional_bazel_config=""

# Provide a additional bazel config (bazel remote cache config expected) if provided
if [ "$#" -eq 1 ]; then
additional_bazel_config="--config=$1"
fi
# Parse arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--show_report|-s) show_html_page=true ;;
--additonal_bazel_config=*) additional_bazel_config="--config=${1#*=}" ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done

bazel coverage \
--config=gcc11 \
Expand All @@ -39,10 +38,13 @@ echo "Current coverage: $current_line_coverage"
old_line_coverage="95.0"
echo "Old coverage: $old_line_coverage"

# Open coverage report if flag is set
if [ "$show_html_page" = true ]; then
open coverage_report/index.html
fi

# if old coverage is higher than current coverage, fail
if (( $(echo "$current_line_coverage < $old_line_coverage"|bc -l) )); then
echo "Line coverage is lower than expected"
exit 1
fi

#open coverage_report/index.html
5 changes: 5 additions & 0 deletions devertexwahn/flatland/rendering/scene/load_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ Point3f convert_csv_to_point3f(const std::string& csv) {

Color3f convert_csv_to_color3f(const std::string& csv) {
std::vector<float> values = convert_to_float_vector(csv);

if(values.size() == 1) {
return Color3f{values[0]};
}

assert(values.size() == 3);
return Color3f{values[0], values[1], values[2]};
}
Expand Down
5 changes: 5 additions & 0 deletions devertexwahn/imaging/io/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ Image3f load_image(std::string_view filename) {
return image;
}

if(boost::ends_with(filename, ".jpg")) {
Image3f image = load_image_jpeg(filename.data());
return image;
}

if (boost::ends_with(filename, ".png")) {
ReferenceCounted<Image3f> tmp_image = load_image_png(filename);

Expand Down
Loading

0 comments on commit cad7afd

Please sign in to comment.