3232 releaseName : releases/v${{ steps.which_version.outputs.version }}
3333 doNotFailIfNotFound : ' true'
3434
35- - name : Cancelling - release already exists
36- 37- if : steps.release_exists.outputs.id != ''
35+ # - name: Cancelling - release already exists
36+ # uses: andymckay/[email protected] 37+ # if: steps.release_exists.outputs.id != ''
38+
39+ build_windows :
40+ if : github.repository_owner == 'viamrobotics'
41+ needs : [prepare]
42+ runs-on : windows-latest
43+ strategy :
44+ fail-fast : false
45+ matrix :
46+ include :
47+ - target : x86_64-windows
48+ platform : windows_x86_64
49+ steps :
50+ - name : Checkout Code
51+ uses : actions/checkout@v4
52+ with :
53+ ref : ${{ needs.prepare.outputs.sha }}
54+
55+ - name : Install Boost
56+ uses : MarkusJx/install-boost@v2
57+ id : install-boost
58+ with :
59+ boost_version : 1.86.0
60+
61+ - name : Install cmake
62+ uses : ssrobins/install-cmake@v1
63+ with :
64+ version : 3.31.2
65+
66+ - name : Install dependencies
67+ uses : crazy-max/ghaction-chocolatey@v3
68+ with :
69+ args : install grpc protobuf xtensor pkg-config ninja buf
70+
71+ - name : Setup build directory
72+ run : mkdir builds
73+
74+ - name : Build
75+ run : |
76+ # `buf` tries to read a CLI config file that we don't actually use located at
77+ # ~/.config/buf/config.yaml. We don't always have permission to access this
78+ # directory in CI, so we set the `BUF_CONFIG_DIR` to some other value that we
79+ # do have permissions for. See https://github.com/bufbuild/buf/issues/2698 for
80+ # more details.
81+ export BUF_CONFIG_DIR=$(mktemp -d)
82+ mkdir build
83+ cmake -S . -B build -G Ninja
84+ cmake --build build --target all install -- -v
85+
86+ - name : Copy
87+ run : |
88+ cmake --install build --prefix builds/viam-cpp-sdk-${{ matrix.platform }}
89+
90+ - name : Create tar
91+ run : |
92+ tar -czvf builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz builds/viam-cpp-sdk-${{ matrix.platform }}
93+
94+ - name : Upload artifacts
95+ uses : actions/upload-artifact@v4
96+ with :
97+ name : viam-cpp-sdk-${{ matrix.platform }}.tar.gz
98+ path : builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz
3899
39100 build_macos :
40101 if : github.repository_owner == 'viamrobotics'
@@ -269,7 +330,7 @@ jobs:
269330 path : builds/viam-cpp-sdk-${{ matrix.platform }}.tar.gz
270331
271332 release :
272- needs : [prepare, build_macos, build_linux_debian, build_linux_ubuntu_jammy]
333+ needs : [prepare, build_macos, build_linux_debian, build_linux_ubuntu_jammy, build_windows ]
273334 if : github.repository_owner == 'viamrobotics'
274335 runs-on : ubuntu-latest
275336
@@ -285,4 +346,4 @@ jobs:
285346 prerelease : false
286347 fail_on_unmatched_files : true
287348 env :
288- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
349+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKENFAKE }}
0 commit comments