Skip to content

Commit

Permalink
Build Windows installer using cargo-wix.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinling committed Jul 3, 2024
1 parent f08089f commit 818bf04
Show file tree
Hide file tree
Showing 2 changed files with 406 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['macos-latest', 'ubuntu-22.04', 'windows-latest']
rust: ['stable', '1.57']
os: ['windows-latest']
rust: ['stable']

runs-on: ${{ matrix.os }}

Expand All @@ -67,6 +67,12 @@ jobs:
run: brew install gtk4 pkg-config
if: matrix.os == 'macos-latest'

- name: Install cargo-wix (Windows)
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: cargo-wix
if: matrix.os == 'windows-latest'

- name: Install dependencies (Windows)
uses: lukka/run-vcpkg@v11
with:
Expand All @@ -75,6 +81,9 @@ jobs:
doNotCache: false
if: matrix.os == 'windows-latest'

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Set PKG_CONFIG (Windows)
run: echo "PKG_CONFIG=$env:VCPKG_INSTALLED_DIR/x64-windows/tools/pkgconf/pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
if: matrix.os == 'windows-latest'
Expand All @@ -98,6 +107,10 @@ jobs:
with:
run: cargo test

- name: Build installer (Windows)
run: cargo wix --no-build --nocapture -v
if: matrix.os == 'windows-latest'

- uses: actions/upload-artifact@v2
with:
name: Packetry ${{ matrix.os }}
Expand Down
Loading

0 comments on commit 818bf04

Please sign in to comment.