Skip to content

Commit

Permalink
release v3.7.6 (#898)
Browse files Browse the repository at this point in the history
Co-authored-by: Freya Arbjerg <[email protected]>
Co-authored-by: Essem <[email protected]>
  • Loading branch information
3 people authored Jun 29, 2023
1 parent d2e7a8b commit 40f0c80
Show file tree
Hide file tree
Showing 16 changed files with 190 additions and 61 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
required: false
DOCKER_IMAGE:
required: false
MAVEN_USERNAME:
required: false
MAVEN_PASSWORD:
required: false

jobs:
build:
Expand All @@ -23,6 +27,8 @@ jobs:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -40,11 +46,19 @@ jobs:
- name: Execute Gradle build
run: ./gradlew build

- name: Execute Gradle build
run: ./gradlew build -PtargetPlatform=musl

- name: Publish to Maven
run: ./gradlew publish -PMAVEN_USERNAME=$MAVEN_USERNAME -PMAVEN_PASSWORD=$MAVEN_PASSWORD

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Lavalink.jar
path: LavalinkServer/build/libs/Lavalink.jar
path: |
LavalinkServer/build/libs/Lavalink.jar
LavalinkServer/build/libs/Lavalink-musl.jar
- name: Docker Meta
id: meta
Expand All @@ -61,6 +75,23 @@ jobs:
type=semver,pattern={{major}}
type=sha,prefix=
- name: Docker Meta Alpine
id: meta-alpine
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
${{ env.DOCKER_IMAGE }}
flavor: |
suffix=-alpine,onlatest=true
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand All @@ -82,7 +113,7 @@ jobs:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_TOKEN }}

- name: Build and Push
- name: Build Ubuntu and Push
uses: docker/build-push-action@v3
with:
file: LavalinkServer/docker/Dockerfile
Expand All @@ -91,3 +122,13 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Build Alpine and Push
uses: docker/build-push-action@v3
with:
file: LavalinkServer/docker/alpine.Dockerfile
context: .
platforms: linux/amd64,linux/arm64/v8
push: true
tags: ${{ steps.meta-alpine.outputs.tags }}
labels: ${{ steps.meta-alpine.outputs.labels }}
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

release:
needs: build
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Each release usually includes various fixes and improvements.
The most noteworthy of these, as well as any features and breaking changes, are listed here.

## 3.7.6
* Update Lavaplayer to [`1.4.1`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.1) & [`1.4.2`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.2)
* New support for `MUSL` based systems (most notably `alpine`)
* New `alpine` docker image variant (use `-alpine` suffix)

## 3.7.5
* Fix `endTime` in `Player Update` endpoint only applying when playing a new track
* Fix errors when doing multiple session resumes
Expand Down
14 changes: 9 additions & 5 deletions IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -1290,13 +1290,16 @@ Response:

##### Version Object

Parsed Semantic Versioning 2.0.0. See https://semver.org/ for more info

| Field | Type | Description |
|------------|---------|------------------------------------------------------------------------------------|
| semver | string | The full version string of this Lavalink server |
| major | int | The major version of this Lavalink server |
| minor | int | The minor version of this Lavalink server |
| patch | int | The patch version of this Lavalink server |
| preRelease | ?string | The pre-release version according to semver as a `.` separated list of identifiers |
| build | ?string | The build metadata according to semver as a `.` separated list of identifiers |

##### Git Object

