mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-11-04 10:13:59 +00:00
fix(build): add headless mode for Linux and update CI to prepare dependencies
This commit is contained in:
parent
eb972c8633
commit
8d4ea82a7e
100
.github/workflows/spotube-release-binary.yml
vendored
100
.github/workflows/spotube-release-binary.yml
vendored
@ -45,6 +45,11 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.release_type }}-${{ inputs.platform }}
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.release_type }}-${{ inputs.platform }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSE_WEBVIEW_REPO: KRTirtho/ComposeNativeWebview
|
||||||
|
# fix/linux-wayland-input
|
||||||
|
COMPOSE_WEBVIEW_COMMIT: b11ac748de1219f9432338c067a2c5dafef3072a
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-inputs:
|
validate-inputs:
|
||||||
name: Validate Inputs
|
name: Validate Inputs
|
||||||
@ -56,15 +61,61 @@ jobs:
|
|||||||
echo "::error::Building a single platform is only supported for nightly releases"
|
echo "::error::Building a single platform is only supported for nightly releases"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
prepare-deps:
|
||||||
|
name: Prepare Dependencies
|
||||||
|
needs: validate-inputs
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout ComposeNativeWebview
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
repository: ${{ env.COMPOSE_WEBVIEW_REPO }}
|
||||||
|
ref: ${{ env.COMPOSE_WEBVIEW_COMMIT }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
path: compose-webview
|
||||||
|
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v6
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 21
|
||||||
|
|
||||||
|
- name: Set up Android SDK
|
||||||
|
uses: android-actions/setup-android@v4
|
||||||
|
|
||||||
|
- name: Set up Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Set up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
|
- name: Publish compose-webview to mavenLocal
|
||||||
|
working-directory: compose-webview
|
||||||
|
run: |
|
||||||
|
chmod +x gradlew
|
||||||
|
./gradlew publishToMavenLocal
|
||||||
|
|
||||||
|
- name: Upload maven local
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
name: Android
|
name: Android
|
||||||
needs: validate-inputs
|
needs: [validate-inputs, prepare-deps]
|
||||||
if: ${{ inputs.platform == 'all' || inputs.platform == 'android' }}
|
if: ${{ inputs.platform == 'all' || inputs.platform == 'android' }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
@ -127,7 +178,7 @@ jobs:
|
|||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
name: Linux Desktop
|
name: Linux Desktop
|
||||||
needs: validate-inputs
|
needs: [validate-inputs, prepare-deps]
|
||||||
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux-x86_64' }}
|
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux-x86_64' }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -142,6 +193,12 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y rpm fuse build-essential zlib1g-dev patchelf zstd
|
sudo apt-get install -y rpm fuse build-essential zlib1g-dev patchelf zstd
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
@ -235,7 +292,7 @@ jobs:
|
|||||||
|
|
||||||
build-linux-arm64:
|
build-linux-arm64:
|
||||||
name: Linux Desktop (aarch64)
|
name: Linux Desktop (aarch64)
|
||||||
needs: validate-inputs
|
needs: [validate-inputs, prepare-deps]
|
||||||
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux-aarch64' }}
|
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux-aarch64' }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
@ -257,6 +314,12 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y rpm fuse build-essential zlib1g-dev patchelf zstd
|
sudo apt-get install -y rpm fuse build-essential zlib1g-dev patchelf zstd
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
@ -350,13 +413,19 @@ jobs:
|
|||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Windows Desktop
|
name: Windows Desktop
|
||||||
needs: validate-inputs
|
needs: [validate-inputs, prepare-deps]
|
||||||
if: ${{ inputs.platform == 'all' || inputs.platform == 'windows' }}
|
if: ${{ inputs.platform == 'all' || inputs.platform == 'windows' }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
@ -408,13 +477,19 @@ jobs:
|
|||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
name: macOS Desktop
|
name: macOS Desktop
|
||||||
needs: validate-inputs
|
needs: [validate-inputs, prepare-deps]
|
||||||
if: ${{ inputs.platform == 'all' || inputs.platform == 'macos' }}
|
if: ${{ inputs.platform == 'all' || inputs.platform == 'macos' }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
@ -471,13 +546,19 @@ jobs:
|
|||||||
|
|
||||||
build-ios:
|
build-ios:
|
||||||
name: iOS
|
name: iOS
|
||||||
needs: validate-inputs
|
needs: [validate-inputs, prepare-deps]
|
||||||
if: ${{ inputs.platform == 'all' || inputs.platform == 'ios' }}
|
if: ${{ inputs.platform == 'all' || inputs.platform == 'ios' }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
@ -539,6 +620,7 @@ jobs:
|
|||||||
if: ${{ !inputs.dry_run && !cancelled() && !contains(needs.*.result, 'failure') }}
|
if: ${{ !inputs.dry_run && !cancelled() && !contains(needs.*.result, 'failure') }}
|
||||||
needs:
|
needs:
|
||||||
- validate-inputs
|
- validate-inputs
|
||||||
|
- prepare-deps
|
||||||
- build-android
|
- build-android
|
||||||
- build-linux
|
- build-linux
|
||||||
- build-linux-arm64
|
- build-linux-arm64
|
||||||
@ -551,6 +633,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Download maven local
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: maven-local
|
||||||
|
path: ~/.m2/repository/
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Set up JDK 21
|
||||||
uses: actions/setup-java@v6
|
uses: actions/setup-java@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
@ -646,6 +646,12 @@ tasks.withType<ComposeHotRun>().configureEach {
|
|||||||
jvmArgs(
|
jvmArgs(
|
||||||
"--enable-native-access=ALL-UNNAMED"
|
"--enable-native-access=ALL-UNNAMED"
|
||||||
)
|
)
|
||||||
|
// Linux: the hot-reload agent starts AWT before main(), and JBR's X11 toolkit pins GTK to
|
||||||
|
// XWayland, where the embedded WebKit WebView renders black. Tao owns the windows, so the
|
||||||
|
// reloadable JVM stays headless (DevTools runs in its own JVM and is unaffected).
|
||||||
|
if (System.getProperty("os.name").lowercase().contains("linux")) {
|
||||||
|
jvmArgs("-Djava.awt.headless=true")
|
||||||
|
}
|
||||||
systemProperty(
|
systemProperty(
|
||||||
"compose.application.resources.dir",
|
"compose.application.resources.dir",
|
||||||
project.layout.buildDirectory.dir("compose/tmp/prepareAppResources").get()
|
project.layout.buildDirectory.dir("compose/tmp/prepareAppResources").get()
|
||||||
|
|||||||
@ -50,7 +50,7 @@ ziplineVersion = "1.28.0"
|
|||||||
ktor = "3.5.1"
|
ktor = "3.5.1"
|
||||||
dnssdkt = "1.1.0"
|
dnssdkt = "1.1.0"
|
||||||
filekit = "0.14.2"
|
filekit = "0.14.2"
|
||||||
compose-webview = "1.0.3"
|
compose-webview = "0.1.0-SNAPSHOT"
|
||||||
composeNativeTray = "2.1.6"
|
composeNativeTray = "2.1.6"
|
||||||
koin = "4.2.2"
|
koin = "4.2.2"
|
||||||
multiplatform-nav3-ui = "1.1.1"
|
multiplatform-nav3-ui = "1.1.1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user