Skip to content

Commit

Permalink
ci: add arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosette committed Oct 4, 2024
1 parent f9fb0b6 commit 3fd1820
Show file tree
Hide file tree
Showing 32 changed files with 9,362 additions and 117 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/build_image.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build and Push Ubuntu-rust-gtk4
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docker"
schedule:
- cron: "15 8 1 */1 *"
# push:
# branches:
# - main
# paths:
# - "docker"
# schedule:
# - cron: "15 8 1 */1 *"

jobs:
build-and-push:
Expand Down
79 changes: 44 additions & 35 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,60 @@
name: Linux CI
on:
workflow_dispatch:
# push:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"
# pull_request:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"
push:
branches:
- "dev"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "*.md"
pull_request:
branches:
- "dev"
paths-ignore:
- "docs/**"
- "**/.gitignore"
- "**/.dockerignore"
- LICENSE
- "**/*.md"

jobs:
build-release:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch-name: x86_64-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: tsukimi

runs-on: ${{matrix.os}}
- platform: amd64
arch: x86_64
- platform: arm64
arch: aarch64

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Metadata
run: |
echo "user=${GITHUB_REPOSITORY_OWNER@L}" >> ${GITHUB_ENV}
- name: Build ${{matrix.target}}
- name: Build Rust project
run: |
mkdir artifact
docker build -t tsukimi .
docker run -d --name tsukimi tsukimi
docker cp tsukimi:/usr/src/tsukimi/. artifact/
docker run --rm --platform linux/${{matrix.platform}} -v ${{ github.workspace }}:/app ghcr.io/${{ env.user }}/ubuntu-rust-gtk4:latest
sudo cp target/release/tsukimi .
sudo cp target/debian/*.deb .
sudo cp -r i18n/locale .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.artifact}}-${{matrix.arch-name}}
path: artifact/*
compression-level: 0
overwrite: true
retention-days: 7
name: tsukimi-${{matrix.arch}}-linux
path: |
tsukimi
moe.*.xml
locale/
17 changes: 9 additions & 8 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: CI Passing
on:
push:
branches:
- "dev"
paths-ignore:
- "docs/**"
- "*.md"
- LICENSE
- .gitignore
workflow_dispatch:
# push:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - "*.md"
# - LICENSE
# - .gitignore

env:
CARGO_TERM_COLOR: always
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Windows GNU CI
on:
workflow_dispatch:
# push:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"
# pull_request:
# branches:
# - "dev"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"
push:
branches:
- "dev"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "**/*.md"
pull_request:
branches:
- "dev"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "**/*.md"

env:
CARGO_TERM_COLOR: always
Expand Down
4 changes: 0 additions & 4 deletions Cargo.lock

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

36 changes: 26 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tsukimi"
version = "0.14.0"
edition = "2021"
description = "A simple Emby Client with MPV written by GTK4-RS"
description = "A simple Emby Client with MPV written by GTK4-RS"
license = "GPL"


Expand All @@ -15,17 +15,19 @@ reqwest = { version = "0.12", features = ["json"] }
async-channel = "2.3.1"
once_cell = "1.20.1"
dirs = "5.0.1"
adw = { version = "0.7", package = "libadwaita", features = ["v1_6"] }
adw = { version = "0.7", package = "libadwaita", features = [
"v1_6",
] }
cargo-deb = "2.7.0"
bytefmt = "0.1.7"
libc = "0.2.159"
uuid = { version = "1.10.0", features = ["v4"] }
chrono = { version = "0.4.38", features = ["serde"] }
chrono = { version = "0.4.38", features = ["serde"] }
toml = "0.8.19"
tracing = "0.1.40"
gst = { version = "0.23", package = "gstreamer"}
gst = { version = "0.23", package = "gstreamer" }
url = "2.5.2"
libmpv2 = "=4.0.0"
libmpv2 = { path = "libmpv2-rs", version = "=4.0.0" }
image = "0.25.2"
gettext-rs = { version = "~0.7", features = ["gettext-system"] }
hostname = "0.4.0"
Expand All @@ -36,7 +38,12 @@ atomic-wait = "1.1.0"
flume = "0.11.0"
derive_builder = "0.20.1"
anyhow = "1.0.89"
windows = { version = "0.58.0", features = ["Win32_Foundation", "Win32_System_Power", "Win32_System_Registry", "Win32_UI_WindowsAndMessaging"] }
windows = { version = "0.58.0", features = [
"Win32_Foundation",
"Win32_System_Power",
"Win32_System_Registry",
"Win32_UI_WindowsAndMessaging",
] }
tracing-subscriber = "0.3.18"
gdk4-x11 = { version = "0.9.2", optional = true }
gdk4-win32 = { version = "0.9.0", optional = true }
Expand All @@ -52,7 +59,8 @@ console = [] # Enable console logging
default = ["protocols", "render"]
protocols = [] # Enable custom protocol callbacks
render = [] # Enable custom rendering
build_libmpv = [] # build libmpv automatically, provided MPV_SOURCE is set
build_libmpv = [
] # build libmpv automatically, provided MPV_SOURCE is set
x11 = ["gdk4-x11"]
win32 = ["gdk4-win32"]

