66 - main
77 workflow_dispatch :
88
9+ permissions :
10+ packages : write
11+
912jobs :
1013 clang-format-check :
1114 runs-on : ubuntu-latest
@@ -27,25 +30,18 @@ jobs:
2730
2831 build-linux :
2932 runs-on : ubuntu-latest
33+ env :
34+ USERNAME : asfernandes
35+ VCPKG_EXE : ${{ github.workspace }}/vcpkg/vcpkg
36+ FEED_URL : https://nuget.pkg.github.com/asfernandes/index.json
37+ VCPKG_BINARY_SOURCES : " clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
3038 steps :
3139 - name : Checkout repository
3240 uses : actions/checkout@v4
3341 with :
3442 submodules : recursive
3543 fetch-depth : 0
3644
37- - name : Cache vcpkg artifacts
38- uses : actions/cache@v4
39- with :
40- path : |
41- vcpkg/downloads
42- vcpkg/buildtrees
43- vcpkg/packages
44- build/Release/vcpkg_installed
45- key : ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
46- restore-keys : |
47- ${{ runner.os }}-vcpkg-
48-
4945 - name : Install system dependencies
5046 run : |
5147 sudo apt-get update
5955 graphviz \
6056 ninja-build \
6157 libtommath1 \
62- libtomcrypt1
58+ libtomcrypt1 \
59+ mono-complete
6360
6461 - name : Install Firebird
6562 run : |
7976 run : |
8077 ./vcpkg/bootstrap-vcpkg.sh -disableMetrics
8178
79+ - name : Configure vcpkg binary caching
80+ if : github.repository == 'asfernandes/fb-cpp'
81+ run : |
82+ mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
83+ sources add \
84+ -Source "${{ env.FEED_URL }}" \
85+ -StorePasswordInClearText \
86+ -Name GitHubPackages \
87+ -UserName "${{ env.USERNAME }}" \
88+ -Password "${{ secrets.GITHUB_TOKEN }}"
89+ mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
90+ setapikey "${{ secrets.GITHUB_TOKEN }}" \
91+ -Source "${{ env.FEED_URL }}"
92+
8293 - name : Configure CMake
8394 run : |
8495 cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
@@ -106,25 +117,18 @@ jobs:
106117
107118 build-windows :
108119 runs-on : windows-latest
120+ env :
121+ USERNAME : asfernandes
122+ VCPKG_EXE : ${{ github.workspace }}/vcpkg/vcpkg
123+ FEED_URL : https://nuget.pkg.github.com/asfernandes/index.json
124+ VCPKG_BINARY_SOURCES : " clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
109125 steps :
110126 - name : Checkout repository
111127 uses : actions/checkout@v4
112128 with :
113129 submodules : recursive
114130 fetch-depth : 0
115131
116- - name : Cache vcpkg artifacts
117- uses : actions/cache@v4
118- with :
119- path : |
120- vcpkg/downloads
121- vcpkg/buildtrees
122- vcpkg/packages
123- build/vcpkg_installed
124- key : ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
125- restore-keys : |
126- ${{ runner.os }}-vcpkg-
127-
128132 - name : Install Firebird
129133 shell : cmd
130134 run : |
@@ -150,6 +154,21 @@ jobs:
150154 run : |
151155 vcpkg\bootstrap-vcpkg.bat -disableMetrics
152156
157+ - name : Configure vcpkg binary caching
158+ if : github.repository == 'asfernandes/fb-cpp'
159+ shell : pwsh
160+ run : |
161+ .$(${{ env.VCPKG_EXE }} fetch nuget) `
162+ sources add `
163+ -Source "${{ env.FEED_URL }}" `
164+ -StorePasswordInClearText `
165+ -Name GitHubPackages `
166+ -UserName "${{ env.USERNAME }}" `
167+ -Password "${{ secrets.GITHUB_TOKEN }}"
168+ .$(${{ env.VCPKG_EXE }} fetch nuget) `
169+ setapikey "${{ secrets.GITHUB_TOKEN }}" `
170+ -Source "${{ env.FEED_URL }}"
171+
153172 - name : Configure CMake
154173 shell : cmd
155174 run : |
@@ -178,32 +197,26 @@ jobs:
178197
179198 build-macos :
180199 runs-on : macos-latest
200+ env :
201+ USERNAME : asfernandes
202+ VCPKG_EXE : ${{ github.workspace }}/vcpkg/vcpkg
203+ FEED_URL : https://nuget.pkg.github.com/asfernandes/index.json
204+ VCPKG_BINARY_SOURCES : " clear;nuget,https://nuget.pkg.github.com/asfernandes/index.json,readwrite"
181205 steps :
182206 - name : Checkout repository
183207 uses : actions/checkout@v4
184208 with :
185209 submodules : recursive
186210 fetch-depth : 0
187211
188- - name : Cache vcpkg artifacts
189- uses : actions/cache@v4
190- with :
191- path : |
192- vcpkg/downloads
193- vcpkg/buildtrees
194- vcpkg/packages
195- build/Release/vcpkg_installed
196- key : ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
197- restore-keys : |
198- ${{ runner.os }}-vcpkg-
199-
200212 - name : Install system dependencies
201213 run : |
202214 brew install \
203215 autoconf \
204216 autoconf-archive \
205217 automake \
206- libtool
218+ libtool \
219+ mono
207220
208221 - name : Install Firebird
209222 run : |
@@ -222,6 +235,20 @@ jobs:
222235 run : |
223236 ./vcpkg/bootstrap-vcpkg.sh -disableMetrics
224237
238+ - name : Configure vcpkg binary caching
239+ if : github.repository == 'asfernandes/fb-cpp'
240+ run : |
241+ mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
242+ sources add \
243+ -Source "${{ env.FEED_URL }}" \
244+ -StorePasswordInClearText \
245+ -Name GitHubPackages \
246+ -UserName "${{ env.USERNAME }}" \
247+ -Password "${{ secrets.GITHUB_TOKEN }}"
248+ mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
249+ setapikey "${{ secrets.GITHUB_TOKEN }}" \
250+ -Source "${{ env.FEED_URL }}"
251+
225252 - name : Configure CMake
226253 run : |
227254 cp CMakeUserPresets.json.posix.template CMakeUserPresets.json
0 commit comments