Skip to content

Commit

Permalink
update longtail to 0.4.0-pre0
Browse files Browse the repository at this point in the history
  • Loading branch information
DanEngelbrecht committed Sep 7, 2023
1 parent 4469fb5 commit 1bcb7a5
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:

strategy:
matrix:
arch: [amd64]
include:
- os: ubuntu-20.04
target: "./cmd/longtail/longtail"
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
arch: [amd64]
# include:
# - os: macos-latest
# arch: arm64

runs-on: ${{matrix.os}}

Expand All @@ -46,9 +50,16 @@ jobs:
pushd ./remotestore
go test .
popd
env:
GOARCH: "${{matrix.arch}}"
CGO_ENABLED: 1


- name: build cmd
run: |
pushd ./cmd/longtail
go build .
popd
env:
GOARCH: ${{matrix.arch}}
CGO_ENABLED: 1
16 changes: 14 additions & 2 deletions longtaillib/longtail/include/src/longtail.h
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ struct Longtail_StoreIndex
uint32_t* m_ChunkCount; // Total number of chunks across all blocks - chunk hashes may occur more than once
TLongtail_Hash* m_BlockHashes; // [] m_BlockHashes is the hash of each block
TLongtail_Hash* m_ChunkHashes; // [] For each m_BlockChunkCount[n] there are n consecutive chunk hashes in m_ChunkHashes[]
uint32_t* m_BlockChunksOffsets; // [] m_BlockChunksOffsets[n] is the offset in m_ChunkBlockCount[] and m_ChunkHashes[]
uint32_t* m_BlockChunksOffsets; // [] m_BlockChunksOffsets[n] is the offset in m_ChunkSizes[] and m_ChunkHashes[]
uint32_t* m_BlockChunkCounts; // [] m_BlockChunkCounts[n] is number of chunks in block m_BlockHash[n]
uint32_t* m_BlockTags; // [] m_BlockTags is the tag for each block
uint32_t* m_ChunkSizes; // [] m_ChunkSizes is the size of each chunk
Expand Down Expand Up @@ -1632,7 +1632,19 @@ LONGTAIL_EXPORT int Longtail_ValidateStore(
* @param[in] store_index The source index to copy from
* @return An initialized struct Longtail_StoreIndex copied from @p store_index, or 0 on bad parameters / out of memory
*/
LONGTAIL_EXPORT struct Longtail_StoreIndex* Longtail_CopyStoreIndex(struct Longtail_StoreIndex* store_index);
LONGTAIL_EXPORT struct Longtail_StoreIndex* Longtail_CopyStoreIndex(const struct Longtail_StoreIndex* store_index);

/*! @brief Splits a Longtail_StoreIndex into multiple store indexes
*
* Splits a Longtail_StoreIndex into multiple store indexes with each having a max size of split_size.
* *
* @param[in] store_index The source index to split from
* @param[in] split_size The maximum size each resulting store index may have
* @param[out] split_size A pointer to a pointer that will contain a pointer to an array of store index pointers
* @param[out] out_count A pointer that will contain the number of store indexes in the resulting out_store_indexes array
* @return Return code (errno style), zero on success.
*/
LONGTAIL_EXPORT int Longtail_SplitStoreIndex(struct Longtail_StoreIndex* store_index, size_t split_size, struct Longtail_StoreIndex*** out_store_indexes, uint64_t* out_count);

/*! @brief Writes a struct Longtail_StoreIndex to a byte buffer.
*
Expand Down
Binary file modified longtaillib/longtail/liblongtail_darwin_x64.a
Binary file not shown.
Binary file modified longtaillib/longtail/liblongtail_linux_x64.a
Binary file not shown.
Binary file modified longtaillib/longtail/liblongtail_win32_x64.a
Binary file not shown.
4 changes: 4 additions & 0 deletions longtaillib/longtail_darwin_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package longtaillib

// #cgo LDFLAGS: -L${SRCDIR}/longtail -llongtail_darwin_arm64 -lm
import "C"

0 comments on commit 1bcb7a5

Please sign in to comment.