From b903a09f46b130467cc83e813a54260295d82ca9 Mon Sep 17 00:00:00 2001 From: Rodion Suvorov Date: Wed, 5 Feb 2025 17:52:07 +0300 Subject: [PATCH 1/5] fix: hash_pair function --- src/util/pair_hash.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util/pair_hash.hpp b/src/util/pair_hash.hpp index 62a90171e..9e0069cf2 100644 --- a/src/util/pair_hash.hpp +++ b/src/util/pair_hash.hpp @@ -37,11 +37,20 @@ namespace spla { * @{ */ + template + inline void hash_combine(std::size_t& seed, const T& v) { + std::hash hasher; + seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); + } + struct pair_hash { public: template std::size_t operator()(const std::pair& x) const { - return std::hash()(x.first) ^ std::hash()(x.second); + std::size_t seed = 0; + hash_combine(seed, x.first); + hash_combine(seed, x.second); + return seed; } }; From 108b347daf97a9ad9b13d5a934456fbd93652ba8 Mon Sep 17 00:00:00 2001 From: Rodion Suvorov <107667059+suvorovrain@users.noreply.github.com> Date: Fri, 7 Feb 2025 18:39:25 +0300 Subject: [PATCH 2/5] linter report --- src/util/pair_hash.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/pair_hash.hpp b/src/util/pair_hash.hpp index 9e0069cf2..347e23416 100644 --- a/src/util/pair_hash.hpp +++ b/src/util/pair_hash.hpp @@ -37,7 +37,7 @@ namespace spla { * @{ */ - template + template inline void hash_combine(std::size_t& seed, const T& v) { std::hash hasher; seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); From e803685ad5507c7a265c5d54755dca731b773914 Mon Sep 17 00:00:00 2001 From: Rodion Suvorov Date: Fri, 7 Feb 2025 18:54:19 +0300 Subject: [PATCH 3/5] ci: update artifact --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 372dc9273..f682b69e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: run: cmake --build ${{ env.build_dir }} - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{env.artifact}} path: ${{env.build_dir}}/spla_x64.dll @@ -75,7 +75,7 @@ jobs: run: cmake --build ${{ env.build_dir }} - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{env.artifact}} path: ${{env.build_dir}}/libspla_x64.so @@ -105,7 +105,7 @@ jobs: run: cmake --build ${{ env.build_dir }} - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{env.artifact}} path: | From c5dfeb0fc2708018f428984018ddebb0c329e686 Mon Sep 17 00:00:00 2001 From: Rodion Suvorov Date: Fri, 7 Feb 2025 19:33:00 +0300 Subject: [PATCH 4/5] ci: fix action --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f682b69e7..13b80ba0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: - name: Upload binary uses: actions/upload-artifact@v4 with: - name: ${{env.artifact}} + name: windows-${{env.artifact}} path: ${{env.build_dir}}/spla_x64.dll @@ -77,7 +77,7 @@ jobs: - name: Upload binary uses: actions/upload-artifact@v4 with: - name: ${{env.artifact}} + name: linux-${{env.artifact}} path: ${{env.build_dir}}/libspla_x64.so macos: @@ -107,7 +107,7 @@ jobs: - name: Upload binary uses: actions/upload-artifact@v4 with: - name: ${{env.artifact}} + name: macos-${{env.artifact}} path: | ${{env.build_dir}}/libspla_x64.dylib ${{env.build_dir}}/libspla_arm64.dylib From 7a809ac6d9ca39e442f04031463042f290699367 Mon Sep 17 00:00:00 2001 From: Rodion Suvorov Date: Fri, 14 Feb 2025 10:56:59 +0300 Subject: [PATCH 5/5] CI: update macos version to 14 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13b80ba0f..eefb03f7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: path: ${{env.build_dir}}/libspla_x64.so macos: - runs-on: macos-11 + runs-on: macos-14 steps: - uses: actions/checkout@v2 with: