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

Commit b390358

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

3 files changed

Lines changed: 109 additions & 71 deletions

File tree

Lines changed: 68 additions & 71 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,81 +13,81 @@ 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+
- name: Check out repository
27+
uses: actions/checkout@v3
2628

27-
- name: Set up Python
28-
uses: actions/setup-python@v2
29-
with:
30-
python-version: "3.x"
29+
# - name: Install MSVC toolset
30+
# run: choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
3131

32-
- name: Install dependencies
33-
run: |
34-
python -m pip install --upgrade pip
35-
pip install PyGithub
36-
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"
58-
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 }}"
61-
62-
- name: Build DLL
63-
run: cmake --build build --config ${{env.BUILD_CONFIGURATION}}
64-
65-
- name: Create GitHub Release
66-
id: create_release
67-
uses: actions/create-release@v1
68-
with:
69-
tag_name: v${{ env.VERSION }}
70-
release_name: v${{ env.VERSION }}
71-
draft: true # to allow amendment of release notes
72-
prerelease: true
73-
env:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
76-
- name: Upload release asset
77-
id: upload-release-asset
78-
uses: actions/upload-release-asset@v1
79-
with:
80-
upload_url: ${{ steps.create_release.outputs.upload_url }}
81-
asset_path: build/${{env.BUILD_CONFIGURATION}}/${{env.DLL_NAME}}
82-
asset_name: ${{env.DLL_NAME}}
83-
asset_content_type: application/octet-stream
84-
env:
85-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86-
87-
- name: Upload config file (vacdm.txt)
88-
id: upload-release-asset-txt
89-
uses: actions/upload-release-asset@v1
90-
with:
91-
upload_url: ${{ steps.create_release.outputs.upload_url }}
92-
asset_path: src/config/vacdm.txt
93-
asset_name: vacdm.txt
94-
asset_content_type: text/plain
95-
env:
96-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
conan profile detect
54+
conan install . --profile=conanprofile --settings=build_type=${{ env.BUILD_CONFIGURATION }} --output-folder=build --build=missing
55+
56+
# - name: CMake Setup
57+
# run: cd build && cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -A Win32
58+
59+
# - name: Build DLL
60+
# run: cmake --build build --config ${{env.BUILD_CONFIGURATION}}
61+
62+
# - name: Create GitHub Release
63+
# id: create_release
64+
# uses: actions/create-release@v1
65+
# with:
66+
# tag_name: v${{ env.VERSION }}
67+
# release_name: v${{ env.VERSION }}
68+
# draft: true # to allow amendment of release notes
69+
# prerelease: true
70+
# env:
71+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
# - name: Upload release asset
74+
# id: upload-release-asset
75+
# uses: actions/upload-release-asset@v1
76+
# with:
77+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
78+
# asset_path: build/${{env.BUILD_CONFIGURATION}}/${{env.DLL_NAME}}
79+
# asset_name: ${{env.DLL_NAME}}
80+
# asset_content_type: application/octet-stream
81+
# env:
82+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
84+
# - name: Upload config file (vacdm.txt)
85+
# id: upload-release-asset-txt
86+
# uses: actions/upload-release-asset@v1
87+
# with:
88+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
89+
# asset_path: src/config/vacdm.txt
90+
# asset_name: vacdm.txt
91+
# asset_content_type: text/plain
92+
# env:
93+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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)