Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
liss-h authored Jun 3, 2024
2 parents 1dfcd33 + 90fdbfd commit d3ba6e2
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 69 deletions.
11 changes: 11 additions & 0 deletions .github/actions/add_conan_provider/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'get conan dependency provider'
description: "installs conan_provider.cmake"
runs:
using: "composite"
steps:
- name: Get dependency provider
shell: bash
run: |
sudo apt-get install -y wget
wget https://github.com/conan-io/cmake-conan/raw/develop2/conan_provider.cmake -O conan_provider.cmake
31 changes: 31 additions & 0 deletions .github/actions/configure_conan/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Configure Conan'
description: "installs conan via pip and creates a default user for it"
inputs:
conan-version:
description: "conan version to install"
default: 2.3.1
required: true
runs:
using: "composite"
steps:
- name: Install conan
shell: bash
run: |
pip3 install "conan==${{ inputs.conan-version }}"
- name: configure conan
shell: bash
run: |
# conan profile update is deprecated (https://github.com/conan-io/conan/issues/13205)
# and they don't want you to use detect because it is unstable
conan profile detect # Force creation of conan directory structure, will be overwritten
echo '{% set compiler, version = detect_api.detect_compiler() %}' > ~/.conan2/profiles/default
echo '[settings]' >> ~/.conan2/profiles/default
echo 'os={{ detect_api.detect_os() }}' >> ~/.conan2/profiles/default
echo 'arch={{ detect_api.detect_arch() }}' >> ~/.conan2/profiles/default
echo 'build_type=Release' >> ~/.conan2/profiles/default
echo 'compiler={{ compiler }}' >> ~/.conan2/profiles/default
echo 'compiler.version={{ detect_api.default_compiler_version(compiler, version) }}' >> ~/.conan2/profiles/default
echo 'compiler.libcxx=libstdc++11' >> ~/.conan2/profiles/default
21 changes: 21 additions & 0 deletions .github/actions/setup_apt/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'setup apt repositories'
description: "sets up package apt repositories for clang/gcc"
runs:
using: "composite"
steps:
- name: Add repos
shell: bash
run: |
# gcc-13
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
# clang-16
source /etc/os-release
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-16 main" | sudo tee /etc/apt/sources.list.d/llvm-16.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm-16.gpg > /dev/null
# clang-17
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-17 main" | sudo tee /etc/apt/sources.list.d/llvm-17.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm-17.gpg > /dev/null
sudo apt-get update -y
43 changes: 8 additions & 35 deletions .github/workflows/publish-conan-branch-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ on:
default: clang-17
cmake-version:
type: string
default: 3.21.7
default: 3.24.0
conan-version:
type: string
default: 2.0.13
default: 2.3.0
conan-options:
type: string
secrets:
Expand All @@ -39,19 +39,7 @@ jobs:
sudo apt-get install -y jq python3 python3-pip
- name: Add repos for for gcc-13 and clang-16,17
run: |
# gcc-13
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# clang-16
source /etc/os-release
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-16 main" | sudo tee /etc/apt/sources.list.d/llvm-16.list
# clang-17
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-17 main" | sudo tee /etc/apt/sources.list.d/llvm-17.list
# llvm key
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm.gpg > /dev/null
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/setup_apt

- name: Ensure stdlib version
run: |
Expand All @@ -72,27 +60,12 @@ jobs:
uses: rui314/setup-mold@v1

- name: Install conan
shell: bash
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/configure_conan
with:
conan-version: ${{ inputs.conan-version }}

- name: add conan user
run: |
pip3 install "conan==${{ inputs.conan-version }}"
# conan profile update is deprecated (https://github.com/conan-io/conan/issues/13205)
# and they don't want you to use detect because it is unstable
conan profile detect # Force creation of conan directory structure, will be overwritten
echo '{% set compiler, version = detect_api.detect_compiler() %}' > ~/.conan2/profiles/default
echo '[settings]' >> ~/.conan2/profiles/default
echo 'os={{ detect_api.detect_os() }}' >> ~/.conan2/profiles/default
echo 'arch={{ detect_api.detect_arch() }}' >> ~/.conan2/profiles/default
echo 'build_type=Release' >> ~/.conan2/profiles/default
echo 'compiler={{ compiler }}' >> ~/.conan2/profiles/default
echo 'compiler.version={{ detect_api.default_compiler_version(compiler, version) }}' >> ~/.conan2/profiles/default
echo 'compiler.libcxx=libstdc++11' >> ~/.conan2/profiles/default
conan remote add dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
conan remote login -p "${{ secrets.CONAN_PW }}" dice-group "${{ secrets.CONAN_USER }}"
Expand Down
42 changes: 8 additions & 34 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ on:
default: clang-17
cmake-version:
type: string
default: 3.21.7
default: 3.24.0
conan-version:
type: string
default: 1.60.1
default: 2.3.0
conan-options:
type: string
use-tag: # if true an existing tag/release is update; otherwise the job fails. If true the job will also fail if the tag doesn't match the version reported via conan.
Expand Down Expand Up @@ -49,19 +49,7 @@ jobs:
sudo apt-get install -y jq python3 python3-pip
- name: Add repos for for gcc-13 and clang-16,17
run: |
# gcc-13
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# clang-16
source /etc/os-release
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-16 main" | sudo tee /etc/apt/sources.list.d/llvm-16.list
# clang-17
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-17 main" | sudo tee /etc/apt/sources.list.d/llvm-17.list
# llvm key
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm.gpg > /dev/null
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/setup_apt

- name: Ensure stdlib version
run: |
Expand All @@ -82,26 +70,12 @@ jobs:
uses: rui314/setup-mold@v1

- name: Install conan
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/configure_conan
with:
conan-version: ${{ inputs.conan-version }}

- name: add conan user
run: |
pip3 install "conan==${{ inputs.conan-version }}"
# conan profile update is deprecated (https://github.com/conan-io/conan/issues/13205)
# and they don't want you to use detect because it is unstable
conan profile detect # Force creation of conan directory structure, will be overwritten
echo '{% set compiler, version = detect_api.detect_compiler() %}' > ~/.conan2/profiles/default
echo '[settings]' >> ~/.conan2/profiles/default
echo 'os={{ detect_api.detect_os() }}' >> ~/.conan2/profiles/default
echo 'arch={{ detect_api.detect_arch() }}' >> ~/.conan2/profiles/default
echo 'build_type=Release' >> ~/.conan2/profiles/default
echo 'compiler={{ compiler }}' >> ~/.conan2/profiles/default
echo 'compiler.version={{ detect_api.default_compiler_version(compiler, version) }}' >> ~/.conan2/profiles/default
echo 'compiler.libcxx=libstdc++11' >> ~/.conan2/profiles/default
conan remote add dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
conan remote login -p "${{ secrets.CONAN_PW }}" dice-group "${{ secrets.CONAN_USER }}"
Expand Down

0 comments on commit d3ba6e2

Please sign in to comment.