Expand All @@ -65,16 +73,24 @@ gdk4-win32 = { version = "0.9.0" }
[package.metadata.deb]
maintainer = "Inaha <[email protected]>"
copyright = "2024, Inaha <[email protected]>"
license-file = ["LICENSE","4"]
license-file = ["LICENSE", "4"]
extended-description = """\
A simple Emby Client with MPV \
Written by GTK4-RS."""
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
["target/release/tsukimi", "usr/bin/", "755"],
["README.md", "usr/share/doc/tsukimi/README", "644"],
[
"target/release/tsukimi",
"usr/bin/",
"755",
],
[
"README.md",
"usr/share/doc/tsukimi/README",
"644",
],
]

[profile.release]
Expand Down
35 changes: 0 additions & 35 deletions Dockerfile

This file was deleted.

5 changes: 5 additions & 0 deletions libmpv2-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target
/examples/target
/mpv-sys/target
Cargo.lock
.vscode
11 changes: 11 additions & 0 deletions libmpv2-rs/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: rust
dist: bionic

before_install:
- sudo apt-get update
- sudo apt-get -y install mpv libmpv-dev libmpv1

script:
- RUST_BACKTRACE=1 cargo build --release
- RUST_BACKTRACE=1 cargo test
- RUST_BACKTRACE=1 cargo doc
27 changes: 27 additions & 0 deletions libmpv2-rs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Changelog

## Unreleased

## Version 3.0.0

- [breaking] Support libmpv version 2.0 (mpv version 0.35.0). Mpv versions <= 0.34.0 will no longer be supported.
- Add OpenGL rendering

## Version 2.0.1

- Fix `playlist_previous_*` commands using wrong mpv command ([issue](https://github.com/ParadoxSpiral/libmpv-rs/issues/17))
- Use local libmpv-sys as dependency except on crates.io

## Version 2.0.0

- Add method `Mpv::with_initializer` to set options before initialization
- [breaking] Borrow `&mut self` in `wait_event` to disallow using two events where the first points to data freed in the second `wait_event` call
- [breaking] `PropertyData<'_>` is no longer `Clone` or `PartialEq`, `Event<'_>` is no longer `Clone` to avoid cloning/comparing `MpvNode`

## Version 1.1.0

- Add an `MpvNode` that implements `GetData`, i.a. with `MpvNodeArrayIter` and `MpvNodeMapIter` variants that support e.g. properties `audio-parmas` and `playlist`

## Version 1.0.1

- Use debug formatting in impl of `Display` trait for `Error`
28 changes: 28 additions & 0 deletions libmpv2-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[workspace]
members = ["libmpv-sys"]

[package]
name = "libmpv2"
version = "4.0.0"
edition = "2021"
authors = ["kohsine <[email protected]>"]
license = "LGPL-2.1"
build = "build.rs"
readme = "README.md"
description = "Libmpv abstraction that's easy to use and can play next to all codecs and containers"
repository = "https://github.com/kohsine/libmpv-rs"
keywords = ["media", "playback", "mpv", "libmpv"]


[dependencies]
libmpv2-sys = { path = "libmpv-sys", version = "4.0.0" }

[dev-dependencies]
crossbeam = "0.7"
sdl2 = "0.36.0"

[features]
default = ["protocols", "render"]
protocols = [] # Enable custom protocol callbacks
render = [] # Enable custom rendering
build_libmpv = [] # build libmpv automatically, provided MPV_SOURCE is set
Loading

0 comments on commit 3fd1820

Please sign in to comment.