chore: reduce thread worker number #2
Workflow file for this run
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
name: feature/win - Windows weekly build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v*-win | |
schedule: | |
- cron: '14 10 * * 0' | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
RUST_BACKTRACE: full | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- arch: x86_64-windows-gnu | |
os: windows-latest | |
target: x86_64-pc-windows-gnu | |
artifact: tsukimi.exe | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
rustup toolchain install stable-gnu | |
rustup default stable-gnu | |
C:\msys64\usr\bin\pacman.exe -S --needed --noconfirm mingw-w64-x86_64-gtk4 mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gcc mingw-w64-x86_64-libadwaita mingw-w64-x86_64-mpv | |
C:\msys64\usr\bin\pacman.exe -Syu --noconfirm | |
- 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:/msys64/mingw64/bin | |
mv -force include/mpv/*.h c:/msys64/mingw64/include/mpv/ | |
cd .. | |
- name: Build ${{ matrix.target }} | |
run: | | |
$env:Path = "C:\msys64\mingw64\bin;C:\msys64\mingw64\lib;C:\msys64\mingw64\include;" + $env:Path; | |
cargo build --release --locked | |
mkdir artifact && cd artifact | |
mkdir tsukimi-windows-gnu-amd64/ && cd tsukimi-windows-gnu-amd64/ && mkdir bin/ && mkdir share/ && mkdir lib/ | |
cp ../../target/release/${{ matrix.artifact }} bin/ | |
cp C:/msys64/mingw64/bin/*.dll bin/ | |
cp -recurse C:/msys64/mingw64/lib/gdk-pixbuf-2.0 lib/ | |
remove-item lib/gdk-pixbuf-2.0/2.10.0/loaders/* -exclude "*svg.dll" | |
cp -recurse C:/msys64/mingw64/share/glib-2.0 share/ | |
get-childitem -recurse -path share/glib-2.0/* -exclude "*gschemas.compiled*"|remove-item -recurse | |
mv ../../moe.tsuna.tsukimi.gschema.xml share/glib-2.0/schemas/ | |
C:/msys64/mingw64/bin/glib-compile-schemas.exe share/glib-2.0/schemas/ | |
remove-item share/glib-2.0/schemas/*.xml | |
cp -recurse C:/msys64/mingw64/share/icons share/ | |
cp ../../resources/ui/icons/tsukimi.png share/icons/ | |
remove-item -recurse share/icons/hicolor && remove-item -recurse share/icons/Adwaita/scalable && remove-item -recurse share/icons/Adwaita/cursors | |
remove-item -recurse share/icons/Adwaita/16x16 && remove-item -recurse share/icons/Adwaita/symbolic-up-to-32 | |
gci -directory -recurse .|where-object {$_.getfilesysteminfos().count -eq 0}|remove-item -recurse | |
7z.exe a ../tsukimi-${{matrix.arch}}.7z ./* | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tsukimi-${{matrix.arch}} | |
path: | | |
artifact/*.7z | |
compression-level: 0 | |
retention-days: 7 | |
# publish: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# permissions: | |
# contents: write | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Download artifacts | |
# uses: actions/download-artifact@v4 | |
# - name: Package Windows GNU | |
# run: | | |
# mv tsukimi-x86_64-windows-gnu/*.7z . | |
# - name: Calculate hash | |
# run: | | |
# sha512sum *.7z > tsukimi.sha512sum | |
# - name: Set date as tag | |
# run: echo "TAG_NAME=windows-weekly-$(date --rfc-3339='date')" >> $GITHUB_ENV | |
# - name: Upload Github Assets | |
# uses: softprops/action-gh-release@v2 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# files: | | |
# *.7z | |
# *.sha512sum | |
# tag_name: ${{ env.TAG_NAME }} |