Skip to content

Commit 0340fae

Browse files
authored
[merge] Merge pull request #467 from inexorgame/iceflower/git-fox
[ci] Fix ci
2 parents cab5078 + 1d0fdaa commit 0340fae

File tree

10 files changed

+33
-39
lines changed

10 files changed

+33
-39
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
tar xfz vulkansdk.tar.gz -C "${{ env.inexor_vulkan_sdk }}"
8282
8383
- name: Checkout
84-
uses: actions/checkout@v2
84+
uses: actions/checkout@v3
8585

8686
- name: Configure CMake
8787
shell: bash
@@ -155,7 +155,7 @@ jobs:
155155
7z x vulkansdk.exe -o"${{ env.inexor_vulkan_sdk }}"
156156
157157
- name: Checkout
158-
uses: actions/checkout@v2
158+
uses: actions/checkout@v3
159159

160160
- name: Configure CMake
161161
shell: pwsh

.github/workflows/build_documentation.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,10 @@ jobs:
1414
# Update package lists
1515
apt update -qq
1616
# Install build tools
17-
apt install -y doxygen git python3 python3-pip python3-venv wget
18-
19-
- name: Update CMake
20-
run: |
21-
apt update -qq
22-
apt install -y software-properties-common
23-
apt remove --purge --auto-remove cmake
24-
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
25-
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
26-
apt update -qq
27-
apt install -y cmake
17+
apt install -y cmake doxygen git python3 python3-pip python3-venv wget
2818
2919
- name: Checkout
30-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
3121

3222
- name: Configure CMake
3323
working-directory: ${{ github.workspace }}/documentation

.github/workflows/code_style.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
git
2222
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525

2626
- name: Fetch ${{ github.base_ref }}
2727
shell: bash
2828
run: |
29+
git config --global --add safe.directory $(pwd)
2930
git fetch --progress --depth=1 origin ${{ github.base_ref }}
3031
git log --pretty=oneline
3132

.github/workflows/commit_naming.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@ jobs:
2020
2121
- name: Checkout (Pull Request)
2222
if: ${{ github.event_name == 'pull_request' }}
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2424
with:
2525
ref: ${{ github.event.pull_request.head.sha }}
2626

2727
- name: Shallow fetch (Pull Request)
2828
if: ${{ github.event_name == 'pull_request' }}
2929
run: |
30+
git config --global --add safe.directory $(pwd)
3031
git fetch --progress --shallow-exclude ${{ github.base_ref }} origin +${{ github.sha }}:refs/remotes/origin/${{ github.head_ref }}
3132
git log --pretty=oneline
3233
3334
- name: Checkout (Push)
3435
if: ${{ github.event_name == 'push' }}
35-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3637

3738
- name: Install gitcc
3839
run: |
@@ -42,9 +43,11 @@ jobs:
4243
- name: Check commits (Pull Request)
4344
if: ${{ github.event_name == 'pull_request' }}
4445
run: |
46+
git config --global --add safe.directory $(pwd)
4547
gitcc history --verbose ./
4648
4749
- name: Check commit (Push)
4850
if: ${{ github.event_name == 'push' }}
4951
run: |
52+
git config --global --add safe.directory $(pwd)
5053
gitcc commit ./

.github/workflows/static_analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
tar xfz vulkansdk.tar.gz -C "${{ env.inexor_vulkan_sdk }}"
6262
6363
- name: Checkout
64-
uses: actions/checkout@v2
64+
uses: actions/checkout@v3
6565

6666
- name: Configure CMake
6767
run: |

documentation/requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sphinx==4.0.3
2-
sphinx_rtd_theme>=0.4.3
3-
exhale>=0.2.3
4-
sphinxcontrib-mermaid>=0.4.0
5-
plotly>=4.7.1
6-
pandas>=1.0.3
7-
recommonmark>=0.6.0
1+
sphinx>=4.5.0
2+
sphinx_rtd_theme>=1.0.0
3+
exhale>=0.3.1
4+
sphinxcontrib-mermaid>=0.7.1
5+
plotly>=5.7.0
6+
pandas>=1.4.2
7+
recommonmark>=0.7.1

