Skip to content

Commit 40f0c80

Browse files
topi314freyacodesTheEssem
authored
release v3.7.6 (#898)
Co-authored-by: Freya Arbjerg <[email protected]> Co-authored-by: Essem <[email protected]>
1 parent d2e7a8b commit 40f0c80

File tree

16 files changed

+190
-61
lines changed

16 files changed

+190
-61
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
required: false
1515
DOCKER_IMAGE:
1616
required: false
17+
MAVEN_USERNAME:
18+
required: false
19+
MAVEN_PASSWORD:
20+
required: false
1721

1822
jobs:
1923
build:
@@ -23,6 +27,8 @@ jobs:
2327
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
2428
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
2529
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
30+
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
31+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
2632
steps:
2733
- name: Checkout
2834
uses: actions/checkout@v3
@@ -40,11 +46,19 @@ jobs:
4046
- name: Execute Gradle build
4147
run: ./gradlew build
4248

49+
- name: Execute Gradle build
50+
run: ./gradlew build -PtargetPlatform=musl
51+
52+
- name: Publish to Maven
53+
run: ./gradlew publish -PMAVEN_USERNAME=$MAVEN_USERNAME -PMAVEN_PASSWORD=$MAVEN_PASSWORD
54+
4355
- name: Upload Artifacts
4456
uses: actions/upload-artifact@v3
4557
with:
4658
name: Lavalink.jar
47-
path: LavalinkServer/build/libs/Lavalink.jar
59+
path: |
60+
LavalinkServer/build/libs/Lavalink.jar
61+
LavalinkServer/build/libs/Lavalink-musl.jar
4862
4963
- name: Docker Meta
5064
id: meta
@@ -61,6 +75,23 @@ jobs:
6175
type=semver,pattern={{major}}
6276
type=sha,prefix=
6377
78+
- name: Docker Meta Alpine
79+
id: meta-alpine
80+
uses: docker/metadata-action@v4
81+
with:
82+
images: |
83+
ghcr.io/${{ github.repository }}
84+
${{ env.DOCKER_IMAGE }}
85+
flavor: |
86+
suffix=-alpine,onlatest=true
87+
tags: |
88+
type=ref,event=branch
89+
type=ref,event=pr
90+
type=semver,pattern={{version}}
91+
type=semver,pattern={{major}}.{{minor}}
92+
type=semver,pattern={{major}}
93+
type=sha,prefix=
94+
6495
- name: Set up QEMU
6596
uses: docker/setup-qemu-action@v2
6697

@@ -82,7 +113,7 @@ jobs:
82113
username: ${{ env.DOCKER_USERNAME }}
83114
password: ${{ env.DOCKER_TOKEN }}
84115

85-
- name: Build and Push
116+
- name: Build Ubuntu and Push
86117
uses: docker/build-push-action@v3
87118
with:
88119
file: LavalinkServer/docker/Dockerfile
@@ -91,3 +122,13 @@ jobs:
91122
push: true
92123
tags: ${{ steps.meta.outputs.tags }}
93124
labels: ${{ steps.meta.outputs.labels }}
125+
126+
- name: Build Alpine and Push
127+
uses: docker/build-push-action@v3
128+
with:
129+
file: LavalinkServer/docker/alpine.Dockerfile
130+
context: .
131+
platforms: linux/amd64,linux/arm64/v8
132+
push: true
133+
tags: ${{ steps.meta-alpine.outputs.tags }}
134+
labels: ${{ steps.meta-alpine.outputs.labels }}

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
1313
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
1414
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
15+
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
16+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
1517

1618
release:
1719
needs: build

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Each release usually includes various fixes and improvements.
44
The most noteworthy of these, as well as any features and breaking changes, are listed here.
55

6+
## 3.7.6
7+
* 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)
8+
* New support for `MUSL` based systems (most notably `alpine`)
9+
* New `alpine` docker image variant (use `-alpine` suffix)
10+
611
## 3.7.5
712
* Fix `endTime` in `Player Update` endpoint only applying when playing a new track
813
* Fix errors when doing multiple session resumes

