2023-02-21 18:43:01 +01:00
name : Build
2019-11-24 20:04:05 +01:00
on : [ push, pull_request]
jobs :
2023-05-06 15:02:55 +02:00
build-opensuse :
2022-09-30 21:31:28 +02:00
name : Build openSUSE
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 :
2023-04-28 21:28:24 +02:00
opensuse_version : [ 'tumbleweed' , 'leap:15.4' , 'leap:15.5' ]
2022-09-30 21:31:28 +02:00
qt_version : [ 'qt5' , 'qt6' ]
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 : Add tagparser repo
if : matrix.opensuse_version == 'tumbleweed'
run : zypper -n ar -c -f -n 'repo-tagparser' https://download.opensuse.org/repositories/home:/mkittler/openSUSE_Tumbleweed/ repo-tagparser
- 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
- name : Install gcc
if : matrix.opensuse_version == 'tumbleweed'
run : zypper -n --gpg-auto-import-keys in gcc gcc-c++
- name : Install gcc10
if : matrix.opensuse_version != 'tumbleweed'
run : zypper -n --gpg-auto-import-keys in gcc10 gcc10-c++
- 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
gettext-tools
2023-05-06 15:02:55 +02:00
rsync
2020-05-30 03:49:37 +02:00
glibc-devel
libboost_headers-devel
boost-devel
glib2-devel
glib2-tools
dbus-1-devel
alsa-devel
libnotify-devel
protobuf-devel
sqlite3-devel
libpulse-devel
gstreamer-devel
gstreamer-plugins-base-devel
vlc-devel
2021-02-26 22:36:26 +01:00
taglib-devel
2022-07-28 04:01:58 +02:00
libicu-devel
2022-09-30 21:31:28 +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
desktop-file-utils
update-desktop-files
appstream-glib
hicolor-icon-theme
- name : Install Qt 5
if : matrix.qt_version == 'qt5'
run : >
zypper -n --gpg-auto-import-keys in
2020-05-30 03:49:37 +02:00
libQt5Core-devel
libQt5Gui-devel
libQt5Widgets-devel
libQt5Concurrent-devel
libQt5Network-devel
libQt5Sql-devel
libQt5DBus-devel
libQt5Test-devel
libqt5-qtbase-common-devel
libQt5Sql5-sqlite
libqt5-linguist-devel
2021-08-14 16:40:37 +02:00
libqt5-qtx11extras-devel
2022-09-30 21:31:28 +02:00
- name : Install Qt 6
if : matrix.qt_version == 'qt6'
run : >
zypper -n --gpg-auto-import-keys in
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
- name : Install tagparser
if : matrix.opensuse_version == 'tumbleweed'
run : zypper -n --gpg-auto-import-keys in tagparser-devel
2023-05-06 15:02:55 +02:00
- name : Checkout
uses : actions/checkout@v3
2022-08-09 23:03:24 +02:00
with :
fetch-depth : 0
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 -DUSE_TAGLIB=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 :
CC : gcc-10
CXX : g++-10
run : rpmbuild -ba ../dist/unix/strawberry.spec
2023-05-06 15:02:55 +02:00
- name : Set opensuse subdir
run : echo "opensuse_subdir=$(echo ${{matrix.opensuse_version}} | sed 's/leap:/lp/g' | sed 's/\.//g')" > $GITHUB_ENV
- name : Upload artifacts
if : matrix.opensuse_version != 'tumbleweed'
uses : actions/upload-artifact@v3
with :
name : opensuse-${{env.opensuse_subdir}}
path : |
/usr/src/packages/SOURCES/*.xz
/usr/src/packages/SRPMS/*.rpm
/usr/src/packages/RPMS/x86_64/*.rpm
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/source ${{secrets.BUILDS_PATH}}/opensuse/${{env.opensuse_subdir}}
- name : rsync source
2023-05-07 12:39:35 +02:00
if : (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci') && matrix.opensuse_version == 'tumbleweed' && matrix.qt_version == 'qt6'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /usr/src/packages/SOURCES/*.xz ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/source/
2023-05-06 15:02:55 +02:00
- name : rsync rpms
if : (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci') && matrix.opensuse_version != 'tumbleweed'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /usr/src/packages/SRPMS/*.rpm /usr/src/packages/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/opensuse/${{env.opensuse_subdir}}/
build-fedora :
2022-09-30 21:31:28 +02:00
name : Build Fedora
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 :
2023-07-02 01:02:10 +02:00
fedora_version : [ '37' , '38' , '39' ]
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
- name : Fix dnf
run : |
if [ -f "/usr/bin/dnf5" ] && ! [ -f "/usr/bin/dnf" ]; then
ln -s /usr/bin/dnf5 /usr/bin/dnf
fi
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 : >
2023-08-11 17:03:39 +02:00
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
gettext
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
dbus-devel
2020-05-30 03:49:37 +02:00
protobuf-devel
2022-09-30 21:31:28 +02:00
protobuf-compiler
sqlite-devel
alsa-lib-devel
pulseaudio-libs-devel
libnotify-devel
2022-07-28 04:01:58 +02:00
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-05-06 15:02:55 +02:00
- name : Checkout
uses : actions/checkout@v3
2022-08-09 23:03:24 +02:00
with :
fetch-depth : 0
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@v3
with :
name : fedora-${{matrix.fedora_version}}
path : |
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/fedora/${{matrix.fedora_version}}
- name : rsync
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /github/home/rpmbuild/SRPMS/*.rpm /github/home/rpmbuild/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/fedora/${{matrix.fedora_version}}/
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
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 :
2023-06-24 00:56:28 +02:00
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 :
2022-09-30 21:31:28 +02:00
- name : Update repositories
2023-02-21 18:43:01 +01:00
run : dnf update -y
2022-09-30 21:31:28 +02:00
- name : Upgrade packages
2023-02-21 18:43:01 +01:00
run : dnf upgrade -y
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
2022-09-30 21:31:28 +02:00
glibc
gcc-c++
git
gnutar
make
cmake
glib
gettext
lsb-release
rpmdevtools
rpm-build
2023-05-06 15:02:55 +02:00
rsync
2022-09-30 21:31:28 +02:00
glibc-devel
boost-devel
dbus-devel
protobuf-devel
protobuf-compiler
sqlite-devel
libasound-devel
pulseaudio-devel
lib64GL-devel
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
qt6-qttools
desktop-file-utils
appstream
appstream-util
hicolor-icon-theme
2023-05-06 15:02:55 +02:00
- name : Checkout
uses : actions/checkout@v3
2022-08-09 23:03:24 +02:00
with :
fetch-depth : 0
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
uses : actions/upload-artifact@v3
with :
name : openmandriva-${{matrix.openmandriva_version}}
path : |
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
- name : SSH key setup
2023-06-24 00:56:28 +02:00
if : matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
2023-06-24 00:56:28 +02:00
if : matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
2023-05-06 15:02:55 +02:00
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/openmandriva/${{matrix.openmandriva_version}}
- name : rsync
2023-06-24 00:56:28 +02:00
if : matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
2023-05-06 15:02:55 +02:00
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /github/home/rpmbuild/SRPMS/*.rpm /github/home/rpmbuild/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/openmandriva/${{matrix.openmandriva_version}}/
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
runs-on : ubuntu-latest
strategy :
fail-fast : false
matrix :
mageia_version : [ '8' ]
container :
image : mageia:${{matrix.mageia_version}}
steps :
- name : Update repositories
run : urpmi.update --auto -a
- 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
gettext
2023-05-06 15:02:55 +02:00
rsync
2023-05-06 14:08:34 +02:00
lib64boost-devel
lib64protobuf-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
protobuf-compiler
desktop-file-utils
appstream-util
hicolor-icon-theme
- name : Install Qt 5
if : matrix.mageia_version == '8'
run : urpmi --auto --force urpmi-debuginfo-install lib64qt5core-devel lib64qt5gui-devel lib64qt5widgets-devel lib64qt5network-devel lib64qt5concurrent-devel lib64qt5sql-devel lib64qt5dbus-devel lib64qt5help-devel lib64qt5test-devel lib64qt5x11extras-devel
- name : Install Qt 6
if : matrix.mageia_version == 'cauldron'
run : urpmi --auto --force urpmi-debuginfo-install lib64qt6core-devel lib64qt6gui-devel lib64qt6widgets-devel lib64qt6network-devel lib64qt6concurrent-devel lib64qt6sql-devel lib64qt6dbus-devel lib64qt6help-devel lib64qt6test-devel
2023-05-06 15:02:55 +02:00
- name : Checkout
uses : actions/checkout@v3
2023-05-06 14:08:34 +02:00
with :
fetch-depth : 0
- 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@v3
with :
name : mageia-${{matrix.mageia_version}}
path :
/github/home/rpmbuild/SRPMS/*.rpm
/github/home/rpmbuild/RPMS/x86_64/*.rpm
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/mageia/${{matrix.mageia_version}}
- name : rsync
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var /github/home/rpmbuild/SRPMS/*.rpm /github/home/rpmbuild/RPMS/x86_64/*.rpm ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/mageia/${{matrix.mageia_version}}/
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
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 :
2023-06-24 00:58:43 +02:00
debian_version : [ 'bullseye' , '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 :
2022-09-30 21:31:28 +02:00
- name : Update repositories
2023-02-21 18:43:01 +01:00
run : apt update -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
ssh
2022-03-05 12:13:34 +01:00
git
make
cmake
gcc
2022-09-30 21:31:28 +02:00
g++
pkg-config
fakeroot
gettext
2022-03-05 12:13:34 +01:00
lsb-release
2023-05-06 15:02:55 +02:00
rsync
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
libdbus-1-dev
libboost-dev
libprotobuf-dev
protobuf-compiler
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
- name : Install Qt 5
2022-01-29 01:33:40 +01:00
if : matrix.debian_version == 'bullseye'
2022-09-30 21:31:28 +02:00
env :
DEBIAN_FRONTEND : noninteractive
2023-02-21 18:43:01 +01:00
run : apt install -y qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools libqt5x11extras5-dev
2022-09-30 21:31:28 +02:00
- name : Install Qt 6
2022-01-29 01:33:40 +01:00
if : matrix.debian_version != 'bullseye'
2022-09-30 21:31:28 +02:00
env :
DEBIAN_FRONTEND : noninteractive
2023-02-21 18:43:01 +01:00
run : apt install -y 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@v3
2022-08-09 23:03:24 +02:00
with :
fetch-depth : 0
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@v3
with :
name : debian-${{matrix.debian_version}}
path : "*.deb"
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/debian/${{matrix.debian_version}}
- name : rsync
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var *.deb ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/debian/${{matrix.debian_version}}/
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
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 :
2023-08-03 20:14:54 +02:00
ubuntu_version : [ 'focal' , 'jammy' , 'lunar' , 'mantic' ]
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 :
2023-02-21 18:43:01 +01:00
- name : Update repositories
run : apt update -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
ssh
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
gettext
lsb-release
2023-05-06 15:02:55 +02:00
rsync
2022-09-30 21:31:28 +02:00
dpkg-dev
libglib2.0-dev
libboost-dev
libdbus-1-dev
libprotobuf-dev
protobuf-compiler
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
- name : Install Qt 5
2022-01-29 01:33:40 +01:00
if : matrix.ubuntu_version == 'focal'
2022-09-30 21:31:28 +02:00
env :
DEBIAN_FRONTEND : noninteractive
2023-02-21 18:43:01 +01:00
run : apt install -y qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools libqt5x11extras5-dev
2022-09-30 21:31:28 +02:00
- name : Install Qt 6
2022-01-29 01:33:40 +01:00
if : matrix.ubuntu_version != 'focal'
2022-09-30 21:31:28 +02:00
env :
DEBIAN_FRONTEND : noninteractive
2023-02-21 18:43:01 +01:00
run : apt install -y 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@v3
2022-08-09 23:03:24 +02:00
with :
fetch-depth : 0
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@v3
with :
name : ubuntu-${{matrix.ubuntu_version}}
path : |
*.deb
*.ddeb
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/ubuntu/${{matrix.ubuntu_version}}
- name : rsync
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var *.deb *.ddeb ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/ubuntu/${{matrix.ubuntu_version}}/
2021-10-09 00:26:05 +02:00
2023-05-07 02:27:46 +02:00
upload-ubuntu-ppa :
name : Upload Ubuntu PPA
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
runs-on : ubuntu-latest
strategy :
fail-fast : false
matrix :
2023-08-03 20:14:54 +02:00
ubuntu_version : [ 'focal' , 'jammy' , 'lunar' , 'mantic' ]
2023-05-07 02:27:46 +02:00
container :
image : ubuntu:${{matrix.ubuntu_version}}
steps :
- name : Update repositories
run : apt update -y
- name : Install packages
env :
DEBIAN_FRONTEND : noninteractive
run : >
apt install -y
git
ssh
build-essential
dh-make
make
cmake
pkg-config
gcc
g++
fakeroot
gettext
lsb-release
gpg
dput
dpkg-dev
libglib2.0-dev
libboost-dev
libdbus-1-dev
libprotobuf-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
gstreamer1.0-alsa
gstreamer1.0-pulseaudio
protobuf-compiler
- name : Install Qt 5
if : matrix.ubuntu_version == 'focal'
env :
DEBIAN_FRONTEND : noninteractive
run : apt install -y qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools libqt5x11extras5-dev
- name : Install Qt 6
if : matrix.ubuntu_version != 'focal'
env :
DEBIAN_FRONTEND : noninteractive
run : apt install -y qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
- name : Checkout
uses : actions/checkout@v3
with :
fetch-depth : 0
- 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@v5
with :
gpg_private_key : ${{secrets.UBUNTU_PPA_GPG_PRIVATE_KEY}}
- name : dpkg-buildpackage
run : dpkg-buildpackage -S -d -k573D197B5EA20EDF
- name : Upload Unstable PPA
run : dput ppa:jonaski/strawberry-unstable ../*_source.changes
2023-07-12 14:25:59 +02:00
- name : Set is release
run : echo "is_release=$(grep '^\s*set\s*(\s*INCLUDE_GIT_REVISION\s\+OFF\s*)\s*$' cmake/Version.cmake >/dev/null 2>&1 && echo 1 || echo 0)" >> $GITHUB_ENV
2023-05-07 02:27:46 +02:00
- name : Get release version
run : echo "release_version=$(git describe --tags --exact-match ${GITHUB_SHA} 2>/dev/null | head -1)" >> $GITHUB_ENV
- name : Upload Stable PPA
2023-07-12 14:25:59 +02:00
if : env.is_release == '1' && env.release_version != ''
2023-07-12 14:22:15 +02:00
run : dput ppa:jonaski/strawberry ../*_source.changes
2023-05-07 02:27:46 +02:00
2023-04-29 21:11:05 +02:00
build-macos-homebrew :
name : Build macOS Homebrew
2022-12-29 20:14:14 +01:00
runs-on : macos-11
2022-09-30 21:31:28 +02:00
steps :
2022-02-08 22:00:55 +01:00
2022-10-10 23:11:19 +02:00
- name : Remove packages
2023-08-10 01:40:51 +02:00
run : brew remove aliyun-cli ant aws-sam-cli azure-cli bazelisk bicep composer geckodriver ghostscript helm httpd imagemagick kotlin maven mongodb-community@5.0 mongodb-database-tools mongosh nginx php postgresql@14 ruby@2.7 rustup-init sbt selenium-server swiftformat switchaudio-osx firefox google-chrome julia microsoft-edge r session-manager-plugin
2022-10-10 23:11:19 +02:00
2022-10-10 22:31:35 +02:00
- name : Update packages
run : brew update
- name : Upgrade packages
2022-12-29 20:14:14 +01:00
run : brew upgrade || true
2022-10-10 22:31:35 +02:00
2023-08-27 01:31:39 +02:00
- name : brew tap
run : brew tap homebrew/core
2022-09-30 21:31:28 +02:00
- name : Install packages
2022-03-17 00:06:18 +01:00
run : |
2023-05-06 15:02:55 +02:00
brew install pkg-config cmake ninja meson bison flex wget create-dmg gettext boost protobuf protobuf-c rsync
2022-09-30 21:31:28 +02:00
brew install glib glib-openssl glib-utils glib-networking gdk-pixbuf gobject-introspection orc
2023-07-18 19:20:51 +02:00
brew install libffi openssl sqlite fftw libmtp libplist libxml2 libsoup
2023-06-27 04:06:30 +02:00
brew install libogg libvorbis flac wavpack opus speex mpg123 lame twolame taglib chromaprint libebur128 libbs2b libcdio libopenmpt faad2 faac fdk-aac musepack game-music-emu
2022-09-30 21:31:28 +02:00
brew install qt6
2022-02-08 22:00:55 +01:00
2022-09-30 21:31:28 +02:00
- name : Use modified gstreamer plugin formulas
2022-03-17 00:06:18 +01:00
run : |
2022-09-30 21:31:28 +02:00
wget https://files.strawberrymusicplayer.org/patches/gstreamer.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-base.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-good.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-bad.rb
wget https://files.strawberrymusicplayer.org/patches/gst-plugins-ugly.rb
wget https://files.strawberrymusicplayer.org/patches/gst-libav.rb
2023-08-27 01:31:39 +02:00
mv gstreamer.rb gst-plugins-{base,good,bad,ugly}.rb gst-libav.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/g/
2022-02-08 22:00:55 +01:00
2022-09-30 21:31:28 +02:00
- name : Build and install gstreamer
2023-03-07 00:24:19 +01:00
env :
HOMEBREW_NO_INSTALL_FROM_API : 1
2022-10-10 22:31:35 +02:00
run : brew reinstall --build-from-source gstreamer
2022-02-08 22:00:55 +01:00
2022-09-30 21:31:28 +02:00
- name : Build and install gst-plugins-base
2023-03-07 00:24:19 +01:00
env :
HOMEBREW_NO_INSTALL_FROM_API : 1
2022-10-10 22:31:35 +02:00
run : brew reinstall --build-from-source gst-plugins-base
2022-04-20 01:23:02 +02:00
2022-09-30 21:31:28 +02:00
- name : Build and install gst-plugins-good
2023-03-07 00:24:19 +01:00
env :
HOMEBREW_NO_INSTALL_FROM_API : 1
2022-10-10 22:31:35 +02:00
run : brew reinstall --build-from-source gst-plugins-good
2022-02-08 22:00:55 +01:00
2022-09-30 21:31:28 +02:00
- name : Build and install gst-plugins-bad
2023-03-07 00:24:19 +01:00
env :
HOMEBREW_NO_INSTALL_FROM_API : 1
2022-10-10 22:31:35 +02:00
run : brew reinstall --build-from-source gst-plugins-bad
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Build and install gst-plugins-ugly
2023-03-07 00:24:19 +01:00
env :
HOMEBREW_NO_INSTALL_FROM_API : 1
2022-10-10 22:31:35 +02:00
run : brew reinstall --build-from-source gst-plugins-ugly
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Build and install gst-libav
2023-03-07 00:24:19 +01:00
env :
HOMEBREW_NO_INSTALL_FROM_API : 1
2022-10-10 22:31:35 +02:00
run : brew reinstall --build-from-source gst-libav
2022-03-17 00:06:18 +01:00
2023-08-13 12:19:14 +02:00
- name : Fix rpaths
run : |
sudo install_name_tool -change "@loader_path/../../../../opt/freetype/lib/libfreetype.6.dylib" "/usr/local/opt/freetype/lib/libfreetype.6.dylib" /usr/local/lib/libharfbuzz.0.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/glib/lib/libglib-2.0.0.dylib" "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" /usr/local/lib/libharfbuzz.0.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/graphite2/lib/libgraphite2.3.dylib" "/usr/local/opt/graphite2/lib/libgraphite2.3.dylib" /usr/local/lib/libharfbuzz.0.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/gettext/lib/libintl.8.dylib" "/usr/local/opt/gettext/lib/libintl.8.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/p11-kit/lib/libp11-kit.0.dylib" "/usr/local/opt/p11-kit/lib/libp11-kit.0.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libidn2/lib/libidn2.0.dylib" "/usr/local/opt/libidn2/lib/libidn2.0.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libunistring/lib/libunistring.5.dylib" "/usr/local/opt/libunistring/lib/libunistring.5.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libtasn1/lib/libtasn1.6.dylib" "/usr/local/opt/libtasn1/lib/libtasn1.6.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/nettle/lib/libnettle.8.dylib" "/usr/local/opt/nettle/lib/libnettle.8.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/nettle/lib/libhogweed.6.dylib" "/usr/local/opt/nettle/lib/libhogweed.6.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/gmp/lib/libgmp.10.dylib" "/usr/local/opt/gmp/lib/libgmp.10.dylib" /usr/local/lib/libgnutls.30.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/leptonica/lib/libleptonica.6.dylib" "/usr/local/opt/leptonica/lib/libleptonica.6.dylib" /usr/local/lib/libtesseract.5.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libarchive/lib/libarchive.13.dylib" "/usr/local/opt/leptonica/lib/libarchive.13.dylib" /usr/local/lib/libtesseract.5.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libsamplerate/lib/libsamplerate.0.dylib" "/usr/local/opt/libsamplerate/lib/libsamplerate.0.dylib" /usr/local/lib/librubberband.2.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libpng/lib/libpng16.16.dylib" "/usr/local/opt/libpng/lib/libpng16.16.dylib" /usr/local/lib/libleptonica.6.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/jpeg-turbo/lib/libjpeg.8.dylib" "/usr/local/opt/jpeg-turbo/lib/libjpeg.8.dylib" /usr/local/lib/libleptonica.6.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/giflib/lib/libgif.dylib" "/usr/local/opt/giflib/lib/libgif.dylib" /usr/local/lib/libleptonica.6.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/libtiff/lib/libtiff.6.dylib" "/usr/local/opt/libtiff/lib/libtiff.6.dylib" /usr/local/lib/libleptonica.6.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/webp/lib/libwebp.7.dylib" "/usr/local/opt/webp/lib/libwebp.7.dylib" /usr/local/lib/libleptonica.6.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/webp/lib/libwebpmux.3.dylib" "/usr/local/opt/webp/lib/libwebpmux.3.dylib" /usr/local/lib/libleptonica.6.dylib
sudo install_name_tool -change "@loader_path/../../../../opt/openjpeg/lib/libopenjp2.7.dylib" "/usr/local/opt/openjpeg/lib/libopenjp2.7.dylib" /usr/local/lib/libleptonica.6.dylib
2022-09-30 21:31:28 +02:00
- name : Build libgpod
env :
PERL_MM_USE_DEFAULT : 1
2022-03-17 00:06:18 +01:00
run : |
2022-09-30 21:31:28 +02:00
git clone https://github.com/strawberrymusicplayer/strawberry-libgpod
cd strawberry-libgpod
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 4
sudo make install
2022-03-17 00:06:18 +01:00
2023-05-06 15:02:55 +02:00
- name : Checkout
uses : actions/checkout@v3
2022-09-30 21:31:28 +02:00
with :
fetch-depth : 0
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Create Build Environment
run : cmake -E make_directory build
2022-12-05 18:14:40 +01:00
2022-09-30 21:31:28 +02:00
- name : Configure CMake
env :
2023-06-03 19:10:57 +02:00
MACOSX_DEPLOYMENT_TARGET : 11.0
2022-09-30 21:31:28 +02:00
PKG_CONFIG_PATH : /usr/local/lib/pkgconfig
GIO_EXTRA_MODULES : /usr/local/lib/gio/modules
GST_PLUGIN_SCANNER : /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH : /usr/local/lib/gstreamer-1.0
2023-07-11 13:42:15 +02:00
run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake -DICU_ROOT=/usr/local/opt/icu4c -DENABLE_DBUS=OFF -DPROTOBUF_INCLUDE_DIRS=/usr/local/include
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Build
2023-05-06 14:18:35 +02:00
run : cmake --build build --config Release --parallel 4
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Install
2022-03-17 00:06:18 +01:00
working-directory : build
2022-09-30 21:31:28 +02:00
run : make install
2022-03-17 00:06:18 +01:00
2022-11-09 23:22:08 +01:00
- name : Remove problematic files
run : |
sudo rm -rf /usr/local/opt/qt6/share/qt/plugins/virtualkeyboard /usr/local/opt/qt6/share/qt/plugins/platforminputcontexts
sudo rm -f /usr/local/Cellar/qt/*/share/qt/plugins/imageformats/libqpdf.dylib
2022-09-30 21:31:28 +02:00
- name : Manually copy files not handled by macdeployqt
2022-03-17 00:06:18 +01:00
working-directory : build
run : |
2022-09-30 21:31:28 +02:00
mkdir -p strawberry.app/Contents/Frameworks/
cp /usr/local/lib/libsoup-3.0.0.dylib strawberry.app/Contents/Frameworks/
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Deploy
2022-03-17 00:06:18 +01:00
working-directory : build
2022-09-30 21:31:28 +02:00
run : make deploy
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Deploy check
2022-03-17 00:06:18 +01:00
working-directory : build
2022-09-30 21:31:28 +02:00
run : make deploycheck
2022-03-17 00:06:18 +01:00
2022-09-30 21:31:28 +02:00
- name : Create DMG
2022-03-17 00:06:18 +01:00
working-directory : build
2022-09-30 21:31:28 +02:00
run : make dmg
2022-03-17 00:06:18 +01:00
2023-05-06 15:02:55 +02:00
- name : Upload artifacts
uses : actions/upload-artifact@v3
with :
name : macos
path : build/*.dmg
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
2022-02-08 22:00:55 +01:00
with :
2023-05-06 15:02:55 +02:00
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/macos
- name : rsync
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/*.dmg ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/macos/
2022-02-08 22:00:55 +01:00
2022-03-17 00:06:18 +01:00
2023-04-29 21:11:05 +02:00
build-macos-macports :
name : Build macOS Macports
2023-06-03 15:50:53 +02:00
runs-on : macos-11
2023-04-29 21:11:05 +02:00
steps :
- name : Install macports
run : |
2023-06-03 19:11:18 +02:00
macports_version=$(wget -q -O- 'https://github.com/macports/macports-base' | sed -n 's,.*releases/tag/\([^"&;]*\)".*,\1,p' | sed 's/^v//g' | sort -V | tail -1)
wget https://github.com/macports/macports-base/releases/download/v${macports_version}/MacPorts-${macports_version}-11-BigSur.pkg
sudo installer -pkg ./MacPorts-${macports_version}-11-BigSur.pkg -target /
2023-04-29 21:11:05 +02:00
- name : Uninstall homebrew
run : |
curl -sLO https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh
chmod +x ./uninstall.sh
sudo ./uninstall.sh --force
- name : Update macports
run : sudo /opt/local/bin/port -v selfupdate
- name : Install packages
2023-07-18 19:20:51 +02:00
run : sudo /opt/local/bin/port -N -p install wget gettext glib2 pkgconfig cmake boost protobuf-cpp sqlite3 chromaprint libebur128 fftw taglib libcdio libmtp
2023-04-29 21:11:05 +02:00
- name : Install gstreamer
run : sudo /opt/local/bin/port -N -p install gstreamer1 gstreamer1-gst-plugins-base gstreamer1-gst-plugins-good gstreamer1-gst-plugins-bad gstreamer1-gst-plugins-ugly gstreamer1-gst-libav
- name : Install gst-plugins-bad
run : sudo /opt/local/bin/port -N -p install gstreamer1-gst-plugins-bad +faac
- name : Install qt6-qtbase
run : sudo /opt/local/bin/port -N -p install qt6-qtbase
- name : Install qt6-qttools
run : sudo /opt/local/bin/port -N -p install qt6-qttools || true
- name : Install qt6-sqlite-plugin
run : sudo /opt/local/bin/port -N -p install qt6-sqlite-plugin
- name : Install libgpod
run : sudo /opt/local/bin/port -N -p install libgpod || true
2023-06-04 00:14:51 +02:00
- name : Add /opt/local/bin to PATH
run : echo "/opt/local/bin" >> $GITHUB_PATH
2023-04-29 21:11:05 +02:00
- name : Install create-dmg
shell : bash
run : |
mkdir -p ~/build
cd ~/build
git clone https://github.com/create-dmg/create-dmg
cd create-dmg
sudo make install
2023-05-06 15:02:55 +02:00
- name : Checkout
uses : actions/checkout@v3
2023-04-29 21:11:05 +02:00
with :
fetch-depth : 0
- name : Create Build Environment
run : /opt/local/bin/cmake -E make_directory build
- name : Configure CMake
env :
2023-06-03 19:10:57 +02:00
MACOSX_DEPLOYMENT_TARGET : 11.0
2023-04-29 21:11:05 +02:00
PKG_CONFIG_PATH : /opt/local/lib/pkgconfig
GIO_EXTRA_MODULES : /opt/local/lib/gio/modules
GST_PLUGIN_SCANNER : /opt/local/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH : /opt/local/lib/gstreamer-1.0
2023-05-06 14:18:35 +02:00
run : /opt/local/libexec/qt6/bin/qt-cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DENABLE_DBUS=OFF
2023-04-29 21:11:05 +02:00
- name : Build
2023-05-06 14:18:35 +02:00
run : /opt/local/bin/cmake --build build --config Release --parallel 4
2023-04-29 21:11:05 +02:00
- name : Install
working-directory : build
run : make install
- name : Fix macdeployqt and macdeploycheck
working-directory : build
run : |
install_name_tool -change "@rpath/QtCore.framework/Versions/A/QtCore" "/opt/local/libexec/qt6/lib/QtCore.Framework/Versions/A/QtCore" 3rdparty/macdeployqt/macdeployqt
install_name_tool -change "@rpath/QtCore.framework/Versions/A/QtCore" "/opt/local/libexec/qt6/lib/QtCore.Framework/Versions/A/QtCore" ext/macdeploycheck/macdeploycheck
- name : Deploy
working-directory : build
run : make deploy
- name : Deploy check
working-directory : build
run : make deploycheck
- name : Create DMG
working-directory : build
run : make dmg
2022-09-30 21:31:28 +02:00
build-windows-mingw :
name : Build Windows MinGW
runs-on : ubuntu-latest
strategy :
fail-fast : false
matrix :
arch : [ 'i686' , 'x86_64' ]
build_type : [ 'debug' , 'release' ]
container :
2023-02-20 06:30:22 +01:00
image : jonaski/strawberry-mxe-${{matrix.arch}}-${{matrix.build_type}}
2022-09-30 21:31:28 +02:00
steps :
2023-05-06 15:02:55 +02:00
- name : Install rsync
run : zypper -n --gpg-auto-import-keys in rsync
- name : Checkout
uses : actions/checkout@v3
2022-09-30 21:31:28 +02:00
with :
fetch-depth : 0
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
- name : Set ENABLE_WIN32_CONSOLE (debug)
2022-10-01 01:40:32 +02:00
if : matrix.build_type == 'debug'
2022-09-30 21:31:28 +02:00
run : echo "win32_console=ON" >> $GITHUB_ENV
- name : Set ENABLE_WIN32_CONSOLE (release)
2022-10-01 01:40:32 +02:00
if : matrix.build_type == 'release'
2022-09-30 21:31:28 +02:00
run : echo "win32_console=OFF" >> $GITHUB_ENV
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"
2023-02-20 06:30:22 +01:00
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
2022-09-30 21:31:28 +02:00
-DCMAKE_PREFIX_PATH="/strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6"
2022-02-08 22:00:55 +01:00
-DBUILD_WITH_QT6=ON
-DBUILD_WERROR=OFF
2022-09-30 21:31:28 +02:00
-DARCH="${{matrix.arch}}"
2023-02-20 06:30:22 +01:00
-DENABLE_WIN32_CONSOLE=${{env.win32_console}}
2022-09-30 21:31:28 +02:00
-DENABLE_DBUS=OFF
-DENABLE_LIBGPOD=OFF
-DENABLE_LIBMTP=OFF
-DENABLE_AUDIOCD=OFF
-DProtobuf_PROTOC_EXECUTABLE="/strawberry-mxe/usr/x86_64-pc-linux-gnu/bin/protoc"
2022-02-08 22:00:55 +01:00
- name : Run Make
2023-05-06 14:18:35 +02:00
run : cmake --build build --config Release --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
2022-09-30 21:31:28 +02:00
run : cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/styles/qwindowsvistastyle.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
2023-04-24 23:20:42 +02:00
run : cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/bin/gstreamer-1.0/{libgstaes.dll,libgstaiff.dll,libgstapetag.dll,libgstapp.dll,libgstasf.dll,libgstasfmux.dll,libgstaudioconvert.dll,libgstaudiofx.dll,libgstaudiomixer.dll,libgstaudioparsers.dll,libgstaudiorate.dll,libgstaudioresample.dll,libgstaudiotestsrc.dll,libgstautodetect.dll,libgstbs2b.dll,libgstcoreelements.dll,libgstdash.dll,libgstdirectsound.dll,libgstequalizer.dll,libgstfaac.dll,libgstfaad.dll,libgstfdkaac.dll,libgstflac.dll,libgstgio.dll,libgstgme.dll,libgsthls.dll,libgsticydemux.dll,libgstid3demux.dll,libgstid3tag.dll,libgstisomp4.dll,libgstlame.dll,libgstlibav.dll,libgstmpg123.dll,libgstmusepack.dll,libgstogg.dll,libgstopenmpt.dll,libgstopus.dll,libgstopusparse.dll,libgstpbtypes.dll,libgstplayback.dll,libgstreplaygain.dll,libgstrtp.dll,libgstrtsp.dll,libgstsoup.dll,libgstspectrum.dll,libgstspeex.dll,libgsttaglib.dll,libgsttcp.dll,libgsttwolame.dll,libgsttypefindfunctions.dll,libgstudp.dll,libgstvolume.dll,libgstvorbis.dll,libgstwasapi.dll,libgstwavenc.dll,libgstwavpack.dll,libgstwavparse.dll,libgstxingmux.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
2023-02-20 06:30:22 +01:00
- name : Copy extra binaries (debug)
if : matrix.build_type == '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
2022-10-01 01:40:32 +02:00
if : matrix.build_type == '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.build_type == 'debug'
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
2022-09-30 21:31:28 +02:00
run : cp ${GITHUB_WORKSPACE}/dist/windows/*.nsi ${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
2023-04-24 23:20:42 +02:00
- name : Check that all files are included in nsi
2023-08-09 19:53:31 +02:00
shell : bash
2023-04-24 23:20:42 +02:00
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
2023-08-09 19:53:31 +02:00
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
2023-04-24 23:20:42 +02:00
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
2023-05-06 15:02:55 +02:00
- name : Upload artifacts
uses : actions/upload-artifact@v3
with :
name : windows-mingw
path : build/StrawberrySetup*.exe
- name : SSH key setup
2023-06-07 16:57:27 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2023-05-06 15:02:55 +02:00
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{ secrets.SSH_KEY }}
- name : Create server path
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/windows/mingw
- name : rsync
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/StrawberrySetup*.exe ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/windows/mingw/
2022-08-13 20:40:31 +02:00
2022-09-30 21:31:28 +02:00
build-windows-msvc :
name : Build Windows MSVC
2023-02-24 17:26:55 +01:00
runs-on : windows-2022
2022-09-30 21:31:28 +02:00
strategy :
fail-fast : false
matrix :
arch : [ 'x86' , 'x86_64' ]
build_type : [ 'debug' , '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 : |
2023-05-07 05:25:47 +02:00
echo "prefix_path_backslash=c:\strawberry_msvc_${{matrix.arch}}_${{matrix.build_type}}" >> $GITHUB_ENV
echo "prefix_path_forwardslash=c:/strawberry_msvc_${{matrix.arch}}_${{matrix.build_type}}" >> $GITHUB_ENV
echo "prefix_path_unix=/c/strawberry_msvc_${{matrix.arch}}_${{matrix.build_type}}" >> $GITHUB_ENV
2022-08-13 20:40:31 +02:00
2023-05-07 05:25:47 +02:00
- name : Get the latest MSVC dependencies
2022-09-16 23:11:56 +02:00
shell : bash
run : |
msvc_deps_version=$(curl -s 'https://github.com/strawberrymusicplayer/strawberry-msvc-dependencies/releases' | sed -n 's,.*releases/tag/\([^"&;]*\)".*,\1,p' | head -1)
echo "msvc_deps_version=${msvc_deps_version}" >> $GITHUB_ENV
2022-08-13 20:40:31 +02:00
- name : Download Windows MSVC dependencies
uses : suisei-cn/actions-download-file@v1
with :
2022-09-30 21:31:28 +02:00
url : "Windows MSVC dependencies [this](https://github.com/strawberrymusicplayer/strawberry-msvc-dependencies/releases/download/${{env.msvc_deps_version}}/strawberry-msvc-${{matrix.arch}}-${{matrix.build_type}}.tar.xz)!"
2022-08-13 20:40:31 +02:00
target : downloads/
auto-match : true
2023-05-07 05:25:47 +02:00
- name : Extract Windows MSVC dependencies
shell : bash
run : |
2023-05-07 11:27:56 +02:00
tar -xf /d/a/strawberry/strawberry/downloads/strawberry-msvc-${{matrix.arch}}-${{matrix.build_type}}.tar.xz
2023-05-07 05:25:47 +02:00
mv strawberry_msvc_${{matrix.arch}}_${{matrix.build_type}} /c/
- 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 : Uninstall conflicting mingw
shell : cmd
run : choco uninstall mingw -y -f
- name : Delete conflicting files
shell : bash
run : rm -rf /c/strawberry/c "/c/program files/OpenSSL" "/c/program files/postgresql"
- name : Delete conflicting icu
shell : bash
run : |
find "/c/program files (x86)/windows kits/" -name 'icu*.lib' -delete
find "/c/program files (x86)/windows kits/" -name 'icu*.h' -delete
2022-08-13 20:40:31 +02:00
- name : Download LockedList plugin for NSIS
uses : suisei-cn/actions-download-file@v1
with :
url : "LockedList [this](https://nsis.sourceforge.io/mediawiki/images/d/d3/LockedList.zip)!"
target : downloads/
auto-match : true
- name : Extract NSIS LockedList plugin
run : 7z x -o"${{github.workspace}}/NSIS_Plugins" "${{github.workspace}}/downloads/LockedList.zip"
- name : Download Registry plugin for NSIS
uses : suisei-cn/actions-download-file@v1
with :
url : "Registry [this](https://nsis.sourceforge.io/mediawiki/images/4/47/Registry.zip)!"
target : downloads/
auto-match : true
- name : Extract NSIS Registry plugin
run : 7z x -o"${{github.workspace}}/NSIS_Plugins" "${{github.workspace}}/downloads/Registry.zip"
- name : Download Inetc plugin for NSIS
uses : suisei-cn/actions-download-file@v1
with :
url : "Inetc [this](https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip)!"
target : downloads/
auto-match : true
- name : Extract NSIS Inetc plugin
run : 7z x -o"${{github.workspace}}/NSIS_Plugins" "${{github.workspace}}/downloads/Inetc.zip"
- name : Install NSIS plugins
run : |
copy "${{github.workspace}}/NSIS_Plugins/Plugins/LockedList64.dll" "C:/Program Files (x86)/NSIS/Plugins/"
copy "${{github.workspace}}/NSIS_Plugins/Plugins/x86-unicode/LockedList.dll" "C:/Program Files (x86)/NSIS/Plugins/x86-unicode/"
copy "${{github.workspace}}/NSIS_Plugins/Desktop/Plugin/registry.dll" "C:/Program Files (x86)/NSIS/Plugins/"
copy "${{github.workspace}}/NSIS_Plugins/Desktop/Plugin/registry.dll" "C:/Program Files (x86)/NSIS/Plugins/x86-unicode/"
copy "${{github.workspace}}/NSIS_Plugins/Plugins/x86-unicode/INetC.dll" "C:/Program Files (x86)/NSIS/Plugins/x86-unicode/"
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
vsversion : 17
toolset : 14.3
2022-08-13 20:40:31 +02:00
2023-05-07 05:25:47 +02:00
- name : Checkout
uses : actions/checkout@v3
with :
fetch-depth : 0
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
run : cmake -E make_directory build
2022-09-30 21:31:28 +02:00
- name : Set ENABLE_WIN32_CONSOLE (debug)
2022-10-01 01:40:32 +02:00
if : matrix.build_type == 'debug'
2022-09-30 21:31:28 +02:00
shell : bash
run : echo "win32_console=ON" >> $GITHUB_ENV
- name : Set ENABLE_WIN32_CONSOLE (release)
2022-10-01 01:40:32 +02:00
if : matrix.build_type == '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
run : >
2023-05-06 14:18:35 +02:00
cmake
-S .
-B build
2022-08-13 20:40:31 +02:00
-G "Ninja"
2022-09-30 21:31:28 +02:00
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
2023-05-07 05:25:47 +02:00
-DCMAKE_PREFIX_PATH="${{env.prefix_path_forwardslash}}/lib/cmake"
2022-08-13 20:40:31 +02:00
-DBUILD_WITH_QT6=ON
-DBUILD_WERROR=OFF
2022-09-30 21:31:28 +02:00
-DARCH="${{matrix.arch}}"
-DENABLE_WIN32_CONSOLE=${{env.win32_console}}
2022-08-13 20:40:31 +02:00
-DUSE_TAGLIB=ON
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}}"
2022-08-13 20:40:31 +02:00
- name : Run Make
env :
CL : "/MP"
2023-05-06 14:18:35 +02:00
run : cmake --build build --config ${{matrix.build_type}} --parallel 4
2022-08-13 20:40:31 +02:00
2022-02-08 22:00:55 +01:00
- name : Copy extra binaries
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
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
working-directory : build
2023-05-07 05:25:47 +02: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
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
working-directory : build
2023-05-07 05:25:47 +02:00
run : copy ${{env.prefix_path_backslash}}\plugins\styles\qwindowsvistastyle*.dll .\styles\
2022-02-08 22:00:55 +01:00
- name : Copy Qt TLS plugins
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
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
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
working-directory : build
run : |
2023-05-07 05:25:47 +02:00
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaes.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaiff.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstapetag.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstapp.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstasf.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstasfmux.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudioconvert.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudiofx.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudiomixer.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudioparsers.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudiorate.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudioresample.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstaudiotestsrc.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstautodetect.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstbs2b.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstcoreelements.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstdash.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstdirectsound.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstequalizer.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstfaac.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstfaad.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstfdkaac.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstflac.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstgio.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstgme.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gsthls.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gsticydemux.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstid3demux.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstid3tag.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstisomp4.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstlame.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstlibav.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstmpg123.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstmusepack.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstogg.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstopenmpt.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstopus.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstopusparse.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstpbtypes.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstplayback.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstreplaygain.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstrtp.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstrtsp.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstsoup.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstspectrum.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstspeex.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gsttaglib.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gsttcp.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gsttwolame.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gsttypefindfunctions.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstudp.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstvolume.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstvorbis.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstwasapi.dll .\gstreamer-plugins\
2023-06-01 17:41:51 +02:00
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstwasapi2.dll .\gstreamer-plugins\
2023-05-07 05:25:47 +02:00
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstwavenc.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstwavpack.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstwavparse.dll .\gstreamer-plugins\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstxingmux.dll .\gstreamer-plugins\
2022-02-08 22:00:55 +01:00
- name : Download copydlldeps.sh
shell : bash
working-directory : build
run : curl -O -L https://raw.githubusercontent.com/strawberrymusicplayer/strawberry-mxe/master/tools/copydlldeps.sh
- 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
working-directory : build
run : |
copy ..\dist\windows\*.nsi .
copy ..\dist\windows\*.nsh .
copy ..\dist\windows\*.ico .
- name : Copy COPYING license file
working-directory : build
run : copy ..\COPYING .
2023-05-07 05:25:47 +02:00
- name : List files
2022-02-08 22:00:55 +01:00
working-directory : build
run : dir
2023-04-24 23:20:42 +02:00
- name : Check that all files are included in nsi
shell : bash
2023-08-09 19:53:31 +02:00
working-directory : build
2023-04-24 23:20:42 +02:00
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
2023-08-09 19:53:31 +02:00
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
2023-04-24 23:20:42 +02:00
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
working-directory : build
run : makensis strawberry.nsi
2023-05-06 15:02:55 +02:00
- name : Upload artifacts
uses : actions/upload-artifact@v3
2022-02-08 22:00:55 +01:00
with :
2023-05-06 15:02:55 +02:00
name : windows-msvc
2022-02-08 22:00:55 +01:00
path : build/StrawberrySetup*.exe
2020-08-26 22:35:18 +02:00
2023-05-06 15:02:55 +02:00
rsync-windows-msvc-builds :
name : Rsync Windows MSVC builds
2022-02-08 22:00:55 +01:00
runs-on : ubuntu-latest
2023-05-06 15:02:55 +02:00
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
2022-02-08 22:00:55 +01:00
needs :
2022-09-30 21:31:28 +02:00
- build-windows-msvc
2022-02-08 22:00:55 +01:00
steps :
2023-05-06 15:02:55 +02:00
- name : Download artifacts
uses : actions/download-artifact@v3
2022-02-08 22:00:55 +01:00
with :
2023-05-06 15:02:55 +02:00
name : windows-msvc
path : builds
- name : View files
run : find builds
- name : SSH key 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}}
- name : Create server path
shell : bash
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{secrets.BUILDS_PATH}}/windows/msvc
2022-02-08 22:00:55 +01:00
- name : rsync
2023-05-06 15:02:55 +02:00
shell : bash
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
run : rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var builds/StrawberrySetup-*-msvc-*.exe ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.BUILDS_PATH}}/windows/msvc/
2023-05-07 02:24:39 +02:00
upload-release :
name : Upload release
runs-on : ubuntu-latest
if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
needs :
- build-opensuse
- build-fedora
- build-mageia
- build-debian
- build-ubuntu
- build-macos-homebrew
- build-windows-mingw
- build-windows-msvc
steps :
- name : Install rsync
run : sudo apt install -y rsync
- name : Checkout
uses : actions/checkout@v3
with :
fetch-depth : 0
2023-07-12 14:25:59 +02:00
- name : Set is release
run : echo "is_release=$(grep '^\s*set\s*(\s*INCLUDE_GIT_REVISION\s\+OFF\s*)\s*$' cmake/Version.cmake >/dev/null 2>&1 && echo 1 || echo 0)" >> $GITHUB_ENV
2023-05-07 02:24:39 +02:00
- name : Get release version
run : echo "release_version=$(git describe --tags --exact-match ${GITHUB_SHA} 2>/dev/null | head -1)" >> $GITHUB_ENV
- name : Show release version
if : env.release_version != ''
run : echo "Release version:" ${{env.release_version}}
- name : Show release assets
if : env.release_version != ''
env :
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
run : hub release show -f "%as" ${{env.release_version}}
- name : Download artifacts
if : env.release_version != ''
uses : actions/download-artifact@v3
with :
path : artifacts
- name : SSH key setup
if : env.release_version != ''
uses : shimataro/ssh-key-action@v2
with :
known_hosts : ${{secrets.SSH_KNOWN_HOSTS}}
key : ${{secrets.SSH_KEY}}
- name : Add artifacts to release
2023-07-12 14:25:59 +02:00
if : env.is_release == '1' && env.release_version != ''
2023-05-07 02:24:39 +02:00
env :
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
run : |
echo "Release version: ${{env.release_version}}"
a_files=()
for i in $(find artifacts -type f); do
filename=$(basename $i)
existing_asset=$(hub release show -f "%as" ${{env.release_version}} | tr -d '[:blank:]' | grep ".*/${filename}\$" 2>/dev/null || true)
if [ "${existing_asset}" = "" ]; then
echo "Adding file: ${filename}"
if [ "${file_list}" = "" ]; then
file_list="$i"
else
file_list="${file_list} $i"
fi
a_files+=("-a" "${i}")
else
echo "Skipping existing file: ${filename}"
fi
done
if ! [ "${file_list}" = "" ]; then
echo "Uploading files: ${file_list}"
rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var ${file_list} ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.RELEASES_PATH}}/
fi
a_file_list="${a_files[@]}"
if ! [ "${a_file_list}" = "" ]; then
echo "Adding files to GitHub release: ${file_list}"
hub release edit -m "Strawberry ${{env.release_version}}" ${a_file_list} "${{env.release_version}}"
fi