include/inexor/vulkan-renderer/world/cube.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Cube : public std::enable_shared_from_this<Cube> {
8686
void remove_children();
8787

8888
/// Get the root to this cube.
89-
[[nodiscard]] std::shared_ptr<Cube> root() noexcept;
89+
[[nodiscard]] std::shared_ptr<Cube> root();
9090
/// Get the vertices of this cube. Use only on geometry cubes.
9191
[[nodiscard]] std::array<glm::vec3, 8> vertices() const noexcept;
9292

include/inexor/vulkan-renderer/wrapper/mesh_buffer.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Device;
3838
template <typename VertexType, typename IndexType = std::uint32_t>
3939
class MeshBuffer {
4040
const Device &m_device;
41-
std::string m_name;
41+
const std::string &m_name;
4242

4343
GPUMemoryBuffer m_vertex_buffer;
4444

@@ -64,7 +64,7 @@ class MeshBuffer {
6464
m_index_buffer(std::make_optional<GPUMemoryBuffer>(
6565
device, name, sizeof(IndexType) * index_count,
6666
VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VMA_MEMORY_USAGE_CPU_ONLY)),
67-
m_device(device) {
67+
m_device(device), m_name(name) {
6868
assert(device.device());
6969
assert(device.allocator());
7070
assert(!name.empty());
@@ -89,8 +89,7 @@ class MeshBuffer {
8989
: m_vertex_buffer(device, name, sizeof(VertexType) * vertex_count,
9090
VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,
9191
VMA_MEMORY_USAGE_CPU_ONLY),
92-
m_index_buffer(std::nullopt), m_number_of_vertices(vertex_count), m_device(device) {
93-
92+
m_index_buffer(std::nullopt), m_number_of_vertices(vertex_count), m_device(device), m_name(name) {
9493
assert(device.device());
9594
assert(device.allocator());
9695
assert(!name.empty());
@@ -167,11 +166,12 @@ class MeshBuffer {
167166

168167
MeshBuffer(const MeshBuffer &) = delete;
169168

170-
MeshBuffer(MeshBuffer &&other) noexcept
171-
: m_name(std::move(other.m_name)), m_vertex_buffer(std::move(other.m_vertex_buffer)),
172-
m_index_buffer(std::exchange(other.m_index_buffer, std::nullopt)),
173-
m_number_of_vertices(other.m_number_of_vertices), m_number_of_indices(other.m_number_of_indices),
174-
m_device(other.m_device) {}
169+
MeshBuffer(MeshBuffer &&other) noexcept : m_device(other.m_device), m_name(other.m_name) {
170+
m_vertex_buffer = std::move(other.m_vertex_buffer);
171+
m_index_buffer = std::exchange(other.m_index_buffer, std::nullopt);
172+
m_number_of_vertices = other.m_number_of_vertices;
173+
m_number_of_indices = other.m_number_of_indices;
174+
}
175175

176176
~MeshBuffer() = default;
177177

@@ -204,7 +204,7 @@ class MeshBuffer {
204204

205205
[[nodiscard]] auto get_index_buffer_address() const {
206206
if (!m_index_buffer) {
207-
throw std::runtime_error(std::string("Error: No index buffer for mesh " + m_name + "!"));
207+
throw std::runtime_error("Error: No index buffer for mesh available");
208208
}
209209

210210
return m_index_buffer.value().allocation_info().pMappedData;
@@ -217,7 +217,7 @@ class MeshBuffer {
217217

218218
void update_indices(const std::vector<IndexType> &indices) {
219219
if (!m_index_buffer) {
220-
throw std::runtime_error(std::string("Error: No index buffer for mesh " + m_name + "!"));
220+
throw std::runtime_error("Error: No index buffer for mesh available");
221221
}
222222

223223
std::memcpy(m_index_buffer.value().allocation_info().pMappedData, indices.data(),

src/vulkan-renderer/io/nxoc_parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ByteStream NXOCParser::serialize(const std::shared_ptr<const world::Cube> cube,
7676

7777
std::shared_ptr<world::Cube> NXOCParser::deserialize(const ByteStream &stream) {
7878
ByteStreamReader reader(stream);
79-
if (reader.read<std::string>(std::size_t(13)) != "Inexor Octree") {
79+
if (reader.read<std::string>(13ull) != "Inexor Octree") {
8080
throw IoException("Wrong identifier.");
8181
}
8282
const auto version = reader.read<std::uint32_t>();

src/vulkan-renderer/world/cube.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void Cube::remove_children() {
2323
}
2424
}
2525

26-
std::shared_ptr<Cube> Cube::root() noexcept {
26+
std::shared_ptr<Cube> Cube::root() {
2727
std::shared_ptr<Cube> new_parent = m_parent.lock();
2828
if (!new_parent) {
2929
return shared_from_this();

0 commit comments

Comments
 (0)