1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 11:23:13 +02:00

Migrate the Windows dependencies to Conan 2.

[skip alpine ci]
[skip ubuntu ci]
This commit is contained in:
Sadie Powell
2026-02-07 14:28:45 +00:00
parent bd72a444df
commit e7aa0cb583
7 changed files with 49 additions and 45 deletions
+16 -12
View File
@@ -14,8 +14,7 @@ jobs:
runs-on: windows-2025
env:
BUILD_TYPE: ${{ github.event_name == 'release' && 'Release' || 'Debug' }}
CONAN_USER_HOME: ${{ github.workspace }}/win/build
CONAN_USER_HOME_SHORT: None
CONAN_HOME: ${{ github.workspace }}\build\conan
steps:
- uses: actions/checkout@v6
@@ -28,32 +27,37 @@ jobs:
- name: Setup Conan
uses: turtlebrowser/get-conan@v1.2
with:
version: 1.66.0
- name: Create Conan profile
run: |-
conan profile detect
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('build_type=Release', 'build_type=${{ env.BUILD_TYPE }}') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
(Get-Content ${{ env.CONAN_HOME }}\profiles\default).replace('compiler.cppstd=14', 'compiler.cppstd=17') | Set-Content ${{ env.CONAN_HOME }}\profiles\default
Write-Output 'core.sources:download_urls=["origin", "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/"]' | Out-File -Append ${{ env.CONAN_HOME }}\global.conf
- name: Try to restore libraries from the cache
uses: actions/cache/restore@v5
id: library-cache
with:
key: conan-${{ hashFiles('src/win32/conanfile.txt') }}
path: ${{ env.CONAN_USER_HOME }}/.conan
key: conan-${{ env.BUILD_TYPE }}-${{ hashFiles('src\win32\conanfile.txt') }}
path: ${{ env.CONAN_HOME }}\p
- name: Install libraries
run: |
conan install ${{ github.workspace }}\src\win32 --build=missing
(Get-Content ${{ github.workspace }}\src\win32\conanfile.txt).replace('##', '') | Set-Content ${{ github.workspace }}\src\win32\conanfile.txt
conan install ${{ github.workspace }}\src\win32 --build missing --deployer runtime_deploy --deployer-folder ${{ github.workspace }}\build\extradll --output-folder .
- name: Save libraries to the cache
if: ${{ steps.library-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v5
with:
key: ${{ steps.library-cache.outputs.cache-primary-key }}
path: ${{ env.CONAN_USER_HOME }}/.conan
key: ${{ steps.library-cache.outputs.cache-primary-key }}
path: ${{ env.CONAN_HOME }}\p
- name: Run CMake
working-directory: ${{ github.workspace }}\build
run: |
mkdir ${{ github.workspace }}\build
cd ${{ github.workspace }}\build
cmake -A x64 -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" -G "Visual Studio 17 2022" ..
cmake -A x64 -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" -D CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -G "Visual Studio 17 2022" ..
- name: Build Anope
working-directory: ${{ github.workspace }}\build