diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fdfab0de..e7d1582fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Rust +name: Build on: [push, pull_request] @@ -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 diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 44a3ee52a..2b49b96f1 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -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 diff --git a/tools/viewsvg/viewsvg.pro b/tools/viewsvg/viewsvg.pro index 49edbf1ad..9803b8b37 100644 --- a/tools/viewsvg/viewsvg.pro +++ b/tools/viewsvg/viewsvg.pro @@ -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