Skip to content

Release 1.0.21

Release 1.0.21 #1164

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-opensuse:
name: Build openSUSE
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opensuse_version: [ 'tumbleweed', 'leap:15.4', 'leap:15.5' ]
qt_version: [ '5', '6' ]
container:
image: opensuse/${{matrix.opensuse_version}}
steps:
- 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
run: >
zypper -n --gpg-auto-import-keys in
lsb-release
rpm-build
git
tar
make
cmake
gettext-tools
openssh-clients
rsync
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
taglib-devel
libicu-devel
libcdio-devel
libgpod-devel
libmtp-devel
libchromaprint-devel
libebur128-devel
desktop-file-utils
update-desktop-files
appstream-glib
hicolor-icon-theme
- name: Install Qt 5
if: matrix.qt_version == '5'
run: >
zypper -n --gpg-auto-import-keys in
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
libqt5-qtx11extras-devel
- name: Install Qt 6
if: matrix.qt_version == '6'
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
- name: Checkout
uses: actions/checkout@v4
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 -DUSE_TAGLIB=ON -DQT_VERSION_MAJOR=${{matrix.qt_version}}
- name: Create source tarball
working-directory: build
run: ../dist/scripts/maketarball.sh
- 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
- 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
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
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}}/source ${{secrets.BUILDS_PATH}}/opensuse/${{env.opensuse_subdir}}
- name: rsync source
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci') && matrix.opensuse_version == 'tumbleweed' && matrix.qt_version == '6'
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/
- 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:
name: Build Fedora
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
fedora_version: [ '37', '38', '39' ]
container:
image: fedora:${{matrix.fedora_version}}
steps:
- name: Update repositories
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
- name: Upgrade packages
run: dnf -y upgrade
- name: Install dependencies
run: >
dnf -y install
@development-tools
redhat-lsb-core
which
git
glibc
gcc-c++
rpmdevtools
make
cmake
pkgconfig
glib
man
tar
gettext
openssh
rsync
boost-devel
dbus-devel
protobuf-devel
protobuf-compiler
sqlite-devel
alsa-lib-devel
pulseaudio-libs-devel
libnotify-devel
libicu-devel
qt6-qtbase-devel
qt6-qtbase-private-devel
qt6-qttools-devel
gstreamer1-devel
gstreamer1-plugins-base-devel
taglib-devel
libcdio-devel
libgpod-devel
libmtp-devel
libchromaprint-devel
libebur128-devel
fftw-devel
desktop-file-utils
libappstream-glib
hicolor-icon-theme
- name: Checkout
uses: actions/checkout@v4
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: 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/
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- 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
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
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}}/
build-openmandriva:
name: Build OpenMandriva
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
openmandriva_version: [ "cooker" ]
container:
image: openmandriva/${{matrix.openmandriva_version}}
steps:
- name: Update repositories
run: dnf update -y
- name: Upgrade packages
run: dnf upgrade -y
- name: Install dependencies
run: >
dnf install -y
glibc
gcc-c++
git
gnutar
make
cmake
glib
gettext
lsb-release
rpmdevtools
rpm-build
rsync
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
libebur128-devel
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-linguist
desktop-file-utils
appstream
appstream-util
hicolor-icon-theme
- name: Checkout
uses: actions/checkout@v4
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: 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/
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- 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
if: matrix.openmandriva_version != 'cooker' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- name: Create server path
if: matrix.openmandriva_version != 'cooker' && (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}}/openmandriva/${{matrix.openmandriva_version}}
- name: rsync
if: matrix.openmandriva_version != 'cooker' && (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}}/openmandriva/${{matrix.openmandriva_version}}/
build-mageia:
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
rsync
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
lib64ebur128-devel
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
- name: Checkout
uses: actions/checkout@v4
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: 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/
- name: Build RPM
env:
RPM_BUILD_NCPUS: "2"
working-directory: build
run: rpmbuild -ba ../dist/unix/strawberry.spec
- 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
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
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}}/
build-debian:
name: Build Debian
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
debian_version: [ 'bullseye', 'bookworm', 'trixie' ]
container:
image: debian:${{matrix.debian_version}}
steps:
- name: Update repositories
run: apt update -y
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: >
apt install -y
build-essential
dh-make
ssh
git
make
cmake
gcc
g++
pkg-config
fakeroot
gettext
lsb-release
rsync
dpkg-dev
libglib2.0-dev
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
libebur128-dev
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
- name: Install Qt 5
if: matrix.debian_version == 'bullseye'
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.debian_version != 'bullseye'
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@v4
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: make deb
run: dpkg-buildpackage -b -d -uc -us -nc -j2
- 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
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
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}}/
build-ubuntu:
name: Build Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'focal', 'jammy', 'lunar', 'mantic' ]
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
build-essential
dh-make
ssh
git
make
cmake
pkg-config
gcc
g++
fakeroot
wget
curl
gettext
lsb-release
rsync
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
libebur128-dev
libfftw3-dev
libcdio-dev
libmtp-dev
libgpod-dev
- 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@v4
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: make deb
run: dpkg-buildpackage -b -d -uc -us -nc -j2
- 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
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
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}}/
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:
ubuntu_version: [ 'focal', 'jammy', 'lunar', 'mantic' ]
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
libebur128-dev
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@v4
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@v6
with:
gpg_private_key: ${{secrets.UBUNTU_PPA_GPG_PRIVATE_KEY}}
- name: dpkg-buildpackage
run: dpkg-buildpackage -S -d -k573D197B5EA20EDF
- 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
- name: Get release version
run: echo "release_version=$(git describe --tags --exact-match ${GITHUB_SHA} 2>/dev/null | head -1)" >> $GITHUB_ENV
- name: Upload Unstable PPA
if: env.is_release != '1' && env.release_version == ''
run: dput ppa:jonaski/strawberry-unstable ../*_source.changes
- name: Upload Stable PPA
if: env.is_release == '1' && env.release_version != ''
run: dput ppa:jonaski/strawberry ../*_source.changes
build-macos:
name: Build macOS
strategy:
fail-fast: false
matrix:
runner: [ 'macos-11', 'macos-arm64' ]
buildtype: [ 'release' ]
runs-on: ${{ matrix.runner }}
steps:
- 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: Uninstall homebrew
if: matrix.runner == 'macos-11'
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
- name: Import certificate file
if: matrix.runner == 'macos-11'
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE }}
p12-password: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD }}
- name: Unlock keychain
if: matrix.runner == 'macos-arm64'
run: security unlock-keychain -p ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD2 }}
- 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
- name: Extract macOS dependencies
run: sudo tar -C / -xf strawberry-macos-${{env.arch}}-${{env.buildtype}}.tar.xz
- 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:
MACOSX_DEPLOYMENT_TARGET: 11.0
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"
-DBUILD_WITH_QT6=ON
-DBUILD_WERROR=OFF
-DUSE_BUNDLE=ON
-DENABLE_DBUS=OFF
-DICU_ROOT="${{env.prefix_path}}"
-DFFTW3_DIR="${{env.prefix_path}}"
-DAPPLE_DEVELOPER_ID="383J84DVB6"
- 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: Codesign libsoup
if: matrix.runner == 'macos-11'
working-directory: build
run: codesign -s 383J84DVB6 -f strawberry.app/Contents/Frameworks/{libsoup-3.0.0.dylib,libnghttp2.14.dylib,libpsl.5.dylib,libpcre2-16.0.dylib,libpng16.16.dylib,libzstd.1.dylib} 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: SSH key setup
if: matrix.runner == 'macos-11' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/macos')
uses: shimataro/ssh-key-action@v2
with:
known_hosts: ${{secrets.SSH_KNOWN_HOSTS}}
key: ${{ secrets.SSH_KEY }}
- 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
- name: Get release version
run: echo "release_version=$(git describe --tags --exact-match ${GITHUB_SHA} 2>/dev/null | head -1)" >> $GITHUB_ENV
- name: Set Upload path
run: |
if [ "${{env.is_release}}" = "1" ] && ! [ "${{env.release_version}}" = "" ]; then
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/stable_releases/macos" >> $GITHUB_ENV
else
echo "upload_path=${{secrets.DOWNLOADS_PATH}}/development_releases/macos" >> $GITHUB_ENV
fi
- name: Create server path
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/macos'
run: ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} mkdir -p ${{env.upload_path}}
- name: rsync
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/macos'
run: rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var build/*.dmg ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{env.upload_path}}/
build-windows-mingw:
name: Build Windows MinGW
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [ 'i686', 'x86_64' ]
buildtype: [ 'debug', 'release' ]
container:
image: jonaski/strawberry-mxe-${{matrix.arch}}-${{matrix.buildtype}}
steps:
- name: Set cmake buildtype
shell: bash
run: echo "cmake_buildtype=$(echo ${{matrix.buildtype}} | sed 's/.*/\u&/')" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
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: Link MXE directory
run: ln -s /strawberry-mxe ~/mxe-shared
- name: Run CMake
env:
PKG_CONFIG_PATH: /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/lib/pkgconfig
run: >
cmake
-S .
-B build
-DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-${{matrix.arch}}-w64-mingw32-shared.cmake"
-DCMAKE_BUILD_TYPE="${{env.cmake_buildtype}}"
-DCMAKE_PREFIX_PATH="/strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6"
-DBUILD_WITH_QT6=ON
-DBUILD_WERROR=OFF
-DARCH="${{matrix.arch}}"
-DENABLE_WIN32_CONSOLE=$(test "${{matrix.buildtype}}" = "debug" && echo "ON" || echo "OFF")
-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"
- name: Run Make
run: cmake --build build --config "${{env.cmake_buildtype}}" --parallel $(nproc)
- name: Create directories
working-directory: build
run: mkdir -p gio-modules platforms sqldrivers tls imageformats styles gstreamer-plugins nsisplugins
- name: Copy GIO modules
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/lib/gio/modules/{libgiognutls.dll,libgioopenssl.dll} ${GITHUB_WORKSPACE}/build/gio-modules/
- name: Copy Qt platform plugins
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/platforms/qwindows.dll ${GITHUB_WORKSPACE}/build/platforms/
- name: Copy Qt styles
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/styles/qwindowsvistastyle.dll ${GITHUB_WORKSPACE}/build/styles/
- name: Copy Qt TLS plugins
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/tls/{qschannelbackend.dll,qopensslbackend.dll} ${GITHUB_WORKSPACE}/build/tls/
- name: Copy Qt SQL drivers
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/sqldrivers/qsqlite.dll ${GITHUB_WORKSPACE}/build/sqldrivers/
- name: Copy Qt imageformats
working-directory: build
run: cp /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared/qt6/plugins/imageformats/{qgif.dll,qico.dll,qjpeg.dll} ${GITHUB_WORKSPACE}/build/imageformats/
- name: Copy gstreamer plugins
working-directory: build
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/
- name: Copy extra binaries
working-directory: build
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} .
- 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} .
- name: Copy dependencies
working-directory: build
run: >
/strawberry-mxe/tools/copydlldeps.sh
-c
-d .
-F .
-F ./platforms
-F ./styles
-F ./imageformats
-F ./tls
-F ./sqldrivers
-F ./gstreamer-plugins
-R /strawberry-mxe/usr/${{matrix.arch}}-w64-mingw32.shared
- name: Strip binaries
if: matrix.buildtype == 'release'
working-directory: build
run: find . -type f \( -iname \*.dll -o -iname \*.exe \) -exec /strawberry-mxe/usr/bin/${{matrix.arch}}-w64-mingw32.shared-strip {} \;
- name: Strip gdb.exe
if: matrix.buildtype == 'debug'
working-directory: build
run: /strawberry-mxe/usr/bin/${{matrix.arch}}-w64-mingw32.shared-strip gdb.exe
- name: Copy nsis files
working-directory: build
run: cp ${GITHUB_WORKSPACE}/dist/windows/*.nsi ${GITHUB_WORKSPACE}/dist/windows/*.nsh ${GITHUB_WORKSPACE}/dist/windows/*.ico .
- name: Copy COPYING license file
working-directory: build
run: cp ${GITHUB_WORKSPACE}/COPYING .
- 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
- name: Build Windows installer
working-directory: build
run: makensis strawberry.nsi
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: windows-mingw
path: build/StrawberrySetup*.exe
- name: SSH key setup
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
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/
build-windows-msvc:
name: Build Windows MSVC
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
arch: [ 'x86', 'x86_64' ]
buildtype: [ 'debug', 'release' ]
steps:
- name: Set prefix path
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
- name: Create downloads directory
shell: cmd
run: mkdir downloads
- 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
- name: Extract Windows MSVC dependencies
shell: bash
working-directory: downloads
run: tar -C /c -xf strawberry-msvc-${{matrix.arch}}-${{matrix.buildtype}}.tar.xz
- 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
run: rm -rf /c/msys64 /c/mingw32 /c/mingw64 /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/" -iname 'icu*.lib' -delete
find "/c/program files (x86)/windows kits/" -iname 'icu*.h' -delete
- 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
- name: Extract NSIS LockedList plugin
shell: cmd
working-directory: downloads
run: 7z x LockedList.zip
- 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
- name: Extract NSIS Registry plugin
shell: cmd
working-directory: downloads
run: 7z x Registry.zip
- 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
- name: Extract NSIS Inetc plugin
shell: cmd
working-directory: downloads
run: 7z x Inetc.zip
- name: Install NSIS plugins
shell: cmd
working-directory: downloads
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\"
- name: Setup MSVC Environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
sdk: 10.0.20348.0
vsversion: 17
toolset: 14.3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add safe git directory
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Create Build Environment
shell: cmd
run: cmake -E make_directory build
- name: Set ENABLE_WIN32_CONSOLE (debug)
if: matrix.build_type == 'debug'
shell: bash
run: echo "win32_console=ON" >> $GITHUB_ENV
- name: Set ENABLE_WIN32_CONSOLE (release)
if: matrix.build_type == 'release'
shell: bash
run: echo "win32_console=OFF" >> $GITHUB_ENV
- name: Run CMake
shell: cmd
run: >
cmake
-S .
-B build
-G "Ninja"
-DCMAKE_BUILD_TYPE="${{env.cmake_buildtype}}"
-DCMAKE_PREFIX_PATH="${{env.prefix_path_forwardslash}}/lib/cmake"
-DBUILD_WITH_QT6=ON
-DARCH="${{matrix.arch}}"
-DENABLE_WIN32_CONSOLE=${{env.win32_console}}
-DUSE_TAGLIB=ON
-DPKG_CONFIG_EXECUTABLE="${{env.prefix_path_forwardslash}}/bin/pkg-config.exe"
-DICU_ROOT="${{env.prefix_path_forwardslash}}"
- name: Run Make
shell: cmd
env:
CL: "/MP"
run: cmake --build build --config "${{env.cmake_buildtype}}" --parallel 4
- name: Copy extra binaries
shell: cmd
working-directory: build
run: |
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
copy ${{env.prefix_path_backslash}}\bin\gst-play-1.0.exe
copy ${{env.prefix_path_backslash}}\bin\gst-discoverer-1.0.exe
copy ${{env.prefix_path_backslash}}\bin\sqlite3.exe
- name: Create directories
shell: cmd
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
working-directory: build
run: copy ${{env.prefix_path_backslash}}\lib\gio\modules\*.dll .\gio-modules\
- name: Copy Qt platform plugins
shell: cmd
working-directory: build
run: copy ${{env.prefix_path_backslash}}\plugins\platforms\qwindows*.dll .\platforms\
- name: Copy Qt styles
shell: cmd
working-directory: build
run: copy ${{env.prefix_path_backslash}}\plugins\styles\qwindowsvistastyle*.dll .\styles\
- name: Copy Qt TLS plugins
shell: cmd
working-directory: build
run: copy ${{env.prefix_path_backslash}}\plugins\tls\*.dll .\tls\
- name: Copy Qt SQL drivers
shell: cmd
working-directory: build
run: copy ${{env.prefix_path_backslash}}\plugins\sqldrivers\qsqlite*.dll .\sqldrivers\
- name: Copy Qt imageformats plugins
shell: cmd
working-directory: build
run: copy ${{env.prefix_path_backslash}}\plugins\imageformats\*.dll .\imageformats\
- name: Copy gstreamer plugins
shell: cmd
working-directory: build
run: |
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\
copy ${{env.prefix_path_backslash}}\lib\gstreamer-1.0\gstwasapi2.dll .\gstreamer-plugins\
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\
- 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
- 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
-R ${{env.prefix_path_unix}}/bin
- name: Copy nsis files
shell: cmd
working-directory: build
run: |
copy ..\dist\windows\*.nsi .
copy ..\dist\windows\*.nsh .
copy ..\dist\windows\*.ico .
- name: Copy COPYING license file
shell: cmd
working-directory: build
run: copy ..\COPYING .
- name: List files
shell: cmd
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
- name: Create nsis installer
shell: cmd
working-directory: build
run: makensis strawberry.nsi
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: windows-msvc
path: build/StrawberrySetup*.exe
rsync-windows-msvc-builds:
name: Rsync Windows MSVC builds
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci'
needs:
- build-windows-msvc
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: windows-msvc
path: builds
- name: View files
run: find builds
- name: SSH key setup
uses: shimataro/ssh-key-action@v2
with:
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
- name: rsync
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/
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-windows-mingw
- build-windows-msvc
steps:
- name: Install packages
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt install -y git rsync hub
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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
- 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
if: env.is_release == '1' && env.release_version != ''
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
echo "Release version: ${{env.release_version}}"
filenames=()
files=()
a_files=()
for i in $(find artifacts -type f); do
filename=$(basename $i)
if [[ ${filenames[@]} =~ ${filename} ]]; then
echo "Skipping duplicate file: ${filename}"
continue
fi
filenames+=("${filename}")
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}"
files+=("$i")
a_files+=("-a" "${i}")
else
echo "Release already has file: ${filename}"
fi
done
files_list="${files[@]}"
a_files_list="${a_files[@]}"
if ! [ "${files_list}" = "" ]; then
echo "Uploading files: ${files_list}"
rsync -e "ssh -p ${{secrets.SSH_PORT}} -o StrictHostKeyChecking=no" -var ${files_list} ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{secrets.RELEASES_PATH}}/
fi
if ! [ "${a_files_list}" = "" ]; then
echo "Adding files to GitHub release: ${files_list}"
hub release edit -m "Strawberry ${{env.release_version}}" ${a_files_list} "${{env.release_version}}"
fi