Skip to content

Commit 30b4008

Browse files
authored
Merge pull request #16301 from mixxxdj/sync-branch-2.6-to-main
Sync branch 2.6 to main
2 parents 952e329 + 4a4adcc commit 30b4008

29 files changed

Lines changed: 489 additions & 109 deletions

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ jobs:
442442
env:
443443
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
444444
if: runner.os == 'Windows' && env.AZURE_TENANT_ID
445-
uses: azure/trusted-signing-action@v1.1.0
445+
uses: azure/trusted-signing-action@v1.2.0
446446
with:
447447
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
448448
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -488,7 +488,7 @@ jobs:
488488
# Use retry loop to work around a race condition on macOS causing
489489
# 'Resource busy' errors with 'hdiutil'. See
490490
# https://github.com/actions/runner-images/issues/7522
491-
uses: nick-fields/retry@v3
491+
uses: nick-fields/retry@v4
492492
with:
493493
timeout_minutes: 30
494494
max_attempts: ${{ runner.os == 'macOS' && 12 || 1 }}
@@ -541,7 +541,7 @@ jobs:
541541
env:
542542
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
543543
if: runner.os == 'Windows' && env.AZURE_TENANT_ID
544-
uses: azure/trusted-signing-action@v1.1.0
544+
uses: azure/trusted-signing-action@v1.2.0
545545
with:
546546
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
547547
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -660,7 +660,7 @@ jobs:
660660
if: matrix.artifacts_path != null
661661
uses: actions/upload-artifact@v7
662662
with:
663-
name: ${{ matrix.artifacts_name }}
663+
archive: "false"
664664
path: ${{ matrix.artifacts_path }}
665665

666666
build-flatpak:
@@ -716,6 +716,7 @@ jobs:
716716
run: |
717717
flatpak build-bundle repo \
718718
--arch=${{ matrix.variant.arch }} \
719+
--runtime-repo=https://dl.flathub.org/repo/flathub.flatpakrepo \
719720
Mixxx-${GIT_DESC}-${{ matrix.variant.arch }}.flatpak org.mixxx.Mixxx
720721
721722
- name: "Create Debug extension"
@@ -727,13 +728,13 @@ jobs:
727728
- name: "Upload Flatpak bundle"
728729
uses: actions/upload-artifact@v7
729730
with:
730-
name: Flatpak ${{ matrix.variant.arch }}
731+
archive: "false"
731732
path: Mixxx-${{ env.GIT_DESC }}-${{ matrix.variant.arch }}.flatpak
732733

733734
- name: "Upload Debug extension"
734735
uses: actions/upload-artifact@v7
735736
with:
736-
name: Flatpak Debug Extension ${{ matrix.variant.arch }}
737+
archive: "false"
737738
path: Mixxx-${{ env.GIT_DESC }}-${{ matrix.variant.arch }}.Debug.flatpak
738739

739740
update_manifest:

.github/workflows/changelog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: Changelog
44

55
on:
66
workflow_call:
7+
secrets:
8+
MIXXXBOT_CHANGELOG_AUTOUPDATER_PAT:
9+
required: false
710

811
permissions: {}
912
jobs:

