eqlabs / polkadot-light-client

Polkadot light client
2 stars 1 forks source link

GitHub action #38

Closed kylegranger closed 2 years ago

kylegranger commented 2 years ago

There is a new CI for polkadot-light-client. It employs the deploy key strategy first used in libp2p to clone private repositories. It also makes use of a cache for conan data. After you build the first time, you will see these cache items.

% gh actions-cache list
Total caches size 777.12 MB
Showing 2 of 2 cache entries in eqlabs/polkadot-light-client
gcc-plc-conan-data    422.22 MB  refs/heads/github-action  12 minutes ago
clang-plc-conan-data  354.90 MB  refs/heads/github-action  18 minutes ago

You can trigger the build by using this gh command, from the command line while in the repository.

gh workflow run 'Build' --ref github-action

If it gives you two choices, choose Build from build-ci.yml. Github caches these commands in a way that is not completely transparent to me.

mariopil commented 2 years ago

When I try to run cmake -DPACKAGE_MANAGER=Conan .. I'm stuck in cloning soralog:

conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generator cmake_find_package created Findyaml-cpp.cmake
conanfile.txt: Aggregating env generators
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
-- Conan: Using autogenerated Findyaml-cpp.cmake
-- Library yaml-cppd found /Users/mariuszpilarek/.conan/data/yaml-cpp/0.7.0/_/_/package/5895890015dbe81eaa12fa6c9be8ed2d5161d0cd/lib/libyaml-cppd.a
-- Found: /Users/mariuszpilarek/.conan/data/yaml-cpp/0.7.0/_/_/package/5895890015dbe81eaa12fa6c9be8ed2d5161d0cd/lib/libyaml-cppd.a
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mariuszpilarek/Projects/polkadot-light-client/build/cpp-libp2p.cmake/build/soralog
[ 12%] Performing download step (git clone) for 'soralog'
Cloning into 'src'...
kylegranger commented 2 years ago

thanks for that catch.. the default github host is getting overwritten by an empty string, when getting sent to the libp2p cmake, and none defined in the original plc cmake command line

GraDKh commented 2 years ago

Yes, you can just add set with CACHE and the default value defined

kylegranger commented 2 years ago

I think I just missed setting setting values for soralog and sqlite, as is done in libp2p.
I added the two lines here, to the one already there

set(LIBP2P_GITHUB_HOST "github.com" CACHE STRING "Host for cpp-libp2p repo (maybe overriden to provide custom ssh key)")
set(SQLITE_GITHUB_HOST "github.com" CACHE STRING "Host for sqlite repo (maybe overriden to provide custom ssh key)")
set(SORALOG_GITHUB_HOST "github.com" CACHE STRING "Host for soralog repo (maybe overriden to provide custom ssh key)")
kylegranger commented 2 years ago

Of course, I'll do a CI run again after this commit.

GraDKh commented 2 years ago

@kylegranger Could you please merge this PR when you have a chance. So that I'll rebase #35 on master and add key for scale repo in that branch before merging