IMPLEMENTATION.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,13 +1290,16 @@ Response:
12901290

12911291
##### Version Object
12921292

1293+
Parsed Semantic Versioning 2.0.0. See https://semver.org/ for more info
1294+
12931295
| Field | Type | Description |
12941296
|------------|---------|------------------------------------------------------------------------------------|
12951297
| semver | string | The full version string of this Lavalink server |
12961298
| major | int | The major version of this Lavalink server |
12971299
| minor | int | The minor version of this Lavalink server |
12981300
| patch | int | The patch version of this Lavalink server |
12991301
| preRelease | ?string | The pre-release version according to semver as a `.` separated list of identifiers |
1302+
| build | ?string | The build metadata according to semver as a `.` separated list of identifiers |
13001303

13011304
##### Git Object
13021305

@@ -1319,11 +1322,12 @@ Response:
13191322
```json
13201323
{
13211324
"version": {
1322-
"string": "3.7.0-rc.1",
1325+
"string": "3.7.0-rc.1+test",
13231326
"major": 3,
13241327
"minor": 7,
13251328
"patch": 0,
1326-
"preRelease": "rc.1"
1329+
"preRelease": "rc.1",
1330+
"build": "test"
13271331
},
13281332
"buildTime": 1664223916812,
13291333
"git": {
@@ -1339,9 +1343,9 @@ Response:
13391343
],
13401344
"filters": [
13411345
"equalizer",
1342-
"karaoke",
1343-
"timescale",
1344-
"channelMix"
1346+
"karaoke",
1347+
"timescale",
1348+
"channelMix"
13451349
],
13461350
"plugins": [
13471351
{

LavalinkServer/build.gradle.kts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ apply(plugin = "org.ajoberstar.grgit")
1313
apply(plugin = "com.adarshr.test-logger")
1414
apply(plugin = "kotlin")
1515
apply(plugin = "kotlin-spring")
16+
apply(from = "../repositories.gradle")
17+
18+
val archivesBaseName = "Lavalink"
19+
group = "dev.arbjerg.lavalink"
1620

1721
description = "Play audio to discord voice channels"
1822

@@ -101,8 +105,35 @@ tasks {
101105
useJUnitPlatform()
102106
}
103107

108+
val nativesJar = create<Jar>("lavaplayerNativesJar") {
109+
// Only add musl natives
110+
from(configurations.runtimeClasspath.get().find { it.name.contains("lavaplayer-natives") }?.let { file ->
111+
zipTree(file).matching {
112+
include {
113+
it.path.contains("musl")
114+
}
115+
}
116+
})
117+
118+
archiveBaseName.set("lavaplayer-natives")
119+
archiveClassifier.set("musl")
120+
}
121+
122+
104123
withType<BootJar> {
105124
archiveFileName.set("Lavalink.jar")
125+
126+
if (findProperty("targetPlatform") == "musl") {
127+
archiveFileName.set("Lavalink-musl.jar")
128+
// Exclude base dependency jar
129+
exclude {
130+
it.name.contains("lavaplayer-natives-fork") || it.name.contains("udpqueue-native-")
131+
}
132+
133+
// Add custom jar
134+
classpath(nativesJar.outputs)
135+
dependsOn(nativesJar)
136+
}
106137
}
107138

108139
withType<BootRun> {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM azul/zulu-openjdk-alpine:17-jre-headless-latest
2+
3+
# Run as non-root user
4+
RUN addgroup -g 322 -S lavalink && \
5+
adduser -u 322 -S lavalink lavalink
6+
7+
WORKDIR /opt/Lavalink
8+
9+
RUN chown -R lavalink:lavalink /opt/Lavalink
10+
11+
USER lavalink
12+
13+
COPY LavalinkServer/build/libs/Lavalink-musl.jar Lavalink.jar
14+
15+
ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-Xmx4G", "-jar", "Lavalink.jar"]

LavalinkServer/src/main/java/lavalink/server/config/AudioPlayerConfiguration.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ class AudioPlayerConfiguration {
156156
if (sources.isBandcamp) audioPlayerManager.registerSourceManager(BandcampAudioSourceManager())
157157
if (sources.isTwitch) audioPlayerManager.registerSourceManager(TwitchStreamAudioSourceManager())
158158
if (sources.isVimeo) audioPlayerManager.registerSourceManager(VimeoAudioSourceManager())
159-
if (sources.isMixer) audioPlayerManager.registerSourceManager(BeamAudioSourceManager())
160159
if (sources.isLocal) audioPlayerManager.registerSourceManager(LocalAudioSourceManager(mcr))
161160

162161
audioSourceManagers.forEach {

LavalinkServer/src/main/java/lavalink/server/config/AudioSourcesConfig.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ data class AudioSourcesConfig(
1414
var isSoundcloud: Boolean = true,
1515
var isTwitch: Boolean = true,
1616
var isVimeo: Boolean = true,
17-
var isMixer: Boolean = true,
1817
var isHttp: Boolean = true,
1918
var isLocal: Boolean = false,
2019
)

LavalinkServer/src/main/java/lavalink/server/util/util.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fun AudioTrack.toInfo(): TrackInfo {
4444
this.identifier,
4545
this.isSeekable,
4646
this.info.author,
47-
this.info.length,
47+
this.duration,
4848
this.info.isStream,
4949
this.position,
5050
this.info.title,

README.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,30 @@ A [basic example bot](Testbot) is available.
4545
* Java 11* LTS or newer required.
4646
* OpenJDK or Zulu running on Linux AMD64 is officially supported.
4747

48-
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.
49-
50-
Lavaplayer currently supports following architectures:
51-
52-
`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`
53-
54-
JDA-NAS(Native Audio Buffer) & the Timescale filter are currently not supported on following architectures:
55-
56-
`Linux ARMHF(v6) 32` and `Linux aarch32`
57-
58-
5948
Support for other JVMs is also best-effort. Periodic CPU utilization stats are prone not to work everywhere.
6049

6150
**\*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)
6251

52+
## Hardware Support
53+
54+
Lavalink also runs on other hardware, but support is best-effort.
55+
Here is a list of known working hardware:
56+
57+
| Operating System | Architecture | Lavaplayer | JDA-NAS | Timescale | AVX2 |
58+
|------------------|--------------|------------|---------|-----------|------|
59+
| linux | x86-64 |||||
60+
| linux | x86 |||||
61+
| linux | arm |||||
62+
| linux | armhf |||||
63+
| linux | aarch32 |||||
64+
| linux | aarch64 |||||
65+
| linux-musl | x86-64 |||||
66+
| linux-musl | aarch64 |||||
67+
| windows | x86-64 |||||
68+
| Windows | x86 |||||
69+
| darwin | x86-64 |||||
70+
| darwin | aarch64e |||||
71+
6372
## Changelog
6473

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

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

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

7382
MAJOR breaking API changes
7483
MINOR new backwards compatible features
7584
PATCH backwards compatible bug fixes
85+
PRERELEASE pre-release version
86+
BUILD additional build metadata
7687

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

90+
`MAJOR.MINOR.PATCH` - Stable release
91+
`MAJOR.MINOR.PATCH+BUILD` - Stable release with additional build metadata
92+
`MAJOR.MINOR.PATCH-PRERELEASE` - Pre-release
93+
`MAJOR.MINOR.PATCH-PRERELEASE+BUILD` - Pre-release additional build metadata
94+
95+
---
7996

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

230247
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/).
248+
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`.
231249

232250
---
233251

0 commit comments

Comments
 (0)