@@ -56,42 +56,22 @@ jobs:
56
56
run : |
57
57
version=`python -c "from setuptools_scm import get_version; print(get_version())"`
58
58
echo "QSSC_VERSION=$version" >> $GITHUB_ENV
59
+ - name : Prepare Conan
60
+ run : |
61
+ conan profile new default --detect || true
62
+ conan profile update settings.compiler.libcxx=libstdc++11 default
63
+ # Add QASM, LLVM, and clang tools recipes to Conan cache.
64
+ ./conan_deps.sh
65
+ conan lock create conanfile.py -pr:h default -pr:b default --build=outdated
59
66
- name : Load Conan cache
60
67
id : cache
61
68
uses : actions/cache/restore@v3
62
69
with :
63
70
path : .conan
64
71
key : conan-${{ runner.os }}
65
- restore-keys : conan-${{ runner.os }}
66
- - name : Create Conan default profile
67
- run : |
68
- conan profile new default --detect || true
69
- conan profile update settings.compiler.libcxx=libstdc++11 default
70
- - name : Add QASM, LLVM, and clang tools recipes to Conan cache.
71
- run : ./conan_deps.sh
72
+ restore-keys : conan-${{ runner.os }}-${{ hashFiles('conan.lock') }}
72
73
- name : Create build dir
73
74
run : mkdir build
74
- # Check if all conan packages are within the cache. If not
75
- # we will need to build packages (and if on main flush the cache)
76
- - name : Check Conan dependencies are cached
77
- id : check_conan_cache
78
- working-directory : build
79
- run : |
80
- export CONAN_LLVM_GIT_CACHE="${{ runner.temp }}/llvm-project"
81
- conan info .. -pr:h default -pr:b default --build=outdated --json build_requires.json
82
- build_requires=$(cat build_requires.json)
83
- if [[ "$build_requires" == *"[]"* ]];
84
- then
85
- all_in_cache=true
86
- else
87
- all_in_cache=false
88
- fi
89
- echo "all_in_cache=$all_in_cache" >> $GITHUB_OUTPUT
90
- echo "Conan build requires: $build_requires"
91
- echo "Conan cache is complete: $all_in_cache"
92
- # If we have a cache miss on 'main', clear the cache.
93
- # A dependency was updated, so we need to drop the old one
94
- # to prevent unbounded cache growth over time.
95
75
- name : Conan install
96
76
id : conan_install
97
77
working-directory : build
0 commit comments