Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

ci: add wip build script

Lars Berger4dea9a9725be
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 475b4285..2354f5b8 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -7,28 +7,52 @@ on:
jobs:
build:
- runs-on: windows-latest
strategy:
+ fail-fast: false
matrix:
- runtime: [win-x64, win-x86]
+ include:
+ # 64-bit Windows (Intel & AMD)
+ - rust-target: x86_64-pc-windows-msvc
+ wix-target: win-x64
+
+ # 64-bit Windows (ARM)
+ - rust-target: aarch64-pc-windows-msvc
+ wix-target: win-arm64
+
+ runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-dotnet@v3
+ - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
with:
- dotnet-version: 7.x
+ toolchain: nightly
+ targets: ${{ matrix.rust-target }}
+
+ - uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
+ with:
+ shared-key: ${{ matrix.rust-target }}-${{ hashFiles('Cargo.lock') }}
+
+ - name: Build with windows subsystem
+ run: |
+ cargo build --locked --release --target ${{ matrix.rust-target }} --features windows_subsystem
+ mv target/${{ matrix.rust-target }}/release/wm.exe tmp/wm-noconsole.exe
+
+ - name: Build with console subsystem
+ run: |
+ cargo build --locked --release --target ${{ matrix.rust-target }}
+ mv target/${{ matrix.rust-target }}/release/wm.exe tmp/wm-console.exe
+
+ - name: Install WiX
+ run: dotnet tool install --global wix --version 5.0.0
- - run: >
- dotnet publish GlazeWM.App/GlazeWM.App.csproj
- --configuration Release
- --runtime ${{ matrix.runtime }}
- --output GlazeWM.App/publish/
- --self-contained
- -p:PublishSingleFile=true
- -p:IncludeAllContentForSelfExtract=true
+ - name: Create MSI installer
+ run: |
+ wix extension add WixToolset.UI.wixext/5 WixToolset.Util.wixext/5
+ wix build -arch ${{ matrix.wix-target }} -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \
+ -out "./installer.msi" "./resources/main.wxs"
- uses: actions/upload-artifact@v4
with:
- name: glazewm-${{ matrix.runtime }}-${{ github.sha }}
- path: GlazeWM.App/publish/GlazeWM.exe
+ name: bundle-${{ matrix.rust-target }}
if-no-files-found: error
+ path: tmp