Skip to content

Commit

Permalink
Merge pull request #37 from dice-group/develop
Browse files Browse the repository at this point in the history
v0.4.2
  • Loading branch information
bigerl authored Feb 28, 2023
2 parents 2c63869 + 06008be commit 5a2362d
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 56 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/code_testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: code_testing

on: [push]
on: [ push ]

concurrency:
group: publish-conan-branch-package-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_test:
Expand All @@ -15,7 +19,7 @@ jobs:
CXX: "g++-10"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# setup
- name: install needed packages
run: sudo apt-get -qq update && sudo apt-get -qq install -y git make cmake gcc-10 g++-10 clang-10 libstdc++-10-dev
Expand All @@ -36,14 +40,13 @@ jobs:
run: sudo apt-get update -qq && sudo apt-get -qq install -y python3-pip gcc-10
- name: setup conan
run: |
sudo pip3 install conan
sudo pip3 install "conan==1.59"
conan profile new --detect default
conan profile update settings.compiler.libcxx=libstdc++11 default
env:
CC: gcc-10
CXX: g++-10
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: build and test the package
run: conan create . --build missing
env:
Expand All @@ -55,7 +58,7 @@ jobs:
build_docker:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# build
- name: build image
run: docker build -t dockerimage .
Expand All @@ -76,7 +79,7 @@ jobs:
CXX: "g++-10"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# setup
- name: install needed packages
run: sudo apt-get -qq update && sudo apt-get -qq install -y git make cmake gcc-10 g++-10 clang-10 libstdc++-10-dev
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/conan_upload.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ name: documentation
on:
push:
branches:
- master
- main

concurrency:
group: publish-conan-branch-package-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
generate_doxygen_docu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# https://github.com/marketplace/actions/doxygen-action
- name: generate docu
uses: mattnotmitt/doxygen-action@v1
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/publish-conan-branch-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish Conan branch package

on: [ push ]

concurrency:
group: publish-conan-branch-package-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish-release:
uses: dice-group/cpp-conan-release-reusable-workflow/.github/workflows/publish-conan-branch-package.yml@main
with:
public_artifactory: false
os: ubuntu-22.04
compiler: clang-14
cmake-version: 3.22.6
conan-version: 1.59
secrets:
CONAN_USER: ${{ secrets.CONAN_USER }}
CONAN_PW: ${{ secrets.CONAN_PW }}
25 changes: 25 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Release

on:
workflow_run:
workflows: [ "Publish Conan branch package" ]
branches: [ main ]
types:
- completed


concurrency:
group: publish-release-${{ github.workflow }}-${{ github.ref }}

jobs:
publish-conan-branch-package:
uses: dice-group/cpp-conan-release-reusable-workflow/.github/workflows/publish-release.yml@main
with:
public_artifactory: false
os: ubuntu-22.04
compiler: clang-14
cmake-version: 3.22.6
conan-version: 1.59
secrets:
CONAN_USER: ${{ secrets.CONAN_USER }}
CONAN_PW: ${{ secrets.CONAN_PW }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)

project(
dice-hash
VERSION 0.4.1
VERSION 0.4.2
DESCRIPTION "dice-hash provides a framework to generate stable hashes. It provides state-of-the-art hash functions, supports STL containers out of the box and helps you to defines stable hashes for your own structs and classes."
HOMEPAGE_URL "https://dice-group.github.io/dice-hash/")

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ add
FetchContent_Declare(
dice-hash
GIT_REPOSITORY https://github.com/dice-group/dice-hash.git
GIT_TAG 0.4.0
GIT_TAG 0.4.2
GIT_SHALLOW TRUE)
FetchContent_MakeAvailable(dice-hash)
Expand All @@ -49,7 +49,7 @@ To use it with [conan](https://conan.io/) you need to add the repository:
conan remote add dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
```

To use it add `dice-hash/0.4.1` to the `[requires]` section of your conan file.
To use it add `dice-hash/0.4.2` to the `[requires]` section of your conan file.

## build and run tests

Expand Down Expand Up @@ -107,6 +107,7 @@ namespace dice::hash {
}
```
Now you can use `DiceHash` with your container.
__However__:
Your container __needs__ to have `begin`, `end` and `size` functions.
One simple example can be found [here](examples/customContainer.cpp).
Expand Down
5 changes: 0 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ def set_version(self):
cmake_file = load(self, os.path.join(self.recipe_folder, "CMakeLists.txt"))
self.description = re.search(r"project\([^)]*DESCRIPTION\s+\"([^\"]+)\"[^)]*\)", cmake_file).group(1)

def set_version(self):
if not hasattr(self, 'version') or self.version is None:
cmake_file = load(self, os.path.join(self.recipe_folder, "CMakeLists.txt"))
self.version = re.search(r"project\([^)]*VERSION\s+(\d+\.\d+.\d+)[^)]*\)", cmake_file).group(1)

def package_id(self):
self.info.header_only()

Expand Down
15 changes: 6 additions & 9 deletions test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import os
from conans import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain
from conan import ConanFile
from conan.tools.cmake import CMake
from conan.tools.layout import cmake_layout

required_conan_version = ">=1.43.0"
required_conan_version = ">=1.59"


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps"

def generate(self):
tc = CMakeToolchain(self)
tc.generate()
generators = "CMakeDeps", "CMakeToolchain"

def layout(self):
cmake_layout(self)
Expand All @@ -22,4 +19,4 @@ def build(self):
cmake.build()

def test(self):
self.run(os.path.join(self.cpp.build.bindirs[0], "example"), run_environment=True)
self.run(os.path.join(self.cpp.build.bindirs[0], "example"), run_environment=True)

0 comments on commit 5a2362d

Please sign in to comment.