Skip to content

Commit db5c882

Browse files
committed
add conan cache, add headers to dll zip
1 parent 7e7b5cd commit db5c882

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ jobs:
8080
with:
8181
arch: x64
8282

83+
- name: Cache Conan
84+
uses: actions/cache@v3
85+
with:
86+
path: |
87+
~/.conan/p
88+
8389
- name: Install Conan
8490
id: conan
8591
uses: turtlebrowser/get-conan@main
@@ -98,7 +104,11 @@ jobs:
98104

99105
- name: Create archive
100106
working-directory: ./build
101-
run: Compress-Archive -Path Release/* -DestinationPath bncsutil_${{ github.ref_name }}_amd64_dll.zip
107+
run: |
108+
New-Item -ItemType Directory -Path include/bncsutil -Force | Out-Null
109+
Copy-Item -Path '../src/bncsutil/*.h' -Destination include/bncsutil
110+
Compress-Archive -Path Release/* -DestinationPath bncsutil_${{ github.ref_name }}_amd64_dll.zip
111+
Compress-Archive -Path include -DestinationPath "bncsutil_${{ github.ref_name }}_amd64_dll.zip" -Update
102112
103113
- uses: actions/upload-artifact@v4
104114
with:
@@ -122,12 +132,18 @@ jobs:
122132
id: conan
123133
uses: turtlebrowser/get-conan@main
124134

135+
- name: Cache Conan
136+
uses: actions/cache@v3
137+
with:
138+
path: |
139+
~/.conan/p
140+
125141
- name: Init conan
126142
run: conan profile detect
127143

128144
- name: Install dependencies
129145
shell: cmd
130-
run: conan install . -of build -s build_type=Release -s arch=x86 -o *:shared=False --build=missing
146+
run: conan install . -of build -s build_type=Release -s:h arch=x86 -o *:shared=False --build=missing
131147

132148
- name: Build
133149
shell: cmd
@@ -136,7 +152,11 @@ jobs:
136152

137153
- name: Create archive
138154
working-directory: ./build
139-
run: Compress-Archive -Path Release/* -DestinationPath bncsutil_${{ github.ref_name }}_x86_dll.zip
155+
run: |
156+
New-Item -ItemType Directory -Path include/bncsutil -Force | Out-Null
157+
Copy-Item -Path '../src/bncsutil/*.h' -Destination include/bncsutil
158+
Compress-Archive -Path Release/* -DestinationPath bncsutil_${{ github.ref_name }}_x86_dll.zip
159+
Compress-Archive -Path include -DestinationPath "bncsutil_${{ github.ref_name }}_x86_dll.zip" -Update
140160
141161
- uses: actions/upload-artifact@v4
142162
with:

0 commit comments

Comments
 (0)