.github/workflows/flatpak.yml

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
name: Flatpak
2+
on:
3+
workflow_call:
4+
inputs:
5+
update_repo:
6+
type: boolean
7+
default: false
8+
run_id:
9+
type: string
10+
required: true
11+
ref:
12+
type: string
13+
required: true
14+
secrets:
15+
DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY:
16+
required: false
17+
RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY:
18+
required: false
19+
20+
jobs:
21+
publish-flatpak:
22+
name: Publish Flatpak
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: "Set up SSH Agent"
26+
shell: bash
27+
env:
28+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
29+
SSH_PRIVATE_KEY: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY }}
30+
SSH_HOST: downloads-hostgator.mixxx.org
31+
run: |
32+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
33+
ssh-add - <<< "${SSH_PRIVATE_KEY}"
34+
mkdir -p "${HOME}/.ssh"
35+
ssh-keyscan "${SSH_HOST}" >> "${HOME}/.ssh/known_hosts"
36+
echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> "${GITHUB_ENV}"
37+
38+
- name: Check out repository
39+
if: ${{ inputs.update_repo }}
40+
uses: actions/checkout@v6
41+
42+
- name: "Prepare"
43+
id: prepare
44+
shell: bash
45+
env:
46+
REF: ${{ inputs.ref }}
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y flatpak ostree
50+
# Download rsync wrapper to safely update ostree
51+
wget https://raw.githubusercontent.com/ostreedev/ostree-releng-scripts/621f7637ba6b8e0a8b761ce643c16a1511d04f6b/rsync-repos
52+
chmod +x rsync-repos
53+
54+
if [[ "$REF" =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
55+
echo "commit_summary=Stable build for 2.5" >> $GITHUB_OUTPUT
56+
echo "branch=stable" >> $GITHUB_OUTPUT
57+
elif [ "$REF" = "refs/heads/2.6" ]; then
58+
echo "commit_summary=Beta build for 2.6" >> $GITHUB_OUTPUT
59+
echo "branch=beta" >> $GITHUB_OUTPUT
60+
echo "expiry=30 days" >> $GITHUB_OUTPUT
61+
elif [ "$REF" = "refs/heads/main" ]; then
62+
echo "commit_summary=Nightly build for 2.7" >> $GITHUB_OUTPUT
63+
echo "branch=nightly" >> $GITHUB_OUTPUT
64+
echo "expiry=14 days" >> $GITHUB_OUTPUT
65+
else
66+
echo "::error:: The git reference is unsupported for publication to the Flatpak repo."
67+
exit 1
68+
fi
69+
70+
- name: "Download bundles"
71+
env:
72+
GH_TOKEN: ${{ github.token }}
73+
RUN_ID: ${{ inputs.run_id }}
74+
shell: bash
75+
run: |
76+
mkdir -p bundles
77+
# Work around https://github.com/cli/cli/issues/13012
78+
gh api \
79+
-H "Accept: application/vnd.github+json" \
80+
-H "X-GitHub-Api-Version: 2026-03-10" \
81+
"/repos/mixxxdj/mixxx/actions/runs/$RUN_ID/artifacts" | jq -r '.artifacts[] | select(.name | test("\\.flatpak$")) | [.name, .archive_download_url] | @tsv' |
82+
while IFS=$'\t' read -r name url; do
83+
url=$(echo "$url" | cut -d/ -f 4-)
84+
echo "Downloading artifact $name from $url"
85+
gh api \
86+
-H "Accept: application/vnd.github+json" \
87+
-H "X-GitHub-Api-Version: 2026-03-10" \
88+
"$url" > "bundles/$name"
89+
done
90+
if [ ! `find bundles/ -name '*x86_64.flatpak' | wc -l` -eq 1 ]; then
91+
echo "At least a x86_64 build is expected. Current bundles:"
92+
find bundles/ -type f
93+
exit 1
94+
fi
95+
version=$(find bundles/ -name '*x86_64.flatpak' | cut -d- -f 2- | rev | cut -d- -f 2- | rev)
96+
echo "VERSION=${version}" >> $GITHUB_ENV
97+
98+
- name: "[Ubuntu] Import PPA GPG key"
99+
run: gpg --import <(echo "${RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY}")
100+
env:
101+
RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY: ${{ secrets.RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY }}
102+
103+
- name: "Import bundle to repo"
104+
env:
105+
GPG_KEY_ID: rryan@mixxx.org
106+
COMMIT_SUMMARY: ${{ steps.prepare.outputs.commit_summary }}
107+
BRANCH: ${{ steps.prepare.outputs.branch }}
108+
shell: bash
109+
run: |
110+
set -x
111+
112+
function import_to_repo {
113+
file=$1
114+
id=$2
115+
arch=$3
116+
type=$4
117+
118+
flatpak build-import-bundle -v --gpg-sign=$GPG_KEY_ID repo.tmp "$file"
119+
checksum=$(ostree --repo=repo.tmp rev-parse "${type}/${id}/${arch}/master")
120+
metadata=$(ostree --repo=repo.tmp show --print-metadata-key=xa.metadata "${type}/${id}/${arch}/master")
121+
ostree --repo=repo pull --depth=-1 --mirror "upstream:${type}/${id}/${arch}/${BRANCH}" || true
122+
ostree --repo=repo pull-local repo.tmp "${checksum}"
123+
ostree --repo=repo commit \
124+
--gpg-sign=$GPG_KEY_ID \
125+
-b "${type}/${id}/${arch}/${BRANCH}" \
126+
-s "$COMMIT_SUMMARY" \
127+
"--add-metadata-string=version=$VERSION" \
128+
"--add-metadata-string=xa.metadata=$(printf "%b" "${metadata:1:-1}")" \
129+
"--tree=ref=${checksum}"
130+
ostree --repo=repo show --print-metadata-key=xa.metadata "${type}/${id}/${arch}/${BRANCH}"
131+
}
132+
133+
# Prepare local repos
134+
ostree --repo=repo.tmp init --mode=archive-z2
135+
ostree --repo=repo init --mode=archive-z2
136+
137+
# Hook publish repo to the remote
138+
ostree --repo=repo remote add upstream https://downloads.mixxx.org/flatpak/
139+
140+
for arch in "x86_64" "aarch64"; do
141+
import_to_repo "bundles/Mixxx-${VERSION}-${arch}.flatpak" org.mixxx.Mixxx ${arch} app
142+
if [ -f "bundles/Mixxx-${VERSION}-${arch}.Debug.flatpak" ]; then
143+
import_to_repo "bundles/Mixxx-${VERSION}-${arch}.Debug.flatpak" org.mixxx.Mixxx.Debug ${arch} runtime
144+
else
145+
echo "No debug extension for ${arch}"
146+
fi
147+
done
148+
149+
- name: "Cleanup old builds"
150+
if: ${{ steps.prepare.outputs.expiry != null }}
151+
shell: bash
152+
env:
153+
EXPIRY: ${{ steps.prepare.outputs.expiry }}
154+
run: |
155+
ostree --repo=repo prune --refs-only --keep-younger-than="$EXPIRY ago"
156+
- name: "Push the updated repo"
157+
env:
158+
SSH_HOST: downloads-hostgator.mixxx.org
159+
SSH_USER: mixxx
160+
GPG_KEY_ID: rryan@mixxx.org
161+
shell: bash
162+
run: |
163+
ostree --repo=repo summary -u --gpg-sign=$GPG_KEY_ID
164+
flatpak build-update-repo --gpg-sign=$GPG_KEY_ID repo
165+
./rsync-repos --src "repo/" --dest "${SSH_USER}@${SSH_HOST}:public_html/downloads/flatpak" --rsync-opts "--verbose --recursive --checksum --times --delay-updates"
166+
167+
- name: "Update the repo manifest"
168+
if: ${{ inputs.update_repo }}
169+
env:
170+
SSH_HOST: downloads-hostgator.mixxx.org
171+
SSH_USER: mixxx
172+
shell: bash
173+
run: |
174+
rsync --verbose "packaging/flatpak/repo.flatpakrepo" "${SSH_USER}@${SSH_HOST}:public_html/downloads/flatpak/repo.flatpakrepo"
175+
176+
# TODO we could also publish a .flatpakref file to allow one-click install a version and publish this as a comment to the PR.

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ jobs:
6767
if: failure() && env.UPLOAD_PATCH_FILE != null
6868
uses: actions/upload-artifact@v7
6969
with:
70-
name: ${{ env.UPLOAD_PATCH_FILE }}
70+
archive: "false"
7171
path: ${{ env.UPLOAD_PATCH_FILE }}
7272

7373
- name: "Upload pre-commit.log"
7474
if: failure() && env.UPLOAD_PATCH_FILE == null
7575
uses: actions/upload-artifact@v7
7676
with:
77-
name: pre-commit.log
77+
archive: "false"
7878
path: /github/home/.cache/pre-commit/pre-commit.log
7979

8080
# AppStream metadata has been generated/updated by a pre-commit hook
8181
- name: "Validate AppStream metadata"
8282
if: runner.os == 'Linux'
83-
run: appstreamcli validate res/linux/org.mixxx.Mixxx.metainfo.xml
83+
run: appstreamcli validate --no-net res/linux/org.mixxx.Mixxx.metainfo.xml

.github/workflows/release.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ on:
1111
- "[0-9].[0-9]-*"
1212
workflow_dispatch:
1313

14-
env:
15-
# This variable stores the map of Mixxx branches that still being developed. The key is the branch receiving support and the value is the next version in line
16-
# NOTE: this must be valid JSON!
17-
ACTIVE_VERSIONS: |-
18-
{"2.5": "2.6", "2.6": "main"}
19-
2014
# Global allowed scopes for all actions
2115
permissions:
2216
contents: write # to sync branches
@@ -29,6 +23,8 @@ jobs:
2923

3024
changelog:
3125
uses: ./.github/workflows/changelog.yml
26+
secrets:
27+
MIXXXBOT_CHANGELOG_AUTOUPDATER_PAT: ${{ secrets.MIXXXBOT_CHANGELOG_AUTOUPDATER_PAT }}
3228

3329
build:
3430
uses: ./.github/workflows/build.yml
@@ -55,8 +51,22 @@ jobs:
5551
with:
5652
branch: ${{ github.head_ref || github.ref_name }}
5753

54+
publish:
55+
needs:
56+
- build
57+
uses: ./.github/workflows/flatpak.yml
58+
# Flatpak repo only support stable (non-beta tag release), beta and alpha release publication
59+
if: ${{ (github.ref_type == 'tag' && !contains('-', github.ref_name)) || github.ref_name == '2.6' || github.ref_name == 'main' }}
60+
with:
61+
ref: ${{ github.ref }}
62+
update_repo: ${{ github.ref_name == 'main' }}
63+
run_id: ${{ github.run_id }}
64+
secrets:
65+
DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY }}
66+
RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY: ${{ secrets.RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY }}
67+
5868
sync:
59-
if: ${{ github.ref != 'refs/heads/main' && github.repository == 'mixxxdj/mixxx' }}
69+
if: ${{ github.ref_type != 'tag' && github.ref != 'refs/heads/main' && github.repository == 'mixxxdj/mixxx' }}
6070
uses: ./.github/workflows/sync_branches.yml
6171
secrets:
6272
MIXXX_BRANCH_SYNC_PAT: ${{ secrets.MIXXX_BRANCH_SYNC_PAT }}

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ default_language_version:
3232
rust: 1.64.0
3333
repos:
3434
- repo: https://github.com/pre-commit/pre-commit-hooks
35-
rev: v5.0.0
35+
rev: v6.0.0
3636
hooks:
3737
- id: fix-byte-order-marker
3838
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters|UTF-8-BOM.txt)$
@@ -51,7 +51,7 @@ repos:
5151
# protect main and any branch that has a semver-like name
5252
args: [-b, main, -p, '^\d+\.\d+(?:\.\d+)?$']
5353
- repo: https://github.com/codespell-project/codespell
54-
rev: v2.3.0
54+
rev: v2.4.2
5555
hooks:
5656
- id: codespell
5757
args:
@@ -66,7 +66,7 @@ repos:
6666
]
6767
exclude: ^(packaging/wix/LICENSE.rtf.in|src/dialog/dlgabout\.cpp|res/linux/org\.mixxx\.Mixxx\.desktop|.*\.(?:pot?|(?<!\.d\.)ts|wxl|svg))$
6868
- repo: https://github.com/pre-commit/mirrors-eslint
69-
rev: v9.14.0
69+
rev: v10.2.0
7070
hooks:
7171
- id: eslint
7272
args: [--fix, --report-unused-disable-directives]
@@ -77,11 +77,11 @@ repos:
7777
- pre-commit
7878
- manual
7979
additional_dependencies:
80-
- eslint@^9.14.0
80+
- eslint@^10.2.0
8181
- "@eslint/js"
8282
- typescript-eslint
8383
- eslint-plugin-jsdoc@^v50.4.3
84-
- eslint-plugin-diff@^2.0.3
84+
- eslint-plugin-diff@^2.1.7
8585
exclude: ^res/translations/.*\.ts$
8686
- repo: local
8787
hooks:
@@ -98,26 +98,26 @@ repos:
9898
- clang-format==19.1.3
9999
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|m|mm|proto|vert)$
100100
- repo: https://github.com/psf/black
101-
rev: 24.10.0
101+
rev: 26.3.1
102102
hooks:
103103
- id: black
104104
files: ^tools/.*$
105105
- repo: https://github.com/pycqa/flake8
106-
rev: "7.1.1"
106+
rev: "7.3.0"
107107
hooks:
108108
- id: flake8
109109
files: ^tools/.*$
110110
types: [text, python]
111111
- repo: https://github.com/shellcheck-py/shellcheck-py
112-
rev: v0.10.0.1
112+
rev: v0.11.0.1
113113
hooks:
114114
- id: shellcheck
115115
- repo: https://github.com/DavidAnson/markdownlint-cli2
116-
rev: v0.14.0
116+
rev: v0.22.0
117117
hooks:
118118
- id: markdownlint-cli2
119119
- repo: https://github.com/python-jsonschema/check-jsonschema
120-
rev: 0.29.4
120+
rev: 0.37.1
121121
hooks:
122122
- id: check-github-workflows
123123
- repo: https://github.com/pre-commit/mirrors-prettier

0 commit comments

Comments
 (0)