Skip to content

Commit eddc7a0

Browse files
authored
github: Update CI matrix (#8)
Fix various `std::cstdint` usages
1 parent b875e3b commit eddc7a0

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

.github/workflows/unit_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build_and_test:
1111
strategy:
1212
matrix:
13-
os: [ubuntu-20.04, ubuntu-22.04, macos-13, macos-14]
13+
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, macos-15]
1414
runs-on: ${{ matrix.os }}
1515
env:
1616
EXTRA_CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Release -DEDUCE_CORE_BUILD_TESTS=ON -DEDUCE_CORE_BUILD_EXAMPLES=ON

include/educelab/core/Version.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/** @file */
44

5+
#include <cstdint>
56
#include <string>
67

78
namespace educelab::core
@@ -16,11 +17,11 @@ struct ProjectInfo {
1617
/** Get the library name and version string */
1718
static auto NameAndVersion() -> std::string;
1819
/** Get the library Major version number */
19-
static auto VersionMajor() -> uint32_t;
20+
static auto VersionMajor() -> std::uint32_t;
2021
/** Get the library Minor version number */
21-
static auto VersionMinor() -> uint32_t;
22+
static auto VersionMinor() -> std::uint32_t;
2223
/** Get the library Patch version number */
23-
static auto VersionPatch() -> uint32_t;
24+
static auto VersionPatch() -> std::uint32_t;
2425
/** Get the git repository URL */
2526
static auto RepositoryURL() -> std::string;
2627
/** Get the full hash for the current git commit */

include/educelab/core/types/Uuid.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/** @file */
44

55
#include <array>
6+
#include <cstdint>
67
#include <string>
78
#include <string_view>
89

@@ -57,7 +58,7 @@ class Uuid
5758

5859
private:
5960
/** Byte type */
60-
using Byte = uint8_t;
61+
using Byte = std::uint8_t;
6162
/** Byte storage */
6263
std::array<Byte, 16> buffer_{};
6364
};
@@ -67,15 +68,12 @@ auto operator<<(std::ostream& os, const Uuid& uuid) -> std::ostream&;
6768

6869
} // namespace educelab
6970

70-
namespace std
71-
{
7271
/** @brief Hash function for educelab::Uuid */
7372
template <>
74-
struct hash<educelab::Uuid> {
73+
struct std::hash<educelab::Uuid> {
7574
/** Hash Uuid */
7675
auto operator()(educelab::Uuid const& u) const noexcept -> std::size_t
7776
{
7877
return std::hash<std::string>{}(u.string());
7978
}
80-
};
81-
} // namespace std
79+
}; // namespace std

src/Version.cpp.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ auto ProjectInfo::Name() -> std::string
88
return name;
99
}
1010

11-
auto ProjectInfo::VersionMajor() -> uint32_t
11+
auto ProjectInfo::VersionMajor() -> std::uint32_t
1212
{
1313
static uint32_t vMaj{@PROJECT_VERSION_MAJOR@};
1414
return vMaj;
1515
}
1616

17-
auto ProjectInfo::VersionMinor() -> uint32_t
17+
auto ProjectInfo::VersionMinor() -> std::uint32_t
1818
{
1919
static uint32_t vMin{@PROJECT_VERSION_MINOR@};
2020
return vMin;
2121
}
2222

23-
auto ProjectInfo::VersionPatch() -> uint32_t
23+
auto ProjectInfo::VersionPatch() -> std::uint32_t
2424
{
2525
static uint32_t vPatch{@PROJECT_VERSION_PATCH@};
2626
return vPatch;

0 commit comments

Comments
 (0)