diff --git a/.ci/build-freebsd.sh b/.ci/build-freebsd.sh new file mode 100755 index 0000000000..7a96a564b7 --- /dev/null +++ b/.ci/build-freebsd.sh @@ -0,0 +1,35 @@ +#!/bin/sh -ex + +ccache -s # debug + +# Pull all the submodules except llvm +# Note: Tried to use git submodule status, but it takes over 20 seconds +# shellcheck disable=SC2046 +git submodule -q update --init $(awk '/path/ && !/llvm/ { print $3 }' .gitmodules) + +# XXX Drop after Travis upgrades FreeBSD to 12.2 (see also .ci/install-freebsd.sh) +case $(${CXX:-c++} --version) in + *version\ 8.0.*) + fetch https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/libcxx-10.0.0.src.tar.xz + tar xf libcxx-10.0.0.src.tar.xz + export CC=clang10 CXX=clang++10 + export CXXFLAGS="$CXXFLAGS -nostdinc++ -isystem $PWD/libcxx-10.0.0.src/include" + ;; +esac + +CONFIGURE_ARGS=" + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + -DWITH_LLVM=OFF + -DUSE_PRECOMPILED_HEADERS=OFF + -DUSE_NATIVE_INSTRUCTIONS=OFF + -DUSE_SYSTEM_FFMPEG=ON + -DUSE_SYSTEM_CURL=ON + -DUSE_SYSTEM_LIBPNG=ON +" + +# shellcheck disable=SC2086 +cmake -B build -G Ninja $CONFIGURE_ARGS +cmake --build build + +ccache -s # debug diff --git a/.ci/install-freebsd.sh b/.ci/install-freebsd.sh new file mode 100755 index 0000000000..ba134e30d8 --- /dev/null +++ b/.ci/install-freebsd.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env -S su -m root -ex +# NOTE: this script is run under root permissions +# shellcheck shell=sh disable=SC2096 + +# RPCS3 often needs recent Qt5 and Vulkan-Headers +sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf + +export ASSUME_ALWAYS_YES=true +pkg info # debug + +# XXX Drop after Travis upgrades FreeBSD to 12.2 (see also .ci/build-freebsd.sh) +case $(${CXX:-c++} --version) in + *version\ 8.0.*) + pkg install llvm10 + ;; +esac + +# Mandatory dependencies (qt5-dbus and qt5-gui are pulled via qt5-widgets) +pkg install git ccache cmake ninja qt5-qmake qt5-buildtools qt5-widgets qt5-concurrent glew openal-soft ffmpeg + +# Optional dependencies (libevdev is pulled by qt5-gui) +pkg install pkgconf alsa-lib pulseaudio sdl2 evdev-proto vulkan-headers vulkan-loader diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000000..e3596c586c --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,19 @@ +env: + CIRRUS_CLONE_DEPTH: 0 # Unshallow clone to obtain proper GIT_VERSION + +freebsd_task: + matrix: + - name: FreeBSD 12.2 (snapshot) + freebsd_instance: + image_family: freebsd-12-1-snap + cpu: 8 + memory: 8G + env: + CCACHE_MAXSIZE: 300M # 3x clean build, rounded + CCACHE_DIR: /tmp/ccache_dir + ccache_cache: + folder: /tmp/ccache_dir + packages_cache: + folder: /var/cache/pkg + install_script: "sh -ex ./.ci/install-freebsd.sh" + script: "./.ci/build-freebsd.sh" diff --git a/.travis.yml b/.travis.yml index 216dcf2efd..294a0ac2b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,11 @@ jobs: compiler: clang install: "docker pull rpcs3/rpcs3-travis-xenial:1.4" script: 'travis_wait docker run -v $(pwd):/rpcs3 -v "$HOME/.ccache":/root/.ccache --env-file .ci/travis.env rpcs3/rpcs3-travis-xenial:1.4 /rpcs3/.ci/build-linux.sh' + # - os: freebsd + # compiler: clang + # cache: ccache + # install: "./.ci/install-freebsd.sh" + # script: "./.ci/build-freebsd.sh" # - os: osx # osx_image: xcode11.3 # addons: