forked from tsukinaha/tsukimi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: feature/win - Windows MSVC CI | ||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - 'feature/win' | ||
# schedule: | ||
# - cron: '5 6 * * *' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
|
||
jobs: | ||
build-release: | ||
env: | ||
RUST_BACKTRACE: full | ||
strategy: | ||
matrix: | ||
include: | ||
- arch-name: x86_64-windows-msvc | ||
os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
artifact: tsukimi.exe | ||
ext: .exe | ||
|
||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
rustup default stable-msvc | ||
py -3.12 -m pip install --user pipx | ||
py -3.12 -m pipx ensurepath | ||
pipx install gvsbuild | ||
$env:Path = "C:\gtk-build\gtk\x64\release\lib\pkgconfig;C:\gtk-build\gtk\x64\release\bin;C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw64\lib;C:\msys64\mingw64\include;" + $env:Path | ||
$env:LIB = "C:\gtk-build\gtk\x64\release\lib;C:\msys64\mingw64\lib;" + $env:LIB | ||
$env:INCLUDE = "C:\gtk-build\gtk\x64\release\include;C:\gtk-build\gtk\x64\release\include\cairo;C:\gtk-build\gtk\x64\release\include\glib-2.0;C:\gtk-build\gtk\x64\release\include\gobject-introspection-1.0;C:\gtk-build\gtk\x64\release\lib\glib-2.0\include;C:\msys64\mingw64\include;" + $env:INCLUDE | ||
$env:PKG_CONFIG_PATH = "C:\gtk-build\gtk\x64\release\lib\pkgconfig;" + $env:PKG_CONFIG_PATH | ||
gvsbuild build gtk4 libadwaita adwaita-icon-theme | ||
- name: Install latest libmpv-dev | ||
run: | | ||
mkdir mpv_dev && cd mpv_dev | ||
. ../scripts/get_latest_mpv.ps1 | ||
Get-Latest-Mpv | ||
mv -force libmpv.dll.a c:/msys64/mingw64/lib | ||
mv -force libmpv-2.dll c:/gtk-build/gtk/x64/release/bin/ | ||
mv -force include/mpv/*.h c:/msys64/mingw64/include/mpv/ | ||
cd .. | ||
- name: Build ${{matrix.target}} | ||
run: | | ||
$env:Path = "C:\gtk-build\gtk\x64\release\lib\pkgconfig;C:\gtk-build\gtk\x64\release\bin;C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw64\lib;C:\msys64\mingw64\include;" + $env:Path | ||
$env:LIB = "C:\gtk-build\gtk\x64\release\lib;C:\msys64\mingw64\lib;" + $env:LIB | ||
$env:INCLUDE = "C:\gtk-build\gtk\x64\release\include;C:\gtk-build\gtk\x64\release\include\cairo;C:\gtk-build\gtk\x64\release\include\glib-2.0;C:\gtk-build\gtk\x64\release\include\gobject-introspection-1.0;C:\gtk-build\gtk\x64\release\lib\glib-2.0\include;C:\msys64\mingw64\include;" + $env:INCLUDE | ||
$env:PKG_CONFIG_PATH = "C:\gtk-build\gtk\x64\release\lib\pkgconfig;" + $env:PKG_CONFIG_PATH | ||
cargo build --release --locked | ||
mkdir C:/artifacts | ||
cp target/release/${{matrix.artifact}} C:/artifacts/ | ||
cd C:/gtk-build/gtk/x64/release/bin | ||
cp *.dll C:/artifacts/ | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tsukimi-${{matrix.arch-name}} | ||
path: C:/artifacts/* | ||
compression-level: 5 | ||
retention-days: 3 |