strawberry-audio-player-win.../.github/workflows/build.yml

1536 lines
54 KiB
YAML
Raw Normal View History

2023-02-21 18:43:01 +01:00
name: Build
2024-02-11 00:10:36 +01:00
on:
push:
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]
2019-11-24 20:04:05 +01:00
jobs:
2023-05-06 15:02:55 +02:00
build-opensuse:
2022-09-30 21:31:28 +02:00
name: Build openSUSE
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2019-11-24 20:04:05 +01:00
runs-on: ubuntu-latest
2022-09-30 21:31:28 +02:00
strategy:
fail-fast: false
matrix:
2024-06-16 18:18:43 +02:00
opensuse_version: [ 'tumbleweed', 'leap:15.6' ]
2020-04-08 01:15:39 +02:00
container:
2022-09-30 21:31:28 +02:00
image: opensuse/${{matrix.opensuse_version}}
2019-11-24 20:04:05 +01:00
steps:
2022-09-30 21:31:28 +02:00
- name: Refresh repositories
run: zypper -n --gpg-auto-import-keys ref
- name: Upgrade packages
if: matrix.opensuse_version == 'tumbleweed'
run: zypper -n --gpg-auto-import-keys dup
2024-04-03 00:00:44 +02:00
- name: Upgrade packages
if: matrix.opensuse_version != 'tumbleweed'
run: zypper -n --gpg-auto-import-keys up
2022-09-30 21:31:28 +02:00
- name: Install gcc
if: matrix.opensuse_version == 'tumbleweed'
run: zypper -n --gpg-auto-import-keys in gcc gcc-c++
2024-04-03 00:00:44 +02:00
- name: Install gcc 13
2022-09-30 21:31:28 +02:00
if: matrix.opensuse_version != 'tumbleweed'
2024-04-03 00:00:44 +02:00
run: zypper -n --gpg-auto-import-keys in gcc13 gcc13-c++
2022-09-30 21:31:28 +02:00
- name: Install packages
2020-05-30 03:49:37 +02:00
run: >
2022-09-30 21:31:28 +02:00
zypper -n --gpg-auto-import-keys in
2020-05-30 03:49:37 +02:00
lsb-release
rpm-build
git
tar
make
cmake
openssh-clients
2020-05-30 03:49:37 +02:00
glibc-devel
libboost_headers-devel
boost-devel
glib2-devel
glib2-tools
alsa-devel
libnotify-devel
sqlite3-devel
libpulse-devel
gstreamer-devel
gstreamer-plugins-base-devel
2021-02-26 22:36:26 +01:00
taglib-devel
libicu-devel
2022-09-30 21:31:28 +02:00
libcdio-devel
libgpod-devel
libmtp-devel
libchromaprint-devel
2023-10-23 19:45:50 +02:00
fftw3-devel
2023-06-27 04:06:30 +02:00
libebur128-devel
2022-09-30 21:31:28 +02:00
desktop-file-utils
update-desktop-files
appstream-glib
hicolor-icon-theme
qt6-core-devel
qt6-gui-devel
qt6-widgets-devel
qt6-concurrent-devel
qt6-network-devel
qt6-sql-devel
qt6-dbus-devel
qt6-test-devel
qt6-base-common-devel
qt6-sql-sqlite
qt6-linguist-devel
2023-12-26 20:47:11 +01:00
- name: Install kdsingleapplication-qt6-devel
if: matrix.opensuse_version == 'tumbleweed'
2023-12-26 20:47:11 +01:00
run: zypper -n --gpg-auto-import-keys in kdsingleapplication-qt6-devel
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2022-08-09 23:03:24 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-04-20 01:23:02 +02:00
- name: Add safe git directory
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2020-05-30 03:49:37 +02:00
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
2024-09-28 15:38:14 +02:00
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
2020-05-30 03:49:37 +02:00
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
2022-09-30 21:31:28 +02:00
- name: Create RPM build sources directories
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
run: cp strawberry-*.tar.xz /usr/src/packages/SOURCES/
- name: Build RPM (Tumbleweed)
if: matrix.opensuse_version == 'tumbleweed'
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- name: Build RPM (Leap)
if: matrix.opensuse_version != 'tumbleweed'
working-directory: build
env:
2024-04-03 00:00:44 +02:00
CC: gcc-13
CXX: g++-13
2022-09-30 21:31:28 +02:00
run: rpmbuild -ba ../dist/unix/strawberry.spec
2024-02-11 12:12:54 +01:00
- name: Set subdir
id: set-subdir
run: echo "subdir=$(echo ${{matrix.opensuse_version}} | sed 's/leap:/lp/g' | sed 's/\.//g')" > $GITHUB_OUTPUT
- name: Upload source
if: matrix.opensuse_version == 'tumbleweed'
uses: actions/upload-artifact@v4
2023-05-06 15:02:55 +02:00
with:
2024-02-11 12:12:54 +01:00
name: source
2023-05-06 15:02:55 +02:00
path: |
/usr/src/packages/SOURCES/*.xz
2024-02-11 12:12:54 +01:00
- name: Upload rpm
if: matrix.opensuse_version != 'tumbleweed'
2024-02-11 12:12:54 +01:00
uses: actions/upload-artifact@v4
with:
name: opensuse-${{steps.set-subdir.outputs.subdir}}
path: |
2023-05-06 15:02:55 +02:00
/usr/src/packages/SRPMS/*.rpm
/usr/src/packages/RPMS/x86_64/*.rpm
build-fedora:
2022-09-30 21:31:28 +02:00
name: Build Fedora
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2021-03-20 22:01:32 +01:00
runs-on: ubuntu-latest
2022-09-30 21:31:28 +02:00
strategy:
fail-fast: false
matrix:
2024-11-14 18:32:42 +01:00
fedora_version: [ '39', '40', '41', '42' ]
2021-03-20 22:01:32 +01:00
container:
2022-09-30 21:31:28 +02:00
image: fedora:${{matrix.fedora_version}}
2020-05-30 03:49:37 +02:00
steps:
2022-09-30 21:31:28 +02:00
- name: Update repositories
2023-08-11 17:03:39 +02:00
run: dnf -y update
2022-09-30 21:31:28 +02:00
- name: Upgrade packages
2023-08-11 17:03:39 +02:00
run: dnf -y upgrade
2022-09-30 21:31:28 +02:00
- name: Install dependencies
2020-05-30 03:49:37 +02:00
run: >
dnf -y install
2022-09-30 21:31:28 +02:00
@development-tools
redhat-lsb-core
which
2020-05-30 03:49:37 +02:00
git
2022-09-30 21:31:28 +02:00
glibc
gcc-c++
rpmdevtools
2020-05-30 03:49:37 +02:00
make
cmake
2022-09-30 21:31:28 +02:00
pkgconfig
glib
man
tar
openssh
2023-05-06 15:02:55 +02:00
rsync
2020-05-30 03:49:37 +02:00
boost-devel
2022-09-30 21:31:28 +02:00
sqlite-devel
alsa-lib-devel
pulseaudio-libs-devel
libnotify-devel
libicu-devel
2022-09-30 21:31:28 +02:00
qt6-qtbase-devel
qt6-qtbase-private-devel
qt6-qttools-devel
gstreamer1-devel
gstreamer1-plugins-base-devel
taglib-devel
2020-05-30 03:49:37 +02:00
libcdio-devel
libgpod-devel
libmtp-devel
libchromaprint-devel
2023-06-27 04:06:30 +02:00
libebur128-devel
2022-09-30 21:31:28 +02:00
fftw-devel
2020-05-30 03:49:37 +02:00
desktop-file-utils
2022-09-30 21:31:28 +02:00
libappstream-glib
2020-05-30 03:49:37 +02:00
hicolor-icon-theme
2023-12-26 20:47:11 +01:00
kdsingleapplication-qt6-devel
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2022-08-09 23:03:24 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-04-20 01:23:02 +02:00
- name: Add safe git directory
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2020-05-30 03:49:37 +02:00
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
2023-05-06 14:18:35 +02:00
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
2020-05-30 03:49:37 +02:00
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- name: Create RPM build sources directories
2022-09-30 21:31:28 +02:00
working-directory: build
2020-05-30 03:49:37 +02:00
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp strawberry-*.tar.xz ~/rpmbuild/SOURCES/
2020-05-30 03:49:37 +02:00
- name: Build RPM
2022-09-30 21:31:28 +02:00
env:
RPM_BUILD_NCPUS: "2"
2020-05-30 03:49:37 +02:00
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
2023-05-06 15:02:55 +02:00
- name: Upload artifacts
uses: actions/upload-artifact@v4
2023-05-06 15:02:55 +02:00
with:
name: fedora-${{matrix.fedora_version}}
path: |
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
2020-05-30 03:49:37 +02:00
2021-03-20 22:01:32 +01:00
2023-05-06 15:02:55 +02:00
build-openmandriva:
2022-09-30 21:31:28 +02:00
name: Build OpenMandriva
2024-04-06 21:11:01 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && false
2020-08-02 04:19:39 +02:00
runs-on: ubuntu-latest
2022-09-30 21:31:28 +02:00
strategy:
fail-fast: false
matrix:
openmandriva_version: [ "cooker" ]
2020-08-02 04:19:39 +02:00
container:
2022-09-30 21:31:28 +02:00
image: openmandriva/${{matrix.openmandriva_version}}
2020-08-02 04:19:39 +02:00
steps:
2024-01-04 02:33:18 +01:00
- name: Update distro
run: dnf distro-sync --assumeyes
2022-09-30 21:31:28 +02:00
- name: Install dependencies
2020-08-02 04:19:39 +02:00
run: >
2023-02-21 18:43:01 +01:00
dnf install -y
2024-01-04 02:33:18 +01:00
which
2022-09-30 21:31:28 +02:00
glibc
gcc-c++
git
gnutar
make
cmake
glib
lsb-release
rpmdevtools
rpm-build
glibc-devel
boost-devel
sqlite-devel
libasound-devel
pulseaudio-devel
2024-01-04 02:33:18 +01:00
libGL-devel
2022-09-30 21:31:28 +02:00
libgst-plugins-base1.0-devel
taglib-devel
chromaprint-devel
2023-06-27 04:06:30 +02:00
libebur128-devel
2022-09-30 21:31:28 +02:00
fftw-devel
icu-devel
libcdio-devel
libgpod-devel
libmtp-devel
lib64Qt6Core-devel
lib64Qt6Concurrent-devel
lib64Qt6Network-devel
lib64Qt6Sql-devel
lib64Qt6DBus-devel
lib64Qt6Gui-devel
lib64Qt6Widgets-devel
lib64Qt6Test-devel
qt6-cmake
qt6-qtbase-tools
2023-10-08 00:11:47 +02:00
qt6-qttools-linguist
2022-09-30 21:31:28 +02:00
desktop-file-utils
appstream
appstream-util
hicolor-icon-theme
2024-01-04 02:33:18 +01:00
- name: Remove files
run: rm -rf /usr/lib64/qt6/lib/cmake/Qt6Sql/{Qt6QMYSQL*,Qt6QODBCD*,Qt6QPSQL*,Qt6QIBase*}
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2022-08-09 23:03:24 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-04-20 01:23:02 +02:00
- name: Add safe git directory
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2020-08-02 04:19:39 +02:00
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
2023-05-06 14:18:35 +02:00
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
2020-12-09 00:27:37 +01:00
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
2022-01-09 03:43:01 +01:00
- name: Create RPM build sources directories
2022-09-30 21:31:28 +02:00
working-directory: build
2022-01-09 03:43:01 +01:00
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp strawberry-*.tar.xz ~/rpmbuild/SOURCES/
2023-05-06 14:08:34 +02:00
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
2023-05-06 15:02:55 +02:00
- name: Upload artifacts
2024-02-11 12:24:29 +01:00
if: matrix.openmandriva_version != 'cooker'
uses: actions/upload-artifact@v4
2023-05-06 15:02:55 +02:00
with:
name: openmandriva-${{matrix.openmandriva_version}}
path: |
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
2023-05-06 14:08:34 +02:00
2023-05-06 15:02:55 +02:00
build-mageia:
2023-05-06 14:08:34 +02:00
name: Build Mageia
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2023-05-06 14:08:34 +02:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mageia_version: [ '9' ]
2023-05-06 14:08:34 +02:00
container:
image: mageia:${{matrix.mageia_version}}
steps:
2024-04-21 16:10:26 +02:00
- name: Set media
run: |
urpmi.removemedia "Core Release"
urpmi.removemedia "Core Updates"
urpmi.addmedia "Core Release" "https://mirrors.kernel.org/mageia/distrib/${{matrix.mageia_version}}/x86_64/media/core/release/"
urpmi.addmedia "Core Updates" "https://mirrors.kernel.org/mageia/distrib/${{matrix.mageia_version}}/x86_64/media/core/updates/"
2023-05-06 14:08:34 +02:00
- name: Update repositories
2024-04-21 16:10:26 +02:00
run: urpmi.update -a
2023-05-06 14:08:34 +02:00
- name: Upgrade packages
run: urpmi --auto --auto-update
- name: Install dependencies
run: >
urpmi --auto --force urpmi-debuginfo-install
git
glibc
gcc-c++
binutils
make
cmake
man
tar
rpmdevtools
lib64boost-devel
lib64sqlite3-devel
lib64alsa2-devel
lib64pulseaudio-devel
lib64gstreamer1.0-devel
lib64gstreamer-plugins-base1.0-devel
lib64cdio-devel
lib64gpod-devel
lib64mtp-devel
lib64taglib-devel
lib64chromaprint-devel
2023-06-27 04:06:30 +02:00
lib64ebur128-devel
2023-05-06 14:08:34 +02:00
lib64icu-devel
lib64fftw-devel
lib64dbus-devel
lib64appstream-devel
2024-04-06 21:10:49 +02:00
lib64qt6core-devel
lib64qt6gui-devel
lib64qt6widgets-devel
lib64qt6network-devel
lib64qt6concurrent-devel
lib64qt6sql-devel
lib64qt6dbus-devel
lib64qt6help-devel
lib64qt6test-devel
2023-05-06 14:08:34 +02:00
desktop-file-utils
appstream-util
hicolor-icon-theme
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2023-05-06 14:08:34 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2023-05-06 14:08:34 +02:00
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
2023-05-06 14:18:35 +02:00
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
2023-05-06 14:08:34 +02:00
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- name: Create RPM build sources directories
working-directory: build
run: mkdir -p ~/rpmbuild/SOURCES /usr/src/packages/SOURCES
- name: Copy source tarball
working-directory: build
run: cp strawberry-*.tar.xz ~/rpmbuild/SOURCES/
2022-01-09 03:43:01 +01:00
- name: Build RPM
env:
2022-09-30 21:31:28 +02:00
RPM_BUILD_NCPUS: "2"
working-directory: build
2022-01-09 03:43:01 +01:00
run: rpmbuild -ba ../dist/unix/strawberry.spec
2023-05-06 15:02:55 +02:00
- name: Upload artifacts
uses: actions/upload-artifact@v4
2023-05-06 15:02:55 +02:00
with:
name: mageia-${{matrix.mageia_version}}
2023-09-25 20:15:56 +02:00
path: |
2023-05-06 15:02:55 +02:00
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
2022-01-09 03:43:01 +01:00
2022-08-09 23:03:24 +02:00
2023-05-06 15:02:55 +02:00
build-debian:
2022-09-30 21:31:28 +02:00
name: Build Debian
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2022-03-05 12:13:34 +01:00
runs-on: ubuntu-latest
2022-09-30 21:31:28 +02:00
strategy:
fail-fast: false
matrix:
debian_version: [ 'bookworm', 'trixie' ]
2022-03-05 12:13:34 +01:00
container:
2022-09-30 21:31:28 +02:00
image: debian:${{matrix.debian_version}}
2022-03-05 12:13:34 +01:00
steps:
2024-03-31 23:09:19 +02:00
- name: Update packages
2023-02-21 18:43:01 +01:00
run: apt update -y
2024-03-31 23:09:19 +02:00
- name: Upgrade packages
run: apt upgrade -y
2022-09-30 21:31:28 +02:00
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
2022-03-05 12:13:34 +01:00
run: >
2022-09-30 21:31:28 +02:00
apt install -y
build-essential
dh-make
2022-03-05 12:13:34 +01:00
git
make
cmake
gcc
2022-09-30 21:31:28 +02:00
g++
pkg-config
fakeroot
2022-03-05 12:13:34 +01:00
lsb-release
2022-09-30 21:31:28 +02:00
dpkg-dev
2023-05-06 15:02:55 +02:00
libglib2.0-dev
2022-09-30 21:31:28 +02:00
libboost-dev
libsqlite3-dev
libasound2-dev
libpulse-dev
libtag1-dev
libicu-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
libchromaprint-dev
2023-06-27 04:06:30 +02:00
libebur128-dev
2022-09-30 21:31:28 +02:00
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
qt6-base-dev
qt6-base-dev-tools
qt6-tools-dev
qt6-tools-dev-tools
qt6-l10n-tools
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2022-08-09 23:03:24 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-04-20 01:23:02 +02:00
- name: Add safe git directory
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2022-03-05 12:13:34 +01:00
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
2023-05-06 14:18:35 +02:00
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
2022-09-30 21:31:28 +02:00
- name: make deb
run: dpkg-buildpackage -b -d -uc -us -nc -j2
2023-05-06 15:02:55 +02:00
- name: Copy deb
run: cp ../*.deb .
- name: Upload artifacts
uses: actions/upload-artifact@v4
2023-05-06 15:02:55 +02:00
with:
name: debian-${{matrix.debian_version}}
path: "*.deb"
2021-02-27 14:58:34 +01:00
2022-08-09 23:03:24 +02:00
2023-05-06 15:02:55 +02:00
build-ubuntu:
2022-09-30 21:31:28 +02:00
name: Build Ubuntu
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2021-10-09 00:26:05 +02:00
runs-on: ubuntu-latest
2022-09-30 21:31:28 +02:00
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'noble', 'oracular' ]
2021-10-09 00:26:05 +02:00
container:
2022-09-30 21:31:28 +02:00
image: ubuntu:${{matrix.ubuntu_version}}
2021-10-09 00:26:05 +02:00
steps:
2024-03-31 23:09:19 +02:00
- name: Update packages
2023-02-21 18:43:01 +01:00
run: apt update -y
2024-03-31 23:09:19 +02:00
- name: Upgrade packages
run: apt upgrade -y
2022-09-30 21:31:28 +02:00
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
2021-10-09 00:26:05 +02:00
run: >
2023-02-21 18:43:01 +01:00
apt install -y
2022-09-30 21:31:28 +02:00
build-essential
dh-make
2021-10-09 00:26:05 +02:00
git
make
cmake
2022-09-30 21:31:28 +02:00
pkg-config
2021-10-09 00:26:05 +02:00
gcc
2022-09-30 21:31:28 +02:00
g++
fakeroot
wget
curl
lsb-release
dpkg-dev
libglib2.0-dev
libboost-dev
libsqlite3-dev
libasound2-dev
libpulse-dev
libtag1-dev
libicu-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-good1.0-dev
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
libchromaprint-dev
2023-06-27 04:06:30 +02:00
libebur128-dev
2022-09-30 21:31:28 +02:00
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
qt6-base-dev
qt6-base-dev-tools
qt6-tools-dev
qt6-tools-dev-tools
qt6-l10n-tools
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2022-08-09 23:03:24 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-04-20 01:23:02 +02:00
- name: Add safe git directory
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2021-10-09 00:26:05 +02:00
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
2023-05-06 14:18:35 +02:00
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
2022-09-30 21:31:28 +02:00
- name: make deb
run: dpkg-buildpackage -b -d -uc -us -nc -j2
2023-05-06 15:02:55 +02:00
- name: Copy deb
run: cp ../*.deb ../*.ddeb .
- name: Upload artifacts
uses: actions/upload-artifact@v4
2023-05-06 15:02:55 +02:00
with:
name: ubuntu-${{matrix.ubuntu_version}}
path: |
*.deb
*.ddeb
2021-10-09 00:26:05 +02:00
2023-05-07 02:27:46 +02:00
upload-ubuntu-ppa:
name: Upload Ubuntu PPA
2024-10-01 21:10:50 +02:00
if: github.repository == 'strawberrymusicplayer/strawberry' && github.event.pull_request.head.repo.fork == false && (github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/1.1'))) && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2023-05-07 02:27:46 +02:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'noble', 'oracular' ]
2023-05-07 02:27:46 +02:00
container:
image: ubuntu:${{matrix.ubuntu_version}}
steps:
2024-03-31 23:09:19 +02:00
- name: Update packages
2023-05-07 02:27:46 +02:00
run: apt update -y
2024-03-31 23:09:19 +02:00
- name: Upgrade packages
run: apt upgrade -y
2023-05-07 02:27:46 +02:00
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: >
apt install -y
git
build-essential
dh-make
make
cmake
pkg-config
gcc
g++
fakeroot
lsb-release
gpg
dput
dpkg-dev
libglib2.0-dev
libboost-dev
libsqlite3-dev
libasound2-dev
libpulse-dev
libtag1-dev
libicu-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-good1.0-dev
libchromaprint-dev
2023-06-27 04:06:30 +02:00
libebur128-dev
2023-05-07 02:27:46 +02:00
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
qt6-base-dev
qt6-base-dev-tools
qt6-tools-dev
qt6-tools-dev-tools
qt6-l10n-tools
2023-05-07 02:27:46 +02:00
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
2024-03-31 23:09:19 +02:00
- name: Install keyboxd
if: matrix.ubuntu_version == 'noble'
env:
DEBIAN_FRONTEND: noninteractive
run: apt install -y keyboxd
2023-05-07 02:27:46 +02:00
- name: Checkout
uses: actions/checkout@v4
2023-05-07 02:27:46 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2023-05-07 02:27:46 +02:00
- name: Add safe git directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_WERROR=ON
- name: Delete build directory
run: rm -rf build
- name: Import Ubuntu PPA GPG private key
uses: crazy-max/ghaction-import-gpg@v6
2023-05-07 02:27:46 +02:00
with:
gpg_private_key: ${{secrets.UBUNTU_PPA_GPG_PRIVATE_KEY}}
- name: dpkg-buildpackage
run: dpkg-buildpackage -S -d -k573D197B5EA20EDF
2023-09-25 20:16:26 +02:00
- name: Upload Unstable PPA
2024-02-11 00:10:36 +01:00
if: github.event_name == 'push'
2023-09-25 20:16:26 +02:00
run: dput ppa:jonaski/strawberry-unstable ../*_source.changes
2023-05-07 02:27:46 +02:00
- name: Upload Stable PPA
2024-02-11 00:10:36 +01:00
if: github.event_name == 'release'
2023-07-12 14:22:15 +02:00
run: dput ppa:jonaski/strawberry ../*_source.changes
2023-05-07 02:27:46 +02:00
build-macos-public:
name: Build macOS Public
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2023-09-07 19:48:41 +02:00
strategy:
fail-fast: false
matrix:
runner: [ 'macos-13', 'macos-14' ]
2023-09-07 19:48:41 +02:00
buildtype: [ 'release' ]
runs-on: ${{ matrix.runner }}
2023-09-07 19:48:41 +02:00
steps:
- name: Set MACOSX_DEPLOYMENT_TARGET
run: |
for i in 12 13 14 15; do
if [ -d "/Library/Developer/CommandLineTools/SDKs/MacOSX${i}.sdk" ]; then
echo "Using macOS SDK ${i}"
echo "MACOSX_DEPLOYMENT_TARGET=${i}.0" >> $GITHUB_ENV
break
fi
done
- name: Verify MACOSX_DEPLOYMENT_TARGET
run: |
test "${MACOSX_DEPLOYMENT_TARGET}" = "" && false || echo "MACOSX_DEPLOYMENT_TARGET: ${MACOSX_DEPLOYMENT_TARGET}"
- name: Set arch
shell: bash
run: echo "arch=$(uname -m)" >> $GITHUB_ENV
2023-09-07 19:48:41 +02:00
- name: Set buildtype
run: echo "buildtype=$(echo ${{matrix.buildtype}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Set cmake buildtype
run: echo "cmake_buildtype=$(echo ${{env.buildtype}} | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}')" >> $GITHUB_ENV
- name: Uninstall homebrew
run: |
curl -sfLO https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh
chmod +x ./uninstall.sh
sudo ./uninstall.sh --force
rm -f uninstall.sh
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2023-09-07 19:48:41 +02:00
- name: Import certificate file
if: github.repository == 'strawberrymusicplayer/strawberry' && github.event.pull_request.head.repo.fork == false
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE }}
p12-password: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD }}
2023-10-15 06:28:38 +02:00
2023-09-07 19:48:41 +02:00
- name: Download macOS dependencies
run: curl -f -O -L https://github.com/strawberrymusicplayer/strawberry-macos-dependencies/releases/latest/download/strawberry-macos-${{env.arch}}-${{env.buildtype}}.tar.xz
2023-09-07 19:48:41 +02:00
- name: Extract macOS dependencies
run: sudo tar -C / -xf strawberry-macos-${{env.arch}}-${{env.buildtype}}.tar.xz
2023-09-07 19:48:41 +02:00
- name: Set prefix path
run: echo "prefix_path=/opt/strawberry_macos_${{env.arch}}_${{env.buildtype}}" >> $GITHUB_ENV
2023-09-07 19:48:41 +02:00
- name: Update PATH
run: echo "${{env.prefix_path}}/bin" >> $GITHUB_PATH
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
env:
PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig
LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib
run: >
cmake
--log-level="DEBUG"
-S .
-B build
-DCMAKE_BUILD_TYPE="${{env.cmake_buildtype}}"
2023-09-24 01:50:58 +02:00
-DCMAKE_PREFIX_PATH="${{env.prefix_path}}/lib/cmake"
2024-09-23 23:26:58 +02:00
-DBUILD_WERROR=ON
2023-09-07 19:48:41 +02:00
-DUSE_BUNDLE=ON
-DENABLE_DBUS=OFF
-DICU_ROOT="${{env.prefix_path}}"
-DAPPLE_DEVELOPER_ID=$(test '${{github.repository}}' = 'strawberrymusicplayer/strawberry' && test '${{github.event.pull_request.base.repo.full_name}}' = '${{github.event.pull_request.head.repo.full_name}}' && echo "383J84DVB6" || echo "")
-DENABLE_SPOTIFY=$(test -f "${{env.prefix_path}}/lib/gstreamer-1.0/libgstspotify.dylib" && echo "ON" || echo "OFF")
2023-09-07 19:48:41 +02:00
- name: Build
run: cmake --build build --config Release --parallel 4
- name: Install
working-directory: build
run: make install
- name: Deploy
env:
GIO_EXTRA_MODULES: ${{env.prefix_path}}/lib/gio/modules
GST_PLUGIN_SCANNER: ${{env.prefix_path}}/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH: ${{env.prefix_path}}/lib/gstreamer-1.0
2023-10-14 03:29:14 +02:00
LIBSOUP_LIBRARY_PATH: ${{env.prefix_path}}/lib/libsoup-3.0.0.dylib
2023-09-07 19:48:41 +02:00
working-directory: build
run: make deploy
2024-01-26 18:58:10 +01:00
- name: Manually Codesign
2024-08-24 23:05:15 +02:00
if: github.repository == 'strawberrymusicplayer/strawberry' && github.event.pull_request.head.repo.fork == false && matrix.runner == 'macos-13'
working-directory: build
2024-09-15 23:17:14 +02:00
run: codesign -s 383J84DVB6 -f strawberry.app/Contents/Frameworks/{libpcre2-8.0.dylib,libpcre2-16.0.dylib,libpng16.16.dylib,libfreetype.6.dylib,libzstd.1.dylib} strawberry.app/Contents/Frameworks/png.framework/png strawberry.app
2024-08-24 23:05:15 +02:00
- name: Manually Codesign
if: github.repository == 'strawberrymusicplayer/strawberry' && github.event.pull_request.head.repo.fork == false && matrix.runner == 'macos-14'
working-directory: build
run: codesign -s 383J84DVB6 -f strawberry.app/Contents/Frameworks/png.framework/png strawberry.app
2023-09-07 19:48:41 +02:00
- name: Deploy check
working-directory: build
run: make deploycheck
2023-10-15 16:51:13 +02:00
- name: Verify code-signing
if: github.repository == 'strawberrymusicplayer/strawberry' && github.event.pull_request.head.repo.fork == false
2023-10-15 16:51:13 +02:00
working-directory: build
run: codesign --deep -v strawberry.app
2023-09-07 19:48:41 +02:00
- name: Create DMG
working-directory: build
run: make dmg
2024-07-05 00:05:18 +02:00
- name: SSH Setup
2024-02-11 12:12:54 +01:00
if: github.repository == 'strawberrymusicplayer/strawberry' && (github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/macos')))
2023-09-07 19:48:41 +02:00
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Set Upload path
2024-02-11 12:12:54 +01:00
id: set-upload-path
if: github.repository == 'strawberrymusicplayer/strawberry' && (github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/macos')))
run: |
2024-02-11 00:10:36 +01:00
if [ "${{github.event_name}}" = "release" ]; then
2024-02-11 12:12:54 +01:00
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/stable_releases/macos" >> $GITHUB_OUTPUT
else
2024-02-11 12:12:54 +01:00
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/development_releases/macos" >> $GITHUB_OUTPUT
fi
2023-09-07 19:48:41 +02:00
- name: Create server path
2024-02-11 12:12:54 +01:00
if: steps.set-upload-path.outputs.upload_path != ''
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{steps.set-upload-path.outputs.upload_path}}
2023-09-07 19:48:41 +02:00
- name: rsync
2024-02-11 12:12:54 +01:00
if: steps.set-upload-path.outputs.upload_path != ''
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/*.dmg ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{steps.set-upload-path.outputs.upload_path}}/
2023-09-07 19:48:41 +02:00
build-macos-private:
name: Build macOS Private
if: github.repository == 'strawberrymusicplayer/strawberry-private'
strategy:
fail-fast: false
matrix:
runner: [ 'macos-arm64' ]
buildtype: [ 'release' ]
runs-on: ${{ matrix.runner }}
steps:
- name: Set MACOSX_DEPLOYMENT_TARGET
run: |
for i in 12 13 14 15; do
if [ -d "/Library/Developer/CommandLineTools/SDKs/MacOSX${i}.sdk" ]; then
echo "Using macOS SDK ${i}"
echo "MACOSX_DEPLOYMENT_TARGET=${i}.0" >> $GITHUB_ENV
break
fi
done
- name: Verify MACOSX_DEPLOYMENT_TARGET
run: |
test "${MACOSX_DEPLOYMENT_TARGET}" = "" && false || echo "MACOSX_DEPLOYMENT_TARGET: ${MACOSX_DEPLOYMENT_TARGET}"
- name: Set arch
shell: bash
run: echo "arch=$(uname -m)" >> $GITHUB_ENV
- name: Set buildtype
run: echo "buildtype=$(echo ${{matrix.buildtype}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Set cmake buildtype
run: echo "cmake_buildtype=$(echo ${{env.buildtype}} | awk '{print toupper(substr($0,0,1))tolower(substr($0,2))}')" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Unlock keychain
2023-10-22 21:13:28 +02:00
run: security unlock-keychain -p ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
- name: Set prefix path
run: echo "prefix_path=/opt/strawberry_macos_${{env.arch}}_${{env.buildtype}}" >> $GITHUB_ENV
- name: Update PATH
run: echo "${{env.prefix_path}}/bin" >> $GITHUB_PATH
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure CMake
env:
PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig
LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib
run: >
cmake
--log-level="DEBUG"
-S .
-B build
-DCMAKE_BUILD_TYPE="${{env.cmake_buildtype}}"
-DCMAKE_PREFIX_PATH="${{env.prefix_path}}/lib/cmake"
2024-09-23 23:26:58 +02:00
-DBUILD_WERROR=ON
-DUSE_BUNDLE=ON
-DENABLE_DBUS=OFF
-DICU_ROOT="${{env.prefix_path}}"
-DAPPLE_DEVELOPER_ID="383J84DVB6"
-DENABLE_SPOTIFY=$(test -f "${{env.prefix_path}}/lib/gstreamer-1.0/libgstspotify.dylib" && echo "ON" || echo "OFF")
- name: Build
run: cmake --build build --config Release --parallel 4
- name: Install
working-directory: build
run: make install
- name: Deploy
env:
GIO_EXTRA_MODULES: ${{env.prefix_path}}/lib/gio/modules
GST_PLUGIN_SCANNER: ${{env.prefix_path}}/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH: ${{env.prefix_path}}/lib/gstreamer-1.0
LIBSOUP_LIBRARY_PATH: ${{env.prefix_path}}/lib/libsoup-3.0.0.dylib
working-directory: build
run: make deploy
- name: Manually Codesign
working-directory: build
run: codesign -s 383J84DVB6 -f strawberry.app/Contents/Frameworks/png.framework/png strawberry.app
- name: Deploy check
working-directory: build
run: make deploycheck
- name: Verify code-signing
working-directory: build
run: codesign --deep -v strawberry.app
- name: Create DMG
working-directory: build
run: make dmg
- name: Set Upload path
2024-02-11 12:12:54 +01:00
id: set-upload-path
run: |
2024-02-11 00:10:36 +01:00
if [ "${{github.event_name}}" = "release" ]; then
2024-02-11 12:12:54 +01:00
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/stable_releases/macos" >> $GITHUB_OUTPUT
else
2024-02-11 12:12:54 +01:00
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/development_releases/macos" >> $GITHUB_OUTPUT
fi
2024-08-24 23:05:15 +02:00
#- name: Create server path
#run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{steps.set-upload-path.outputs.upload_path}}
2024-08-24 23:05:15 +02:00
#- name: rsync
#run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/*.dmg ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{steps.set-upload-path.outputs.upload_path}}/
2022-09-30 21:31:28 +02:00
build-windows-mingw:
name: Build Windows MinGW
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
2022-09-30 21:31:28 +02:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
2024-09-29 23:45:38 +02:00
arch: [ 'i686', 'x86_64' ]
buildtype: [ 'debug', 'release' ]
2022-09-30 21:31:28 +02:00
container:
image: jonaski/strawberry-mxe-${{matrix.arch}}-${{matrix.buildtype}}
2022-09-30 21:31:28 +02:00
steps:
- name: Set cmake buildtype
shell: bash
run: echo "cmake_buildtype=$(echo ${{matrix.buildtype}} | sed 's/.*/\u&/')" >> $GITHUB_ENV
2023-05-06 15:02:55 +02:00
- name: Checkout
uses: actions/checkout@v4
2022-09-30 21:31:28 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-02-08 22:00:55 +01:00
2022-04-20 01:23:02 +02:00
- name: Add safe git directory
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2022-04-20 01:23:02 +02:00
2022-02-08 22:00:55 +01:00
- name: Create Build Environment
run: cmake -E make_directory build
2022-09-30 21:31:28 +02:00
- name: Link MXE directory
run: ln -s /strawberry-mxe ~/mxe-shared
2022-02-08 22:00:55 +01:00
- name: Run CMake
2022-09-30 21:31:28 +02:00
env:
PKG_CONFIG_PATH: /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/lib/pkgconfig
2022-02-08 22:00:55 +01:00
run: >
2023-05-06 14:18:35 +02:00
cmake
-S .
-B build
2022-09-30 21:31:28 +02:00
-DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-${{matrix.arch}}-w64-mingw32-shared.cmake"
-DCMAKE_BUILD_TYPE="${{env.cmake_buildtype}}"
2022-09-30 21:31:28 +02:00
-DCMAKE_PREFIX_PATH="/strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6"
2024-09-23 23:26:58 +02:00
-DBUILD_WERROR=ON
2022-09-30 21:31:28 +02:00
-DARCH="${{matrix.arch}}"
-DENABLE_WIN32_CONSOLE=$(test "${{matrix.buildtype}}" = "debug" && echo "ON" || echo "OFF")
2022-09-30 21:31:28 +02:00
-DENABLE_DBUS=OFF
-DENABLE_AUDIOCD=OFF
2024-10-03 22:32:51 +02:00
-DENABLE_MTP=OFF
-DENABLE_GPOD=OFF
-DENABLE_SPOTIFY=OFF
2022-02-08 22:00:55 +01:00
- name: Run Make
run: cmake --build build --config "${{env.cmake_buildtype}}" --parallel $(nproc)
2022-08-13 20:40:31 +02:00
- name: Create directories
working-directory: build
2022-09-30 21:31:28 +02:00
run: mkdir -p gio-modules platforms sqldrivers tls imageformats styles gstreamer-plugins nsisplugins
2022-08-13 20:40:31 +02:00
- name: Copy GIO modules
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/lib/gio/modules/{libgiognutls.dll,libgioopenssl.dll} ${GITHUB_WORKSPACE}/build/gio-modules/
2022-08-13 20:40:31 +02:00
- name: Copy Qt platform plugins
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/platforms/qwindows.dll ${GITHUB_WORKSPACE}/build/platforms/
2022-08-13 20:40:31 +02:00
- name: Copy Qt styles
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/styles/qmodernwindowsstyle.dll ${GITHUB_WORKSPACE}/build/styles/
2022-08-13 20:40:31 +02:00
- name: Copy Qt TLS plugins
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/tls/{qschannelbackend.dll,qopensslbackend.dll} ${GITHUB_WORKSPACE}/build/tls/
2022-08-13 20:40:31 +02:00
- name: Copy Qt SQL drivers
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/sqldrivers/qsqlite.dll ${GITHUB_WORKSPACE}/build/sqldrivers/
2022-08-13 20:40:31 +02:00
2022-09-30 21:31:28 +02:00
- name: Copy Qt imageformats
2022-08-13 20:40:31 +02:00
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/imageformats/{qgif.dll,qico.dll,qjpeg.dll} ${GITHUB_WORKSPACE}/build/imageformats/
2022-08-13 20:40:31 +02:00
- name: Copy gstreamer plugins
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/bin/gstreamer-1.0/*.dll ${GITHUB_WORKSPACE}/build/gstreamer-plugins/
2022-08-13 20:40:31 +02:00
2022-09-30 21:31:28 +02:00
- name: Copy extra binaries
2022-08-13 20:40:31 +02:00
working-directory: build
2023-07-18 21:28:39 +02:00
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/bin/{sqlite3.exe,gst-launch-1.0.exe,gst-play-1.0.exe,gst-discoverer-1.0.exe,libsoup-3.0-0.dll,libnghttp2.dll} .
2022-08-13 20:40:31 +02:00
- name: Copy extra binaries (debug)
if: matrix.buildtype == 'debug'
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/bin/{gdb.exe,libreadline8.dll} .
2022-08-13 20:40:31 +02:00
- name: Copy dependencies
working-directory: build
run: >
2022-09-30 21:31:28 +02:00
/strawberry-mxe/tools/copydlldeps.sh
2022-08-13 20:40:31 +02:00
-c
-d .
-F .
-F ./platforms
-F ./styles
2022-09-30 21:31:28 +02:00
-F ./imageformats
2022-08-13 20:40:31 +02:00
-F ./tls
-F ./sqldrivers
-F ./gstreamer-plugins
2022-09-30 21:31:28 +02:00
-R /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared
2022-08-13 20:40:31 +02:00
2022-09-30 21:31:28 +02:00
- name: Strip binaries
if: matrix.buildtype == 'release'
2022-08-13 20:40:31 +02:00
working-directory: build
2022-09-30 21:31:28 +02:00
run: find . -type f \( -iname \*.dll -o -iname \*.exe \) -exec /strawberry-mxe/usr/bin/${{matrix.arch}}-w64-mingw32.shared-strip {} \;
2022-08-13 20:40:31 +02:00
2023-05-01 17:26:12 +02:00
- name: Strip gdb.exe
if: matrix.buildtype == 'debug'
2023-05-01 17:26:12 +02:00
working-directory: build
run: /strawberry-mxe/usr/bin/${{matrix.arch}}-w64-mingw32.shared-strip gdb.exe
2022-09-30 21:31:28 +02:00
- name: Copy nsis files
2022-08-13 20:40:31 +02:00
working-directory: build
2024-11-02 02:37:54 +01:00
run: cp ${GITHUB_WORKSPACE}/dist/windows/*.nsh ${GITHUB_WORKSPACE}/dist/windows/*.ico .
2022-08-13 20:40:31 +02:00
2022-09-30 21:31:28 +02:00
- name: Copy COPYING license file
2022-08-13 20:40:31 +02:00
working-directory: build
2022-09-30 21:31:28 +02:00
run: cp ${GITHUB_WORKSPACE}/COPYING .
2022-08-13 20:40:31 +02:00
2023-08-09 19:40:51 +02:00
- name: List files
working-directory: build
run: ls
- name: Check that all files are included in nsi
shell: bash
working-directory: build
run: |
files_missing=
for i in $(ls -1 *.dll *.exe); do
nsi_file_entry=$(grep -i "^\s\+File\s\+\"$i\"$" strawberry.nsi || true)
if [ "${nsi_file_entry}" = "" ]; then
echo "File ${i} is missing File entry."
fi
nsi_file_delete_entry=$(grep -i "^\s\+Delete\s\+\"\$INSTDIR\\\\$i\"$" strawberry.nsi || true)
if [ "${nsi_file_delete_entry}" = "" ] ; then
echo "File ${i} is missing Delete entry."
fi
if [ "${nsi_file_entry}" = "" ] || [ "${nsi_file_delete_entry}" = "" ] ; then
if [ "${files_missing}" = "" ]; then
files_missing="${i}"
else
files_missing="${files_missing} $i"
fi
fi
done
if ! [ "${files_missing}" = "" ]; then
echo "Files missing in nsi: ${files_missing}"
exit 1
fi
2022-09-30 21:31:28 +02:00
- name: Build Windows installer
2022-02-08 22:00:55 +01:00
working-directory: build
2022-08-13 20:40:31 +02:00
run: makensis strawberry.nsi
2024-07-04 23:22:37 +02:00
- name: Set Upload path
id: set-upload-path
if: github.repository == 'strawberrymusicplayer/strawberry' && (github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/windows')))
run: |
if [ "${{github.event_name}}" = "release" ]; then
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/stable_releases/windows/mingw" >> $GITHUB_OUTPUT
else
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/development_releases/windows/mingw" >> $GITHUB_OUTPUT
fi
- name: SSH Setup
if: steps.set-upload-path.outputs.upload_path != ''
uses: shimataro/ssh-key-action@v2
2023-05-06 15:02:55 +02:00
with:
2024-07-04 23:22:37 +02:00
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: steps.set-upload-path.outputs.upload_path != ''
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{steps.set-upload-path.outputs.upload_path}}
- name: rsync
if: steps.set-upload-path.outputs.upload_path != ''
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/StrawberrySetup*.exe ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{steps.set-upload-path.outputs.upload_path}}/
2023-05-06 15:02:55 +02:00
2022-08-13 20:40:31 +02:00
2022-09-30 21:31:28 +02:00
build-windows-msvc:
name: Build Windows MSVC
2024-10-01 21:10:50 +02:00
if: github.repository != 'strawberrymusicplayer/strawberry-private' && (!(github.event.pusher.name == 'strawbsbot' && contains(github.event.head_commit.message, 'New translations')))
runs-on: windows-2022
2022-09-30 21:31:28 +02:00
strategy:
fail-fast: false
matrix:
2024-09-29 23:45:38 +02:00
arch: [ 'x86', 'x86_64' ]
2024-05-11 23:23:48 +02:00
buildtype: [ 'release' ]
2022-08-13 20:40:31 +02:00
steps:
2023-05-07 05:25:47 +02:00
- name: Set prefix path
2023-05-06 15:02:55 +02:00
shell: bash
run: |
echo "prefix_path_backslash=c:\strawberry_msvc_${{matrix.arch}}_${{matrix.buildtype}}" >> $GITHUB_ENV
echo "prefix_path_forwardslash=c:/strawberry_msvc_${{matrix.arch}}_${{matrix.buildtype}}" >> $GITHUB_ENV
echo "prefix_path_unix=/c/strawberry_msvc_${{matrix.arch}}_${{matrix.buildtype}}" >> $GITHUB_ENV
- name: Set cmake buildtype
shell: bash
run: echo "cmake_buildtype=$(echo ${{matrix.buildtype}} | sed 's/.*/\u&/')" >> $GITHUB_ENV
2022-08-13 20:40:31 +02:00
2024-07-04 23:22:37 +02:00
- name: Install rsync
shell: cmd
run: choco install --no-progress rsync
2024-06-13 23:01:33 +02:00
- name: Cleanup PATH
uses: egor-tensin/cleanup-path@v4
with:
dirs: ${{env.prefix_path_backslash}}\bin;C:\Windows;C:\Windows\system32;C:\Program Files\Git\bin;C:\Program Files\CMake\bin;C:\Program Files\GitHub CLI;C:\ProgramData\Chocolatey\bin;C:\Program Files (x86)\NSIS
- name: Create downloads directory
shell: cmd
run: mkdir downloads
2022-08-13 20:40:31 +02:00
- name: Download Windows MSVC dependencies
shell: cmd
working-directory: downloads
run: curl -f -O -L https://github.com/strawberrymusicplayer/strawberry-msvc-dependencies/releases/latest/download/strawberry-msvc-${{matrix.arch}}-${{matrix.buildtype}}.tar.xz
2022-08-13 20:40:31 +02:00
2023-05-07 05:25:47 +02:00
- name: Extract Windows MSVC dependencies
shell: bash
working-directory: downloads
run: tar -C /c -xf strawberry-msvc-${{matrix.arch}}-${{matrix.buildtype}}.tar.xz
2023-05-07 05:25:47 +02:00
- name: Update PATH
run: echo "${{env.prefix_path_backslash}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Copy bin files
shell: bash
run: cp /c/strawberry/c/bin/{patch.exe,strip.exe,strings.exe,objdump.exe} ${{env.prefix_path_unix}}/bin
- name: Delete conflicting files
shell: bash
2024-06-13 23:01:33 +02:00
run: rm -rf /c/{msys64,mingw32,mingw64} /c/strawberry/c "/c/program files/OpenSSL"
2023-05-07 05:25:47 +02:00
- name: Delete conflicting icu
shell: bash
2024-06-13 23:01:33 +02:00
run: find "/c/program files (x86)/windows kits/" -type f \( -iname 'icu*.lib' -o -iname 'icu*.h' \) -print -delete
2023-05-07 05:25:47 +02:00
- name: Download NSIS LockedList plugin
shell: cmd
working-directory: downloads
run: curl -f -O -L https://nsis.sourceforge.io/mediawiki/images/d/d3/LockedList.zip
2022-08-13 20:40:31 +02:00
- name: Extract NSIS LockedList plugin
shell: cmd
working-directory: downloads
run: 7z x LockedList.zip
2022-08-13 20:40:31 +02:00
- name: Download NSIS Registry plugin
shell: cmd
working-directory: downloads
run: curl -f -O -L https://nsis.sourceforge.io/mediawiki/images/4/47/Registry.zip
2022-08-13 20:40:31 +02:00
- name: Extract NSIS Registry plugin
shell: cmd
working-directory: downloads
run: 7z x Registry.zip
2022-08-13 20:40:31 +02:00
- name: Download NSIS Inetc plugin
shell: cmd
working-directory: downloads
run: curl -f -O -L https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip
2022-08-13 20:40:31 +02:00
- name: Extract NSIS Inetc plugin
shell: cmd
working-directory: downloads
run: 7z x Inetc.zip
2022-08-13 20:40:31 +02:00
- name: Install NSIS plugins
shell: cmd
working-directory: downloads
2022-08-13 20:40:31 +02:00
run: |
copy "Plugins\LockedList64.dll" "C:\Program Files (x86)\NSIS\Plugins\"
copy "Plugins\x86-unicode\LockedList.dll" "C:\Program Files (x86)\NSIS\Plugins\x86-unicode\"
copy "Desktop\Plugin\registry.dll" "C:\Program Files (x86)\NSIS\Plugins\"
copy "Desktop\Plugin\registry.dll" "C:\Program Files (x86)\NSIS\Plugins\x86-unicode\"
copy "Plugins\x86-unicode\INetC.dll" "C:\Program Files (x86)\NSIS\Plugins\x86-unicode\"
2022-08-13 20:40:31 +02:00
2023-05-07 05:25:47 +02:00
- name: Setup MSVC Environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
sdk: 10.0.20348.0
2024-02-23 21:59:06 +01:00
vsversion: 2022
2022-08-13 20:40:31 +02:00
2023-05-07 05:25:47 +02:00
- name: Checkout
uses: actions/checkout@v4
2023-05-07 05:25:47 +02:00
with:
fetch-depth: 0
2023-10-21 05:43:48 +02:00
submodules: recursive
2022-08-13 20:40:31 +02:00
- name: Add safe git directory
shell: bash
2022-09-09 22:29:01 +02:00
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
2022-08-13 20:40:31 +02:00
- name: Create Build Environment
shell: cmd
2022-08-13 20:40:31 +02:00
run: cmake -E make_directory build
2022-09-30 21:31:28 +02:00
- name: Set ENABLE_WIN32_CONSOLE (debug)
if: matrix.buildtype == 'debug'
2022-09-30 21:31:28 +02:00
shell: bash
run: echo "win32_console=ON" >> $GITHUB_ENV
- name: Set ENABLE_WIN32_CONSOLE (release)
if: matrix.buildtype == 'release'
2022-09-30 21:31:28 +02:00
shell: bash
run: echo "win32_console=OFF" >> $GITHUB_ENV
2022-08-13 20:40:31 +02:00
- name: Run CMake
shell: cmd
2022-08-13 20:40:31 +02:00
run: >
2023-05-06 14:18:35 +02:00
cmake
-S .
-B build
2022-08-13 20:40:31 +02:00
-G "Ninja"
-DCMAKE_BUILD_TYPE="${{env.cmake_buildtype}}"
2023-05-07 05:25:47 +02:00
-DCMAKE_PREFIX_PATH="${{env.prefix_path_forwardslash}}/lib/cmake"
2022-09-30 21:31:28 +02:00
-DARCH="${{matrix.arch}}"
-DENABLE_WIN32_CONSOLE=${{env.win32_console}}
2023-05-07 05:25:47 +02:00
-DPKG_CONFIG_EXECUTABLE="${{env.prefix_path_forwardslash}}/bin/pkg-config.exe"
-DICU_ROOT="${{env.prefix_path_forwardslash}}"
2024-11-14 18:19:16 +01:00
-DENABLE_SPOTIFY=ON
2022-08-13 20:40:31 +02:00
- name: Run Make
shell: cmd
2022-08-13 20:40:31 +02:00
env:
CL: "/MP"
run: cmake --build build --config "${{env.cmake_buildtype}}" --parallel 4
2022-08-13 20:40:31 +02:00
2022-02-08 22:00:55 +01:00
- name: Copy extra binaries
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: |
2023-05-07 05:25:47 +02:00
copy ${{env.prefix_path_backslash}}\bin\libssl-3*.dll
copy ${{env.prefix_path_backslash}}\bin\libcrypto-3*.dll
copy ${{env.prefix_path_backslash}}\bin\soup-3.0-0.dll
copy ${{env.prefix_path_backslash}}\bin\gst-launch-1.0.exe
2023-07-18 21:28:39 +02:00
copy ${{env.prefix_path_backslash}}\bin\gst-play-1.0.exe
2023-05-07 05:25:47 +02:00
copy ${{env.prefix_path_backslash}}\bin\gst-discoverer-1.0.exe
copy ${{env.prefix_path_backslash}}\bin\sqlite3.exe
2022-02-08 22:00:55 +01:00
- name: Create directories
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: |
mkdir gio-modules
mkdir platforms
mkdir styles
mkdir tls
mkdir sqldrivers
mkdir imageformats
mkdir gstreamer-plugins
mkdir nsisplugins
- name: Copy GIO modules
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
2024-11-14 22:23:31 +01:00
run: copy ${{env.prefix_path_backslash}}\lib\gio\modules\*.dll .\gio-modules\
2022-02-08 22:00:55 +01:00
- name: Copy Qt platform plugins
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
2023-05-07 05:25:47 +02:00
run: copy ${{env.prefix_path_backslash}}\plugins\platforms\qwindows*.dll .\platforms\
2022-02-08 22:00:55 +01:00
- name: Copy Qt styles
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: copy ${{env.prefix_path_backslash}}\plugins\styles\qmodernwindowsstyle*.dll .\styles\
2022-02-08 22:00:55 +01:00
- name: Copy Qt TLS plugins
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
2023-05-07 05:25:47 +02:00
run: copy ${{env.prefix_path_backslash}}\plugins\tls\*.dll .\tls\
2022-02-08 22:00:55 +01:00
- name: Copy Qt SQL drivers
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
2023-05-07 05:25:47 +02:00
run: copy ${{env.prefix_path_backslash}}\plugins\sqldrivers\qsqlite*.dll .\sqldrivers\
2022-02-08 22:00:55 +01:00
- name: Copy Qt imageformats plugins
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
2023-05-07 05:25:47 +02:00
run: copy ${{env.prefix_path_backslash}}\plugins\imageformats\*.dll .\imageformats\
2022-02-08 22:00:55 +01:00
- name: Copy gstreamer plugins
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\*.dll .\gstreamer-plugins\
2022-02-08 22:00:55 +01:00
- name: Download copydlldeps.sh
shell: bash
working-directory: build
run: curl -f -O -L https://raw.githubusercontent.com/strawberrymusicplayer/strawberry-mxe/master/tools/copydlldeps.sh
2022-02-08 22:00:55 +01:00
- name: Copy dependencies
shell: bash
working-directory: build
run: >
./copydlldeps.sh
-c
-d .
-F .
-F ./platforms
-F ./styles
-F ./tls
-F ./sqldrivers
-F ./imageformats
-F ./gio-modules
-F ./gstreamer-plugins
2023-05-07 05:25:47 +02:00
-R ${{env.prefix_path_unix}}/bin
2022-02-08 22:00:55 +01:00
- name: Copy nsis files
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: |
copy ..\dist\windows\*.nsh .
copy ..\dist\windows\*.ico .
- name: Copy COPYING license file
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: copy ..\COPYING .
2023-05-07 05:25:47 +02:00
- name: List files
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: dir
- name: Check that all files are included in nsi
shell: bash
working-directory: build
run: |
files_missing=
for i in $(ls -1 *.dll *.exe); do
nsi_file_entry=$(grep -i "^\s\+File\s\+\"$i\"$" strawberry.nsi || true)
if [ "${nsi_file_entry}" = "" ]; then
echo "File ${i} is missing File entry."
fi
nsi_file_delete_entry=$(grep -i "^\s\+Delete\s\+\"\$INSTDIR\\\\$i\"$" strawberry.nsi || true)
if [ "${nsi_file_delete_entry}" = "" ] ; then
echo "File ${i} is missing Delete entry."
fi
if [ "${nsi_file_entry}" = "" ] || [ "${nsi_file_delete_entry}" = "" ] ; then
if [ "${files_missing}" = "" ]; then
files_missing="${i}"
else
files_missing="${files_missing} $i"
fi
fi
done
if ! [ "${files_missing}" = "" ]; then
echo "Files missing in nsi: ${files_missing}"
exit 1
fi
2022-02-08 22:00:55 +01:00
- name: Create nsis installer
shell: cmd
2022-02-08 22:00:55 +01:00
working-directory: build
run: makensis strawberry.nsi
2024-07-04 23:22:37 +02:00
- name: Set Upload path
id: set-upload-path
shell: bash
if: github.repository == 'strawberrymusicplayer/strawberry' && (github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/windows')))
run: |
if [ "${{github.event_name}}" = "release" ]; then
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/stable_releases/windows/msvc" >> $GITHUB_OUTPUT
else
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/development_releases/windows/msvc" >> $GITHUB_OUTPUT
fi
- name: SSH Setup
if: steps.set-upload-path.outputs.upload_path != ''
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{secrets.SSH_KNOWN_HOSTS}}" > ~/.ssh/known_hosts
echo "${{secrets.SSH_KEY}}" > ~/.ssh/id_rsa
- name: Create server path
if: steps.set-upload-path.outputs.upload_path != ''
shell: bash
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{steps.set-upload-path.outputs.upload_path}}
- name: rsync
if: steps.set-upload-path.outputs.upload_path != ''
shell: bash
run: rsync -e "/c/ProgramData/chocolatey/lib/rsync/tools/bin/ssh.exe -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/StrawberrySetup*.exe ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{steps.set-upload-path.outputs.upload_path}}/
2022-02-08 22:00:55 +01:00
2020-08-26 22:35:18 +02:00
2024-02-11 12:12:54 +01:00
upload:
name: Upload
if: (success() || failure()) && github.repository == 'strawberrymusicplayer/strawberry' && (github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')))
runs-on: ubuntu-latest
2022-02-08 22:00:55 +01:00
needs:
2024-02-11 12:12:54 +01:00
- build-opensuse
- build-fedora
2024-07-05 00:05:18 +02:00
- build-mageia
2024-02-11 12:12:54 +01:00
- build-debian
- build-ubuntu
2022-02-08 22:00:55 +01:00
steps:
2024-02-11 12:12:54 +01:00
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt install -y git rsync
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
2023-05-06 15:02:55 +02:00
- name: Download artifacts
uses: actions/download-artifact@v4
2022-02-08 22:00:55 +01:00
with:
2024-02-11 12:12:54 +01:00
path: artifacts
2024-07-05 00:05:18 +02:00
- name: SSH Setup
2022-02-08 22:00:55 +01:00
uses: shimataro/ssh-key-action@v2
with:
2023-05-06 15:02:55 +02:00
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{secrets.SSH_KEY}}
2024-02-11 12:12:54 +01:00
- name: Upload
run: |
for i in $(find artifacts -type f); do
if [ "${{github.event_name}}" = "release" ]; then
upload_path="${{secrets.RELEASES_PATH}}/"
else
distro=$(echo "$i" | cut -d '/' -f 2)
2024-09-17 23:15:01 +02:00
if [ -z "$(echo "${distro}" | grep '-' || true)" ]; then
2024-02-11 12:12:54 +01:00
upload_path="${{secrets.BUILDS_PATH}}/${distro}/"
else
distro_name=$(echo "${distro}" | cut -d '-' -f 1)
distro_version=$(echo "${distro}" | cut -d '-' -f 2)
upload_path="${{secrets.BUILDS_PATH}}/${distro_name}/${distro_version}/"
fi
fi
ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${upload_path}
rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var $i ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${upload_path}/
done
2023-05-07 02:24:39 +02:00
2024-02-11 12:12:54 +01:00
attach:
name: Attach to release
if: (success() || failure()) && github.event_name == 'release'
runs-on: ubuntu-latest
2023-05-07 02:24:39 +02:00
needs:
- build-opensuse
- build-fedora
2024-04-06 21:10:49 +02:00
- build-mageia
2023-05-07 02:24:39 +02:00
- build-debian
- build-ubuntu
steps:
2023-10-11 17:37:47 +02:00
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
2024-02-24 01:18:02 +01:00
run: sudo apt install -y git jq gh
2023-05-07 02:24:39 +02:00
- name: Checkout
uses: actions/checkout@v4
2023-05-07 02:24:39 +02:00
with:
fetch-depth: 0
- name: Show release assets
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2024-02-24 01:18:02 +01:00
run: gh release view "${{github.event.release.tag_name}}" --json assets | jq -r '.assets[].name'
2023-05-07 02:24:39 +02:00
- name: Download artifacts
uses: actions/download-artifact@v4
2023-05-07 02:24:39 +02:00
with:
path: artifacts
- name: Add artifacts to release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
2024-02-11 01:19:39 +01:00
echo "Release version: ${{github.event.release.tag_name}}"
filenames=()
2024-02-24 01:18:02 +01:00
files=()
2023-05-07 02:24:39 +02:00
for i in $(find artifacts -type f); do
filename=$(basename $i)
if [[ ${filenames[@]} =~ ${filename} ]]; then
echo "Skipping duplicate file: ${filename}"
continue
fi
filenames+=("${filename}")
2024-02-24 01:18:02 +01:00
existing_asset=$(gh release view "${{github.event.release.tag_name}}" --json assets | jq -r '.assets[].name' | tr -d '[:blank:]' | grep ".*/${filename}\$" 2>/dev/null || true)
2023-05-07 02:24:39 +02:00
if [ "${existing_asset}" = "" ]; then
echo "Adding file: ${filename}"
2024-02-24 01:18:02 +01:00
files+=("${i}")
2023-05-07 02:24:39 +02:00
else
echo "Release already has file: ${filename}"
2023-05-07 02:24:39 +02:00
fi
done
2024-02-24 01:18:02 +01:00
files_list="${files[@]}"
if ! [ "${files_list}" = "" ]; then
2024-02-11 12:12:54 +01:00
echo "Adding files to GitHub release"
2024-02-24 01:18:02 +01:00
gh release upload "${{github.event.release.tag_name}}" ${files_list}
2023-05-07 02:24:39 +02:00
fi