Skip to content

Commit

Permalink
Check Windows build on CI and fix viewsvg compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Dec 30, 2021
1 parent cfa5408 commit c00d663
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: Build

on: [push, pull_request]

Expand Down Expand Up @@ -46,3 +46,37 @@ jobs:

- name: Build
run: cargo build --features dump-svg

# We have some Windows specific code that we should check on each commit.
windows:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v2

# Toolchain is stable-x86_64-pc-windows-msvc by default. No need to change it.

- name: Build thumbnailer
working-directory: tools/explorer-thumbnailer
env:
RUSTFLAGS: -Ctarget-feature=+crt-static # make sure it's static
run: cargo build

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.2'

# Unlike other binaries, viewsvg isn't built with crt-static
- name: Build C API
working-directory: c-api
run: cargo build --release

- name: Prepare Developer Command Prompt for MSVC
uses: ilammy/msvc-dev-cmd@v1

- name: Build viewsvg
working-directory: tools/viewsvg
run: |
qmake
nmake
2 changes: 1 addition & 1 deletion .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
with:
version: '5.15.2'

# Unlike other binaries, viewsvg isn't build with crt-static
# Unlike other binaries, viewsvg isn't built with crt-static
- name: Build C API
working-directory: c-api
run: cargo build --release
Expand Down
2 changes: 1 addition & 1 deletion tools/viewsvg/viewsvg.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FORMS += \
CONFIG(release, debug|release): LIBS += -L$$PWD/../../target/release/ -lresvg
else:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../target/debug/ -lresvg

windows:LIBS += -lWs2_32 -lAdvapi32 -lUserenv
windows:LIBS += -lWs2_32 -lAdvapi32 -lBcrypt -lUserenv

INCLUDEPATH += $$PWD/../../c-api
DEPENDPATH += $$PWD/../../c-api

0 comments on commit c00d663

Please sign in to comment.