Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: add shared to cmake extension #159

Merged
merged 14 commits into from
Jun 2, 2024

Conversation

MementoRC
Copy link
Collaborator

@MementoRC MementoRC commented Mar 18, 2024

This adds a verification flow to check that a shared build works

@MementoRC MementoRC marked this pull request as draft March 18, 2024 21:38
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.68%. Comparing base (07d332e) to head (53fb299).
Report is 1 commits behind head on master.

Current head 53fb299 differs from pull request most recent head 74e791c

Please upload reports for the commit 74e791c to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #159   +/-   ##
=======================================
  Coverage   85.68%   85.68%           
=======================================
  Files          11       11           
  Lines         566      566           
  Branches       67       67           
=======================================
  Hits          485      485           
  Misses         45       45           
  Partials       36       36           

@MementoRC MementoRC marked this pull request as ready for review March 27, 2024 19:40
@MementoRC MementoRC requested a review from ofek March 27, 2024 19:41
@ofek
Copy link
Owner

ofek commented Jun 1, 2024

Is this still relevant? I'm sorry I don't have much time to look into it! If so I will merge.

@MementoRC
Copy link
Collaborator Author

MementoRC commented Jun 1, 2024

Well, yes it is. It only adds a n additional workflow to verify that shared library can be used. It is not urgent or critical. It's better to review it, in fact I need to remove the pgkconfiglite. Ping me when you get another window of availability for coincurve.
Thanks

@ofek ofek merged commit adff792 into ofek:master Jun 2, 2024
19 checks passed
@ofek
Copy link
Owner

ofek commented Jun 2, 2024

What's this, a hash of the source tar ball?

VENDORED_UPSTREAM_SHA = { env = "COINCURVE_UPSTREAM_SHA", default = "ba34be4319f505c5766aa80b99cfa696cbb2993bfecf7d7eb8696106c493cb8c" }

@MementoRC
Copy link
Collaborator Author

MementoRC commented Jun 2, 2024

Yes, I think I used it in the CMake fetching the secp256k1 tarball. It's likely the sha256sum

    if (NOT VENDORED_UPSTREAM_SHA)
        set(VENDORED_UPSTREAM_SHA "ba34be4319f505c5766aa80b99cfa696cbb2993bfecf7d7eb8696106c493cb8c")
    endif()

    if (NOT CMAKE_BUILD_TYPE)
        set(CMAKE_BUILD_TYPE Release)
    endif()

    # -fPIC is needed since we will link it from a shared object
    if (VENDORED_LIBRARY_STATIC_BUILD)
        set(CMAKE_POSITION_INDEPENDENT_CODE ON)
    endif()

    include(UpdateVendoredLibraryOptions)
    UpdateVendoredLibraryOptions("VENDORED_OPTION" "${VENDORED_LIBRARY_OPTION_PREFIX}")


    FetchContent_Declare(
        vendored_library
        URL "${VENDORED_UPSTREAM_URL}/${VENDORED_UPSTREAM_REF}.tar.gz"
        URL_HASH "SHA256=${VENDORED_UPSTREAM_SHA}"
    )

@MementoRC MementoRC deleted the feat/add-shared-to-cmake-extension branch June 2, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants