Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.

Commit e23f58b

Browse files
committed
add conan to dev build workflow
1 parent 8118b32 commit e23f58b

3 files changed

Lines changed: 73 additions & 34 deletions

File tree

.github/workflows/build-develop.yml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Build Plugin Dev Release
22

3-
on:
4-
push:
5-
branches:
6-
- "develop"
3+
on: push
74

85
env:
96
DLL_NAME: vACDM.dll
@@ -16,48 +13,49 @@ jobs:
1613
formatting-check:
1714
uses: ./.github/workflows/clang-format.yml
1815

19-
build:
16+
get-latest-version:
2017
needs: formatting-check
18+
uses: ./.github/workflows/get-latest-version.yml
19+
20+
build:
21+
needs: get-latest-version
2122
runs-on: windows-latest
2223
name: "Build plugin"
2324

2425
steps:
25-
- uses: actions/checkout@v3
26-
27-
- name: Set up Python
28-
uses: actions/setup-python@v2
29-
with:
30-
python-version: "3.x"
26+
- name: Check out repository
27+
uses: actions/checkout@v3
3128

32-
- name: Install dependencies
33-
run: |
34-
python -m pip install --upgrade pip
35-
pip install PyGithub
29+
# - name: Install MSVC toolset
30+
# run: choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
3631

37-
- name: Run version handler
38-
env:
39-
REPOSITORY: ${{ github.repository }}
40-
REF: ${{ github.ref }}
41-
run: |
42-
python .github/workflows/version_handler.py
32+
# - name: Set up MSVC environment
33+
# shell: pwsh
34+
# run: |
35+
# Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
36+
# Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
4337

44-
- name: Determine DEV_RELEASE value
45-
id: find_latest_dev_release
46-
env:
47-
REPOSITORY: ${{ github.repository }}
48-
run: python .github/workflows/determine_dev_release.py
38+
- name: Install Conan
39+
id: conan
40+
uses: turtlebrowser/get-conan@main
4941

50-
- name: Install MSVC toolset
51-
run: choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
42+
- name: Cache Conan packages
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.conan2
46+
key: ${{ runner.os }}-conan-${{ hashFiles('**/conanfile*') }}-build_type-${{ env.BUILD_CONFIGURATION }}
47+
restore-keys: |
48+
${{ runner.os }}-conan-${{ hashFiles('**/conanfile*') }}-
49+
${{ runner.os }}-conan-
5250
53-
- name: Set up MSVC environment
54-
shell: pwsh
51+
- name: Install Conan packages
5552
run: |
56-
Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
57-
Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
53+
conan profile detect
54+
conan install . --profile=conanprofile --settings=build_type=${{ env.BUILD_CONFIGURATION }} --output-folder=build --build=missing
5855
59-
- name: Configure CMake
60-
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} -A Win32 -DDEV_BUILD=ON -DDEV_RELEASE_NUMBER="${{ env.DEV_RELEASE }}"
56+
- name: CMake Setup
57+
run: cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -A Win32
58+
working-directory: ${{ github.workspace }}/build
6159

6260
- name: Build DLL
6361
run: cmake --build build --config ${{env.BUILD_CONFIGURATION}}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Latest Version Check
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
get-version:
8+
runs-on: windows-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: "3.x"
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install PyGithub
21+
22+
- name: Run version handler
23+
env:
24+
REPOSITORY: ${{ github.repository }}
25+
REF: ${{ github.ref }}
26+
run: |
27+
python .github/workflows/version_handler.py
28+
29+
- name: Determine DEV_RELEASE value
30+
id: find_latest_dev_release
31+
env:
32+
REPOSITORY: ${{ github.repository }}
33+
run: python .github/workflows/determine_dev_release.py

conanprofile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[settings]
2+
arch=x86
3+
build_type=Release
4+
compiler=msvc
5+
compiler.cppstd=20
6+
compiler.runtime=dynamic
7+
compiler.version=194
8+
os=Windows

0 commit comments

Comments
 (0)