Expand All @@ -1319,11 +1322,12 @@ Response:
```json
{
"version": {
"string": "3.7.0-rc.1",
"string": "3.7.0-rc.1+test",
"major": 3,
"minor": 7,
"patch": 0,
"preRelease": "rc.1"
"preRelease": "rc.1",
"build": "test"
},
"buildTime": 1664223916812,
"git": {
Expand All @@ -1339,9 +1343,9 @@ Response:
],
"filters": [
"equalizer",
"karaoke",
"timescale",
"channelMix"
"karaoke",
"timescale",
"channelMix"
],
"plugins": [
{
Expand Down
31 changes: 31 additions & 0 deletions LavalinkServer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ apply(plugin = "org.ajoberstar.grgit")
apply(plugin = "com.adarshr.test-logger")
apply(plugin = "kotlin")
apply(plugin = "kotlin-spring")
apply(from = "../repositories.gradle")

val archivesBaseName = "Lavalink"
group = "dev.arbjerg.lavalink"

description = "Play audio to discord voice channels"

Expand Down Expand Up @@ -101,8 +105,35 @@ tasks {
useJUnitPlatform()
}

val nativesJar = create<Jar>("lavaplayerNativesJar") {
// Only add musl natives
from(configurations.runtimeClasspath.get().find { it.name.contains("lavaplayer-natives") }?.let { file ->
zipTree(file).matching {
include {
it.path.contains("musl")
}
}
})

archiveBaseName.set("lavaplayer-natives")
archiveClassifier.set("musl")
}


withType<BootJar> {
archiveFileName.set("Lavalink.jar")

if (findProperty("targetPlatform") == "musl") {
archiveFileName.set("Lavalink-musl.jar")
// Exclude base dependency jar
exclude {
it.name.contains("lavaplayer-natives-fork") || it.name.contains("udpqueue-native-")
}

// Add custom jar
classpath(nativesJar.outputs)
dependsOn(nativesJar)
}
}

withType<BootRun> {
Expand Down
15 changes: 15 additions & 0 deletions LavalinkServer/docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM azul/zulu-openjdk-alpine:17-jre-headless-latest

# Run as non-root user
RUN addgroup -g 322 -S lavalink && \
adduser -u 322 -S lavalink lavalink

WORKDIR /opt/Lavalink

RUN chown -R lavalink:lavalink /opt/Lavalink

USER lavalink

COPY LavalinkServer/build/libs/Lavalink-musl.jar Lavalink.jar

ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-Xmx4G", "-jar", "Lavalink.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ class AudioPlayerConfiguration {
if (sources.isBandcamp) audioPlayerManager.registerSourceManager(BandcampAudioSourceManager())
if (sources.isTwitch) audioPlayerManager.registerSourceManager(TwitchStreamAudioSourceManager())
if (sources.isVimeo) audioPlayerManager.registerSourceManager(VimeoAudioSourceManager())
if (sources.isMixer) audioPlayerManager.registerSourceManager(BeamAudioSourceManager())
if (sources.isLocal) audioPlayerManager.registerSourceManager(LocalAudioSourceManager(mcr))

audioSourceManagers.forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ data class AudioSourcesConfig(
var isSoundcloud: Boolean = true,
var isTwitch: Boolean = true,
var isVimeo: Boolean = true,
var isMixer: Boolean = true,
var isHttp: Boolean = true,
var isLocal: Boolean = false,
)
2 changes: 1 addition & 1 deletion LavalinkServer/src/main/java/lavalink/server/util/util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun AudioTrack.toInfo(): TrackInfo {
this.identifier,
this.isSeekable,
this.info.author,
this.info.length,
this.duration,
this.info.isStream,
this.position,
this.info.title,
Expand Down
44 changes: 31 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,30 @@ A [basic example bot](Testbot) is available.
* Java 11* LTS or newer required.
* OpenJDK or Zulu running on Linux AMD64 is officially supported.

Support for Darwin (Mac), Windows AMD64, and Linux ARM (Raspberry Pi) is provided on a best-effort basis. This is dependent on Lavaplayer's native libraries.

Lavaplayer currently supports following architectures:

`Darwin (M1 & Intel)`, `Linux aarch32`, `Linux aarch64`, `Linux ARMv7+ 32/64`, `Linux ARMHF(v6) 32`, `Linux i386 32`, `Linux x86 64`, `Windows i386 32` and `Windows x86 64`

JDA-NAS(Native Audio Buffer) & the Timescale filter are currently not supported on following architectures:

`Linux ARMHF(v6) 32` and `Linux aarch32`


Support for other JVMs is also best-effort. Periodic CPU utilization stats are prone not to work everywhere.

**\*Java 11 appears to have some issues with Discord's TLS 1.3. Java 14 has other undiagnosed HTTPS problems. Use Java 13. Docker images have been updated.** See [#258](https://github.com/lavalink-devs/Lavalink/issues/258), [#260](https://github.com/lavalink-devs/Lavalink/issues/260)

## Hardware Support

Lavalink also runs on other hardware, but support is best-effort.
Here is a list of known working hardware:

| Operating System | Architecture | Lavaplayer | JDA-NAS | Timescale | AVX2 |
|------------------|--------------|------------|---------|-----------|------|
| linux | x86-64 |||||
| linux | x86 |||||
| linux | arm |||||
| linux | armhf |||||
| linux | aarch32 |||||
| linux | aarch64 |||||
| linux-musl | x86-64 |||||
| linux-musl | aarch64 |||||
| windows | x86-64 |||||
| Windows | x86 |||||
| darwin | x86-64 |||||
| darwin | aarch64e |||||

## Changelog

Please see [here](CHANGELOG.md)
Expand All @@ -68,14 +77,22 @@ Please see [here](CHANGELOG.md)

Lavalink follows [Semantic Versioning](https://semver.org/).

Given a version number `MAJOR.MINOR.PATCH`, the following rules apply:
The version number is composed of the following parts:

MAJOR breaking API changes
MINOR new backwards compatible features
PATCH backwards compatible bug fixes
PRERELEASE pre-release version
BUILD additional build metadata

Additional labels for release candidates are available as extensions to the `MAJOR.MINOR.PATCH-rcNUMBER`(`3.6.0-rc1`) format.
Version numbers can come in different combinations, depending on the release type:

`MAJOR.MINOR.PATCH` - Stable release
`MAJOR.MINOR.PATCH+BUILD` - Stable release with additional build metadata
`MAJOR.MINOR.PATCH-PRERELEASE` - Pre-release
`MAJOR.MINOR.PATCH-PRERELEASE+BUILD` - Pre-release additional build metadata

---

## Client libraries:
| Client | Platform | Compatible With | REST API Support | Additional Information |
Expand Down Expand Up @@ -228,6 +245,7 @@ Run with `java -jar Lavalink.jar` from the same directory
### Docker

Docker images can be found under [packages](https://github.com/lavalink-devs/Lavalink/pkgs/container/lavalink) with old builds prior to `v3.7.4` being available on [Docker Hub](https://hub.docker.com/r/fredboat/lavalink/).
There are 2 image variants `Ubuntu` and `Alpine`, the `Alpine` variant is smaller and can be used with the `-alpine` suffix, for example `ghcr.io/freyacodes/lavalink:3-alpine`.

---

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ allprojects {
mavenCentral() // main maven repo
mavenLocal() // useful for developing
maven("https://m2.dv8tion.net/releases")
maven("https://maven.arbjerg.dev/releases")
jcenter()
maven("https://jitpack.io") // build projects directly from GitHub
}
Expand Down
18 changes: 2 additions & 16 deletions plugin-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
`maven-publish`
}

apply(from = "../repositories.gradle")

val archivesBaseName = "plugin-api"
group = "dev.arbjerg.lavalink"

Expand Down Expand Up @@ -66,22 +68,6 @@ publishing {
}
}
}

if (isGpgKeyDefined) {
repositories {
val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
val releases = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"

maven(if ((version as String).endsWith("SNAPSHOT")) snapshots else releases) {
credentials {
password = findProperty("ossrhPassword") as? String
username = findProperty("ossrhUsername") as? String
}
}
}
} else {
println("Not capable of publishing to OSSRH because of missing GPG key")
}
}

if (isGpgKeyDefined) {
Expand Down
17 changes: 2 additions & 15 deletions protocol/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
kotlin("jvm")
}

apply(from = "../repositories.gradle")

val archivesBaseName = "protocol"
group = "dev.arbjerg.lavalink"

Expand Down Expand Up @@ -58,21 +60,6 @@ publishing {
}
}
}
if (isGpgKeyDefined) {
repositories {
val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
val releases = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"

maven(if ((version as String).endsWith("SNAPSHOT")) snapshots else releases) {
credentials {
password = findProperty("ossrhPassword") as? String
username = findProperty("ossrhUsername") as? String
}
}
}
} else {
println("Not capable of publishing to OSSRH because of missing GPG key")
}
}

if (isGpgKeyDefined) {
Expand Down
Loading

0 comments on commit 40f0c80

Please sign in to comment.