From e1289cac836be8855d1774d7c09b47d03f936c2d Mon Sep 17 00:00:00 2001 From: Katrina Knight Date: Mon, 25 Jul 2022 05:51:30 -0400 Subject: [PATCH 1/5] Added conan automation --- .github/workflows/conan.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/conan.yml diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml new file mode 100644 index 00000000..dfec678b --- /dev/null +++ b/.github/workflows/conan.yml @@ -0,0 +1,38 @@ +name: Conan development +on: + push: + branches: + - '*' + - '*/*' + - '**' + - '!production' + pull_request: + branches: + - '*' + - '*/*' + - '**' + - '!production' +env: + BUILD_TYPE: Debug +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get Conan + uses: turtlebrowser/get-conan@v1.0 + - name: Create default profile + run: conan profile new default --detect + - name: Update profile 11 + run: conan profile update settings.compiler.libcxx=libstdc++11 default + - name: Update profile version + run: conan profile update settings.compiler.version=10 default + - name: setup conan + run: | + conan config set general.revisions_enabled=True + conan remote add proofofwork https://conan.katcodes.tech/artifactory/api/conan/proof-of-work-main + conan user -p ${{ secrets.CONAN_USER_KEY }} -r proofofwork github + export CURRENT_VERSION=`git rev-parse --short HEAD` + conan install . -r proofofwork + conan create . proofofwork/unstable + conan upload gigamonkey/${CURRENT_VERSION}@proofofwork/unstable -r proofofwork --all From a7ef95c12d762ffd15077712718c2f1cf16852ed Mon Sep 17 00:00:00 2001 From: Katrina Knight Date: Mon, 25 Jul 2022 06:29:44 -0400 Subject: [PATCH 2/5] Fix ConanFile --- conanfile.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/conanfile.py b/conanfile.py index fbb7f59c..6663a9ee 100644 --- a/conanfile.py +++ b/conanfile.py @@ -15,24 +15,32 @@ class GigamonkeyConan(ConanFile): default_options = {"shared": False, "fPIC": True} generators = "cmake" exports_sources = "*" - requires = "boost/1.76.0", "openssl/1.1.1k", "cryptopp/8.5.0", "nlohmann_json/3.10.0", "gmp/6.2.1", "SECP256K1/0.1@proofofwork/stable", "data/0.2@proofofwork/stable" + requires = "boost/1.76.0", "openssl/1.1.1k", "cryptopp/8.5.0", "nlohmann_json/3.10.0", "gmp/6.2.1", "SECP256K1/0.1@proofofwork/unstable", "data/86991d9@proofofwork/unstable" def set_version(self): if "CIRCLE_TAG" in environ: self.version = environ.get("CIRCLE_TAG")[1:] + if "CURRENT_VERSION" in environ: + self.version = environ['CURRENT_VERSION'] def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - def build(self): + def configure_cmake(self): if "CMAKE_BUILD_CORES_COUNT" in environ: cmake = CMake(self, parallel=False) - cmake.configure() - cmake.build(args=["--", environ.get("CMAKE_BUILD_CORES_COUNT")]) else: cmake = CMake(self) - cmake.configure() + cmake.definitions["PACKAGE_TESTS"] = "Off" + cmake.configure() + return cmake + + def build(self): + cmake = self.configure_cmake() + if "CMAKE_BUILD_CORES_COUNT" in environ: + cmake.build(args=["--", environ.get("CMAKE_BUILD_CORES_COUNT")]) + else: cmake.build() def package(self): From 9bb805f5cf91927cd54dd41504d782c958c0432a Mon Sep 17 00:00:00 2001 From: Katrina Knight Date: Tue, 26 Jul 2022 16:51:41 -0400 Subject: [PATCH 3/5] Changed URL --- .github/workflows/conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index dfec678b..b40c77c6 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -30,7 +30,7 @@ jobs: - name: setup conan run: | conan config set general.revisions_enabled=True - conan remote add proofofwork https://conan.katcodes.tech/artifactory/api/conan/proof-of-work-main + conan remote add proofofwork https://conan.pow.co/artifactory/api/conan/conan conan user -p ${{ secrets.CONAN_USER_KEY }} -r proofofwork github export CURRENT_VERSION=`git rev-parse --short HEAD` conan install . -r proofofwork From be37eba36ac240035c2d8bf78fa2ac21d4b72a90 Mon Sep 17 00:00:00 2001 From: Katrina Knight Date: Tue, 26 Jul 2022 17:31:38 -0400 Subject: [PATCH 4/5] Remote change --- .github/workflows/conan.yml | 2 +- conanfile.py | 2 +- table.html | 200 ++++++++++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+), 2 deletions(-) create mode 100644 table.html diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml index b40c77c6..2a37aaf5 100644 --- a/.github/workflows/conan.yml +++ b/.github/workflows/conan.yml @@ -34,5 +34,5 @@ jobs: conan user -p ${{ secrets.CONAN_USER_KEY }} -r proofofwork github export CURRENT_VERSION=`git rev-parse --short HEAD` conan install . -r proofofwork - conan create . proofofwork/unstable + conan create . proofofwork/unstable -r proofofwork conan upload gigamonkey/${CURRENT_VERSION}@proofofwork/unstable -r proofofwork --all diff --git a/conanfile.py b/conanfile.py index 6663a9ee..7c740c96 100644 --- a/conanfile.py +++ b/conanfile.py @@ -15,7 +15,7 @@ class GigamonkeyConan(ConanFile): default_options = {"shared": False, "fPIC": True} generators = "cmake" exports_sources = "*" - requires = "boost/1.76.0", "openssl/1.1.1k", "cryptopp/8.5.0", "nlohmann_json/3.10.0", "gmp/6.2.1", "SECP256K1/0.1@proofofwork/unstable", "data/86991d9@proofofwork/unstable" + requires = "boost/1.76.0", "openssl/1.1.1k", "cryptopp/8.5.0", "nlohmann_json/3.10.0", "gmp/6.2.1", "SECP256K1/0.2@proofofwork/unstable", "data/86991d9@proofofwork/unstable" def set_version(self): if "CIRCLE_TAG" in environ: diff --git a/table.html b/table.html new file mode 100644 index 00000000..5799dee4 --- /dev/null +++ b/table.html @@ -0,0 +1,200 @@ + + + + + Conan | data/86991d9@proofofwork/unstable + + + + + +
+

