diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d36e4a71..6da1c862 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -150,13 +150,16 @@ jobs: strategy: fail-fast: true # false to test all, true to fail entire job if any fail matrix: - distro: [ debian, ubuntu_20_04, ubuntu_21_04, ubuntu_21_10 ] # removed ubuntu_18_04 for now + distro: [ debian, ubuntu_18_04, ubuntu_20_04, ubuntu_21_04, ubuntu_21_10 ] package: [ -p ] + extension: [ deb ] include: # don't package these - distro: fedora_33 package: '' + extension: rpm - distro: fedora_35 package: '' + extension: rpm steps: - name: Checkout @@ -175,10 +178,10 @@ jobs: cd scripts sudo ./build-sunshine.sh ${{ matrix.package }} -u -n sunshine-${{ matrix.distro }} -s .. - name: Package Linux - if: ${{ matrix.package == '-p' }} + if: ${{ matrix.package != '' }} run: | cd scripts - sudo mv ./sunshine-${{ matrix.distro }}-build/sunshine-${{ matrix.distro }}.deb ../artifacts/ + sudo mv ./sunshine-${{ matrix.distro }}-build/sunshine-${{ matrix.distro }}.${{ matrix.extension }} ../artifacts/ - name: Upload Artifacts if: ${{ matrix.package == '-p' && ( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) }} uses: actions/upload-artifact@v2 diff --git a/scripts/Dockerfile-debian b/scripts/Dockerfile-debian index 15f0d656..809b20d3 100644 --- a/scripts/Dockerfile-debian +++ b/scripts/Dockerfile-debian @@ -33,7 +33,6 @@ RUN apt-get update -y && \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"] diff --git a/scripts/Dockerfile-fedora_33 b/scripts/Dockerfile-fedora_33 index ae7e4959..a2c8dfa4 100644 --- a/scripts/Dockerfile-fedora_33 +++ b/scripts/Dockerfile-fedora_33 @@ -21,7 +21,6 @@ RUN dnf -y update && \ && dnf clean all \ && rm -rf /var/cache/yum +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"] diff --git a/scripts/Dockerfile-fedora_35 b/scripts/Dockerfile-fedora_35 index 0cde7aa4..ba7abac5 100644 --- a/scripts/Dockerfile-fedora_35 +++ b/scripts/Dockerfile-fedora_35 @@ -26,7 +26,6 @@ RUN dnf -y update && \ && dnf clean all \ && rm -rf /var/cache/yum +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"] diff --git a/scripts/Dockerfile-ubuntu_18_04 b/scripts/Dockerfile-ubuntu_18_04 index 5ee33ae3..b6a05f6f 100644 --- a/scripts/Dockerfile-ubuntu_18_04 +++ b/scripts/Dockerfile-ubuntu_18_04 @@ -6,30 +6,24 @@ ARG TZ="Europe/London" SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update -y && \ apt-get install -y \ - apt-transport-https \ - ca-certificates \ - gnupg \ software-properties-common \ - wget \ - && wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \ - add-apt-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \ - add-apt-repository ppa:ubuntu-toolchain-r/test && \ - add-apt-repository ppa:savoury1/graphics && \ + && add-apt-repository ppa:savoury1/graphics && \ add-apt-repository ppa:savoury1/multimedia && \ add-apt-repository ppa:savoury1/ffmpeg4 && \ + add-apt-repository ppa:savoury1/boost-defaults-1.71 && \ + add-apt-repository ppa:ubuntu-toolchain-r/test && \ apt-get update -y && \ apt-get install -y \ build-essential \ cmake \ - ffmpeg \ gcc-10 \ git \ g++-10 \ libavdevice-dev \ - libboost-filesystem-dev \ - libboost-log-dev \ - libboost-regex-dev \ - libboost-thread-dev \ + libboost-filesystem1.71-dev \ + libboost-log1.71-dev \ + libboost-regex1.71-dev \ + libboost-thread1.71-dev \ libcap-dev \ libdrm-dev \ libevdev-dev \ @@ -44,15 +38,24 @@ RUN apt-get update -y && \ libxfixes-dev \ libxrandr-dev \ libxtst-dev \ + wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Update gcc alias RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 +# Install CuDA RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run +# Install cmake +ADD https://cmake.org/files/v3.22/cmake-3.22.2-linux-x86_64.sh /cmake-3.22.2-linux-x86_64.sh +RUN mkdir /opt/cmake +RUN sh /cmake-3.22.2-linux-x86_64.sh --prefix=/opt/cmake --skip-license +RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake +RUN cmake --version + +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"] diff --git a/scripts/Dockerfile-ubuntu_20_04 b/scripts/Dockerfile-ubuntu_20_04 index 5a633a10..e65f9176 100644 --- a/scripts/Dockerfile-ubuntu_20_04 +++ b/scripts/Dockerfile-ubuntu_20_04 @@ -3,6 +3,7 @@ FROM ubuntu:20.04 AS sunshine-ubuntu_20_04 ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update -y && \ apt-get install -y \ build-essential \ @@ -31,12 +32,13 @@ RUN apt-get update -y && \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Update gcc alias RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 +# Install CuDA RUN wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run && chmod a+x /root/cuda.run RUN /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm && rm /root/cuda.run +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"] diff --git a/scripts/Dockerfile-ubuntu_21_04 b/scripts/Dockerfile-ubuntu_21_04 index d5668df4..c7c7a3d4 100644 --- a/scripts/Dockerfile-ubuntu_21_04 +++ b/scripts/Dockerfile-ubuntu_21_04 @@ -3,6 +3,7 @@ FROM ubuntu:21.04 AS sunshine-ubuntu_21_04 ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update -y && \ apt-get install -y \ build-essential \ @@ -31,7 +32,6 @@ RUN apt-get update -y && \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"] diff --git a/scripts/Dockerfile-ubuntu_21_10 b/scripts/Dockerfile-ubuntu_21_10 index 14770625..7b51da3d 100644 --- a/scripts/Dockerfile-ubuntu_21_10 +++ b/scripts/Dockerfile-ubuntu_21_10 @@ -3,6 +3,7 @@ FROM ubuntu:21.10 AS sunshine-ubuntu_21_10 ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update -y && \ apt-get install -y \ build-essential \ @@ -31,7 +32,6 @@ RUN apt-get update -y && \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Entrypoint COPY build-private.sh /root/build.sh - - ENTRYPOINT ["/root/build.sh"]