Skip to content

Commit

Permalink
style tweaks
Browse files Browse the repository at this point in the history
add envs
add tab hotkey
other fix
  • Loading branch information
Kosette committed Nov 24, 2024
1 parent f88591b commit a4b43a9
Show file tree
Hide file tree
Showing 12 changed files with 232 additions and 118 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
name: Linux CI
on:
workflow_dispatch:
push:
branches:
- "main"
paths-ignore:
- "docs/**"
- "**/.gitignore"
- "**/.dockerignore"
- LICENSE
- "**/*.md"
pull_request:
branches:
- "main"
paths-ignore:
- "docs/**"
- "**/.gitignore"
- "**/.dockerignore"
- LICENSE
- "**/*.md"
# push:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"
# pull_request:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"

jobs:
build:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: CI Passing
on:
push:
tags:
- v*
workflow_dispatch:
# push:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - "*.md"
# - LICENSE
# - .gitignore

env:
CARGO_TERM_COLOR: always
Expand All @@ -23,7 +29,7 @@ jobs:
os: ubuntu-latest
target: arm64
# x86_64-windows-gnu
- arch: x86_64-windows-gnu
- arch: ucrt-x86_64-windows-gnu
os: windows-latest
target: amd64

Expand Down Expand Up @@ -200,7 +206,7 @@ jobs:
- name: Get latest tag name
id: tag
run: echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
run: echo "TAG_NAME=v$(date '+%Y-%m-%d-%H%M%S')" >> $GITHUB_OUTPUT

- name: Set prerelease variable
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-alpha')
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ on:
workflow_dispatch:
push:
branches:
- "main"
- "dev"
paths-ignore:
- "docs/**"
- "**/.gitignore"
- "**/.dockerignore"
- ".gitignore"
- LICENSE
- "**/*.md"
pull_request:
branches:
- "main"
paths-ignore:
- "docs/**"
- "**/.gitignore"
- "**/.dockerignore"
- LICENSE
- "**/*.md"
- "*.md"
# pull_request:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"

env:
CARGO_TERM_COLOR: always
Expand All @@ -38,7 +36,6 @@ jobs:
# env: x86_64
- arch: ucrt64-x86_64-windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu
msystem: ucrt64
env: ucrt-x86_64

Expand Down Expand Up @@ -75,15 +72,18 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
shell: pwsh
run: |
$json = curl -s "https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/latest" | ConvertFrom-Json
$asset = $json.assets | Where-Object { $_.name -match "mpv-dev-x86_64-\d{8}-git" } | Select-Object -First 1
curl -L -o $asset.name $asset.browser_download_url
7z x -y $asset.name -olibmpv
cp -force libmpv/libmpv.dll.a c:/msys64/${{ matrix.msystem }}/lib/
cp -force libmpv/libmpv-2.dll c:/msys64/${{ matrix.msystem }}/bin/
cp -force -recurse libmpv/include/mpv c:/msys64/${{ matrix.msystem }}/include/
- name: Build tsukimi-${{ matrix.target }}
$api_gh = "https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/latest"
$json = Invoke-WebRequest $api_gh -MaximumRedirection 0 -ErrorAction Ignore -UseBasicParsing | ConvertFrom-Json
$filename = $json.assets | where { $_.name -Match "mpv-dev-x86_64-v3" } | Select-Object -ExpandProperty name
$download_link = $json.assets | where { $_.name -Match "mpv-dev-x86_64-v3" } | Select-Object -ExpandProperty browser_download_url
Write-Host "Downloading" $filename -ForegroundColor Green
Invoke-WebRequest -Uri $download_link -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::FireFox) -OutFile $filename
7z.exe x $filename -olibmpv
cp -force libmpv/libmpv.dll.a c:/msys64/${{ matrix.msystem }}/lib
cp -force libmpv/libmpv-2.dll c:/msys64/${{ matrix.msystem }}/bin
cp -force -recurse libmpv/include/mpv c:/msys64/${{ matrix.msystem }}/include
- name: Build tsukimi-${{ matrix.arch }}
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
shell: msys2 {0}
run: |
Expand Down Expand Up @@ -162,10 +162,10 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: tsukimi-${{matrix.target}}
name: tsukimi-${{matrix.arch}}
path: |
artifact/*.exe
artifact/*.7z
artifact/*.exe
artifact/*.sha512sum
compression-level: 0
retention-days: 3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/i18n
/.idea
/backup
/.cargo
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "libmpv2-rs"]
path = libmpv2-rs
url = https://github.com/tsukimi-rs/libmpv2-rs.git
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a4b43a9

Please sign in to comment.