data/86991d9@proofofwork/unstable

+
+

+ Depending on your package_id_mode, any combination of settings, options and requirements + can give you a different packageID. Take into account that your configuration might be + different from the one used to generate the packages. +

+
+ + + | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ remote + + package_id + + outdated + + os + + arch + + compiler + + build_type + + options + + requires +
compilerlibcxxversionfPICshared
proofofwork235fbfc1df2d8473a4701c5b6963470cd315afd5FalseLinuxx86_64gcclibstdc++1110ReleaseTrueFalseSECP256K1/0.2@proofofwork/unstable, autoconf/2.71, automake/1.16.3, boost/1.76.0, bzip2/1.0.8, cryptopp/8.5.0, gmp/6.2.1, libbacktrace/cci.20210118, libtool/2.4.6, nlohmann_json/3.10.0, openssl/1.1.1k, uriparser/0.9.6, zlib/1.2.12
remotepackage_idoutdatedosarchcompilercompiler.libcxxcompiler.versionbuild_typefPICsharedrequires
+ + + + + + +
+ +
+
+
+

+ Conan v1.47.0 JFrog LTD. https://conan.io +

+
+
+
+ \ No newline at end of file From b5cada80095aa25639e26d411007c0ccebcfd9ff Mon Sep 17 00:00:00 2001 From: Katrina Knight Date: Fri, 29 Jul 2022 07:50:54 -0400 Subject: [PATCH 5/5] Added production workflow --- .github/workflows/stable.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/stable.yml diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml new file mode 100644 index 00000000..778a3ff6 --- /dev/null +++ b/.github/workflows/stable.yml @@ -0,0 +1,57 @@ +name: Conan development +on: + push: + branches: + - production +env: + BUILD_TYPE: Release +jobs: + build: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - id: release + uses: rymndhng/release-on-push-action@master + with: + bump_version_scheme: patch + use_github_release_notes: true + - name: Check Output Parameters + run: | + echo "Got tag name ${{ steps.release.outputs.tag_name }}" + echo "Got release version ${{ steps.release.outputs.version }}" + - uses: actions/checkout@v2 + - name: Get Conan + uses: turtlebrowser/get-conan@v1.0 + - name: Create default profile + run: conan profile new default --detect + - name: Update profile 11 + run: conan profile update settings.compiler.libcxx=libstdc++11 default + - name: Update profile version + run: conan profile update settings.compiler.version=10 default + - name: setup conan + run: | + conan config set general.revisions_enabled=True + conan remote add proofofwork https://conan.pow.co/artifactory/api/conan/conan + conan user -p ${{ secrets.CONAN_USER_KEY }} -r proofofwork github + export CURRENT_VERSION="${{ steps.release.outputs.tag_name }}" + echo "Current version: ${CURRENT_VERSION}" + conan install . -r proofofwork + conan create . proofofwork/stable -r proofofwork + conan upload gigamonkey/${CURRENT_VERSION}@proofofwork/stable -r proofofwork --all + - name: prepare release package + run: | + mkdir build + cd build + conan install .. -r=proofofwork + cmake .. -DPACKAGE_TESTS=Off + cmake --build . + export CURRENT_VERSION="${{ steps.release.outputs.tag_name }}" + cp -r ../include ./ + tar -czvf "gigamonkey-${CURRENT_VERSION}-linux.tar.gz" lib include + - name: Upload release + uses: svenstaro/upload-release-action@v2 + with: + tag: ${{ steps.release.outputs.tag_name }} + file: build/gigamonkey-${{ steps.release.outputs.tag_name }}-linux.tar.gz + asset_name: gigamonkey-${{ steps.release.outputs.tag_name }}-linux.tar.gz