-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (73 loc) · 2.44 KB
/
ci.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on: push
permissions:
contents: write
jobs:
build-proj:
name: Build Installer
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
vcpkg/installed/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run vckpg install proj
uses: lukka/run-vcpkg@v4
with:
vcpkgArguments: "proj:x64-windows"
vcpkgDirectory: "${{ github.workspace }}/vcpkg"
vcpkgGitCommitId: "000d1bda1ffa95a73e0b40334fa4103d6f4d3d48"
- name: Choco install pkgconfiglite
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install pkgconfiglite --allowemptychecksum
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Test pkgconfiglite and build
shell: bash
run: |
export PKG_CONFIG_PATH="$VCPKG_ROOT/installed/x64-windows/lib/pkgconfig"
pkg-config --libs --cflags proj
cargo build --release
# next: package
- name: Install Wix
uses: actions/checkout@v2
with:
repository: fbarresi/wix
path: wix
- name: install cargo-wix
shell: bash
run: |
cargo install cargo-wix --force
- name: build MSI
shell: bash
run: |
export PKG_CONFIG_PATH="$VCPKG_ROOT/installed/x64-windows/lib/pkgconfig"
export PATH=$PATH:$(pwd)/wix/tools/
cp -Lvr vcpkg/installed/x64-windows/bin/* target/release
cargo wix --package=ui --nocapture --name=dce_builder
# gather up artifacts..
- uses: actions/upload-artifact@v3
with:
name: installer
path: target/wix/dce_builder*.msi
- name: release build
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
export PKG_CONFIG_PATH="$VCPKG_ROOT/installed/x64-windows/lib/pkgconfig"
export PATH=$PATH:$(pwd)/wix/tools/
cargo wix --package=ui --nocapture --name=dce_builder --install-version=${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/wix/dce_builder-${{ github.ref_name }}-x86_64.msi