Skip to content

Commit d8c8cb4

Browse files
committed
Update ubuntu ci to use conan 2.x
1 parent f425e10 commit d8c8cb4

File tree

1 file changed

+22
-33
lines changed

1 file changed

+22
-33
lines changed

.github/workflows/ubuntu.yml

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,25 @@ jobs:
2828
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
2929
- name: Install build dependencies
3030
run: |
31-
sudo pip install -U conan==1.66.0
31+
sudo pip install -U conan
3232
sudo apt-get install -yq --no-install-recommends ninja-build
3333
- name: Setup Conan Profile
3434
env:
3535
CC: ${{ matrix.compiler[0] }}
3636
CXX: ${{ matrix.compiler[1] }}
3737
run: |
3838
# build profile
39-
conan profile new release --detect
40-
conan profile update settings.build_type=Release release
41-
#Note no backwards compatibility for gcc5 needed, setting libcxx to c++11.
42-
conan profile update settings.compiler.libcxx=libstdc++11 release
43-
conan profile show release
44-
echo "[tool_requires]" >> `conan config home`/profiles/release
45-
echo "cmake/3.26.4" >> `conan config home`/profiles/release
39+
conan profile detect -f --name release
40+
sed -i 's/compiler.cppstd=gnu14/compiler.cppstd=gnu17/g' `conan profile path release`
41+
echo "[tool_requires]" >> `conan profile path release`
42+
echo "cmake/3.26.4" >> `conan profile path release`
43+
4644
# host profile
47-
conan profile new default --detect
48-
conan profile update settings.build_type=${{ matrix.type }} default
49-
#Note no backwards compatibility for gcc5 needed, setting libcxx to c++11.
50-
conan profile update settings.compiler.libcxx=libstdc++11 default
51-
conan profile show default
52-
echo "[tool_requires]" >> `conan config home`/profiles/default
53-
echo "cmake/3.26.4" >> `conan config home`/profiles/default
45+
conan profile detect -f
46+
sed -i 's/build_type=Release/build_type=${{ matrix.type }}/g' `conan profile path default`
47+
sed -i 's/compiler.cppstd=gnu14/compiler.cppstd=gnu17/g' `conan profile path default`
48+
echo "[tool_requires]" >> `conan profile path default`
49+
echo "cmake/3.26.4" >> `conan profile path default`
5450
- name: Conan Cache
5551
id: cache-conan
5652
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf #v4.2.2
@@ -71,29 +67,22 @@ jobs:
7167
key: ${{ runner.os }}-test-ccache-${{ matrix.compiler[0] }}-${{ matrix.type }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
7268
restore-keys: |
7369
${{ runner.os }}-test-ccache-${{ matrix.compiler[0] }}-${{ matrix.type }}-
74-
- name: Configure and install dependencies
70+
- name: Install Dependencies and Build
7571
env:
7672
CC: ${{ matrix.compiler[0] }}
7773
CXX: ${{ matrix.compiler[1] }}
7874
CONAN_BUILD_OPTIONS: |
79-
-o celix:enable_testing=True
80-
-o celix:enable_benchmarking=True
81-
-o celix:enable_address_sanitizer=True
82-
-o celix:enable_undefined_sanitizer=True
83-
-o celix:build_all=True
84-
-o celix:enable_cmake_warning_tests=True
85-
-o celix:enable_testing_on_ci=True
86-
-o celix:framework_curlinit=False
87-
-o celix:enable_ccache=True
75+
-o celix/*:enable_testing=True
76+
-o celix/*:enable_benchmarking=True
77+
-o celix/*:enable_address_sanitizer=True
78+
-o celix/*:enable_undefined_sanitizer=True
79+
-o celix/*:build_all=True
80+
-o celix/*:enable_cmake_warning_tests=True
81+
-o celix/*:enable_testing_on_ci=True
82+
-o celix/*:framework_curlinit=False
83+
-o celix/*:enable_ccache=True
8884
run: |
89-
conan install . celix/ci -c tools.cmake.cmaketoolchain:generator=Ninja -pr:b release -pr:h default -if build ${CONAN_BUILD_OPTIONS} -b missing
90-
- name: Build
91-
env:
92-
CC: ${{ matrix.compiler[0] }}
93-
CXX: ${{ matrix.compiler[1] }}
94-
CONAN_CMAKE_GENERATOR: Ninja
95-
run: |
96-
conan build . -bf build
85+
conan build . -c tools.cmake.cmaketoolchain:generator=Ninja -pr:b release -pr:h default -of build ${CONAN_BUILD_OPTIONS} -b missing
9786
- name: Test
9887
run: |
9988
cd build

0 commit comments

Comments
 (0)