-
-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·45 lines (35 loc) · 1.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CMake Build
on: [push]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Protoc
uses: arduino/setup-protoc@v3
# maybe this helps with build times
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
workspaces: "src/rust"
- name: vcpkg
uses: johnwason/vcpkg-action@v6
with:
pkgs: libqrencode
triplet: x86-windows-static
token: ${{ github.token }}
# NOTE: Ninja does not support specifying an architecture, so I am going with the default which seems to be MSBuild
# NOTE: CMAKE_GENERATOR_PLATFORM must take WIN32, not x86 because consistency (thanks to https://stackoverflow.com/questions/28350214/#comment121308920_52846043 and https://github.com/microsoft/vcpkg/issues/15465)
- name: Configure
run: cmake -DCMAKE_GENERATOR_PLATFORM=WIN32 -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DVCPKG_MANIFEST_MODE=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build
- name: Build
run: cmake --build build --config Release
- name: Strip
run: strip -s build/Release/libpresage.dll
- name: Upload
uses: actions/upload-artifact@v4
with:
path: build/Release/libpresage.dll
name: libpresage.dll