Skip to content

Commit

Permalink
Fix various build actions in the actions
Browse files Browse the repository at this point in the history
  • Loading branch information
felixjulianheitmann committed Sep 20, 2024
1 parent 8d325ed commit 28a4714
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-test-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: configure
run: |
cmake -S . -B build -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DCMAKE_BUILD_TYPE=Release ..
cmake -S . -B build -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3.4 -DCMAKE_BUILD_TYPE=Release ..
- name: build
working-directory: build
Expand All @@ -32,7 +32,7 @@ jobs:
- name: list artifacts
run: ls -R

- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: lcxx-tests-mac
path: |
Expand All @@ -45,9 +45,9 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: lcxx-tests-mac

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-test-ubuntu.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:
fetch-depth: 0

Expand All @@ -36,7 +36,7 @@ jobs:
working-directory: build
run: cmake --build .

- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: lcxx-tests-ubuntu
path: |
Expand All @@ -50,15 +50,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get latest GCC (libstdc++ required)
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: lcxx-tests-ubuntu

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -30,7 +30,7 @@ jobs:
working-directory: build
run: cmake --build . --config Release

- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: lcxx-tests-windows
path: |
Expand All @@ -43,12 +43,12 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# - name: install OpenSSL
# run: choco install openssl

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: lcxx-tests-windows

Expand Down
1 change: 1 addition & 0 deletions modules/crypto/include/lcxx/hash.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef LCXX__CRYPTO_HASH_HPP__
#define LCXX__CRYPTO_HASH_HPP__

#include <array>
#include <span>
#include <string>

Expand Down
8 changes: 6 additions & 2 deletions tests/crypto/hash_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@

#include <lcxx/hash.hpp>

template < std::ranges::range R > auto str_to_vec( std::string_view const str ) -> R
template < std::ranges::range R >
auto str_to_vec( std::string_view const str ) -> R
requires( sizeof( std::ranges::range_value_t< R > ) == 1 )
{
auto bytes = str | std::views::transform( []( auto && c ) { return std::ranges::range_value_t< R >{ c }; } );
auto bytes = str | std::views::transform( []( auto && c ) {
return *reinterpret_cast< std::ranges::range_value_t< R > const * >( &c );
} );
return { bytes.begin(), bytes.end() };
}

Expand Down

0 comments on commit 28a4714

Please sign in to comment.