diff --git a/.github/workflows/conan.yml b/.github/workflows/conan.yml new file mode 100644 index 00000000..2a37aaf5 --- /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.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 + conan create . proofofwork/unstable -r proofofwork + conan upload gigamonkey/${CURRENT_VERSION}@proofofwork/unstable -r proofofwork --all 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 diff --git a/conanfile.py b/conanfile.py index fbb7f59c..7c740c96 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.2@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): diff --git a/table.html b/table.html new file mode 100644 index 00000000..5799dee4 --- /dev/null +++ b/table.html @@ -0,0 +1,200 @@ + + + +
++ 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 + | +|||
---|---|---|---|---|---|---|---|---|---|---|---|
compiler | +libcxx | +version | +fPIC | +shared | +|||||||
proofofwork | +235fbfc1df2d8473a4701c5b6963470cd315afd5 | +False | +Linux | +x86_64 | +gcc | +libstdc++11 | +10 | +Release | +True | +False | +SECP256K1/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 | +
remote | +package_id | +outdated | +os | +arch | +compiler | +compiler.libcxx | +compiler.version | +build_type | +fPIC | +shared | +requires | +