Skip to content

Commit 1cacc5a

Browse files
committed
add msvc build
1 parent bbe59b4 commit 1cacc5a

2 files changed

Lines changed: 32 additions & 27 deletions

File tree

‎.github/workflows/backend.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,38 @@ on:
1616
workflow_call:
1717

1818
jobs:
19+
msvc:
20+
runs-on: windows-latest
21+
env:
22+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
23+
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg.exe
24+
VCPKG_TRIPLET: x64-windows-static
25+
TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Checkout vcpkg
29+
uses: actions/checkout@v4
30+
with:
31+
repository: microsoft/vcpkg
32+
path: vcpkg
33+
- name: Bootstrap vcpkg
34+
shell: pwsh
35+
run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
36+
- name: Install dependencies
37+
shell: pwsh
38+
run: |
39+
$env:VCPKG_ROOT = "${{ env.VCPKG_ROOT }}"
40+
${{ env.VCPKG_EXE }} install --triplet ${{ env.VCPKG_TRIPLET }} libwebsockets libuv json-c zlib openssl getopt-win32
41+
- name: Build with MSVC
42+
shell: pwsh
43+
run: |
44+
$env:VCPKG_ROOT = "${{ env.VCPKG_ROOT }}"
45+
cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{ env.TOOLCHAIN_FILE }}" -DVCPKG_TARGET_TRIPLET=${{ env.VCPKG_TRIPLET }}
46+
cmake --build build --config Release
47+
- uses: actions/upload-artifact@v4
48+
with:
49+
name: ttyd.msvc
50+
path: build/Release/ttyd.exe
1951
cross:
2052
runs-on: ubuntu-24.04
2153
strategy:

‎scripts/mingw-build.sh‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)