Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/load_conan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ runs:
uses: actions/cache/restore@v4
with:
path: |
~/.conan/data
~/.conan2/p
key: ${{ inputs.key_prefix }}-${{ hashFiles(steps.hash-key-primary.outputs.key, steps.hash-key-3rd.outputs.keys) }}
fail-on-cache-miss: ${{ inputs.fail_on_cache_miss }}

- name: Restore Testing Cache
uses: actions/cache/restore@v4
with:
path: |
~/.conan/data
~/.conan2/p
key: ${{ inputs.key_prefix }}-${{ hashFiles(steps.hash-key-primary.outputs.key, steps.hash-key-3rd.outputs.keys) }}
restore-keys: ${{ inputs.key_prefix }}-
if: ${{ steps.restore-cache.outputs.cache-hit != 'true' && (( github.event_name == 'pull_request' && inputs.testing == 'True' ) || ( inputs.load_any == 'True' )) }}
Expand Down
7 changes: 3 additions & 4 deletions .github/actions/setup_conan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ runs:
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install conan~=1.0
python -m pip install conan
python -m pip install gcovr
conan user
conan profile new --detect default
conan profile default

- name: Fixup libstdc++
shell: bash
run: |
# Set std::string to non-CoW C++11 version
sed -i 's,compiler.libcxx=libstdc++$,compiler.libcxx=libstdc++11,g' ~/.conan/profiles/default
sed -i 's,compiler.libcxx=libstdc++$,compiler.libcxx=libstdc++11,g' ~/.conan2/profiles/default
if: ${{ inputs.platform == 'ubuntu-22.04' }}

39 changes: 22 additions & 17 deletions .github/actions/store_conan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,38 @@ inputs:
key_prefix:
description: 'Cache prefix'
required: true
default: 'ForkDeps'
default: 'Deps'
runs:
using: "composite"
steps:
- name: Setup Conan and Export Recipes
shell: bash
run: |
if [ -d 3rd_party ]; then
dep_pkgs=$(ls -1d 3rd_party/* 2>/dev/null | cut -d'/' -f2 | paste -sd'|' - -)
fi
if [ -z "${dep_pkgs}" ]; then
dep_pkgs="no_3rd_party"
fi
dirty_pkgs=$(ls -1d ~/.conan/data/*/*/*/*/build 2>/dev/null | sed 's,.*data/,,')
if [ -z "${dirty_pkgs}" ]; then
dirty_pkgs="no_public/0"
fi
dirty_pkgs_d=$(echo "${dirty_pkgs}" | cut -d'/' -f1 | paste -sd'|' - -)
echo "::info:: Caching: ${dirty_pkgs_d}|${dep_pkgs}"
ls -1d ~/.conan/data/* | grep -Ev "(${dirty_pkgs_d}|${dep_pkgs})" | xargs rm -rf
rm -rf ~/.conan/data/*/*/*/*/build
rm -rf ~/.conan/data/*/*/*/*/source
rm -rf ~/.conan2/p/*/b
echo "Caching following packages"
find ~/.conan2/p -type d -maxdepth 4

#if [ -d 3rd_party ]; then
# dep_pkgs=$(ls -1d 3rd_party/* 2>/dev/null | cut -d'/' -f2 | paste -sd'|' - -)
#fi
#if [ -z "${dep_pkgs}" ]; then
# dep_pkgs="no_3rd_party"
#fi
#dirty_pkgs=$(ls -1d ~/.conan2/p/*/b/ 2>/dev/null | sed 's,.*p/,,')
#if [ -z "${dirty_pkgs}" ]; then
# dirty_pkgs="no_public/0"
#fi
#dirty_pkgs=$(ls -1d ~/.conan2/p/*/b 2>/dev/null | sed 's,.*p/,,')
#dirty_pkgs_d=$(echo "${dirty_pkgs}" | cut -d'/' -f1 | paste -sd'|' - -)
#echo "::info:: Caching: ${dirty_pkgs_d}|${dep_pkgs}"
#ls -1d ~/.conan/data/* | grep -Ev "(${dirty_pkgs_d}|${dep_pkgs})" | xargs rm -rf
#rm -rf ~/.conan/data/*/*/*/*/build
#rm -rf ~/.conan/data/*/*/*/*/source

- name: Save Cache
uses: actions/cache/save@v4
with:
path: |
~/.conan/data
~/.conan2/p
key: ${{ inputs.key_prefix }}-${{ hashFiles('conanfile.py', '3rd_party/**/conanfile.py') }}

Loading