Upgrade from Conan 1.x to 2.x (#4417)

Conan 1.x is no longer supported - upgrade if you used it for dependency management

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-04-02 12:48:22 +02:00
committed by GitHub
parent b209c50b01
commit 281bddb4cf
5 changed files with 79 additions and 35 deletions
+20 -14
View File
@@ -108,19 +108,19 @@ jobs:
version: ${{ matrix.qt-version }}
# WINDOWS
- name: Cache conan packages part 1
- name: Setup conan variables (Windows)
if: startsWith(matrix.os, 'windows')
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ matrix.crashpad }}-conan-user-${{ hashFiles('**/conanfile.txt') }}
path: ~/.conan/
run: |
"C2_USE_OPENSSL3=$(if ($Env:C2_BUILD_WITH_QT6 -eq "on") { "True" } else { "False" })" >> "$Env:GITHUB_ENV"
"C2_CONAN_CACHE_SUFFIX=$(if ($Env:C2_BUILD_WITH_QT6 -eq "on") { "-QT6" } else { "`" })" >> "$Env:GITHUB_ENV"
shell: powershell
- name: Cache conan packages part 2
- name: Cache conan packages
if: startsWith(matrix.os, 'windows')
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ matrix.crashpad }}-conan-root-${{ hashFiles('**/conanfile.txt') }}
path: C:/.conan/
key: ${{ runner.os }}-conan-user-${{ hashFiles('**/conanfile.py') }}${{ env.C2_CONAN_CACHE_SUFFIX }}
path: ~/.conan2/
- name: Add Conan to path
if: startsWith(matrix.os, 'windows')
@@ -129,7 +129,7 @@ jobs:
- name: Install dependencies (Windows)
if: startsWith(matrix.os, 'windows')
run: |
choco install conan -y --version 1.58.0
choco install conan -y
- name: Enable Developer Command Prompt
if: startsWith(matrix.os, 'windows')
@@ -138,15 +138,21 @@ jobs:
- name: Setup Conan (Windows)
if: startsWith(matrix.os, 'windows')
run: |
conan profile new --detect --force default
conan profile update conf.tools.cmake.cmaketoolchain:generator="NMake Makefiles" default
conan --version
conan profile detect -f
shell: powershell
- name: Build (Windows)
if: startsWith(matrix.os, 'windows')
run: |
mkdir build
cd build
conan install .. -s build_type=RelWithDebInfo -b missing -pr:b=default
conan install .. `
-s build_type=RelWithDebInfo `
-c tools.cmake.cmaketoolchain:generator="NMake Makefiles" `
-b missing `
--output-folder=. `
-o with_openssl3="$Env:C2_USE_OPENSSL3"
cmake `
-G"NMake Makefiles" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
@@ -192,9 +198,9 @@ jobs:
name: chatterino-windows-x86-64-${{ matrix.qt-version }}-symbols.pdb.7z
path: build/bin/chatterino.pdb.7z
- name: Clean Conan pkgs
- name: Clean Conan cache
if: startsWith(matrix.os, 'windows')
run: conan remove "*" -fsb
run: conan cache clean --source --build --download "*"
shell: bash
# LINUX