Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (73 sloc) 3.38 KB
language: c
matrix:
include:
- name: "haxm-darwin"
os: osx
addons:
homebrew:
packages:
- nasm
update: true
script:
- cd platforms/darwin
- xcodebuild -configuration Debug -sdk macosx
- name: "haxm-linux"
os: linux
dist: trusty
sudo: false
env:
- CHROOT=trusty_i386
- CHROOT_DIR=/tmp/chroot/${CHROOT}
before_install:
- sudo apt-get update
- sudo apt-get install -y linux-headers-`uname -r`
- wget -P /tmp/downloads http://mirrors.kernel.org/ubuntu/pool/universe/n/nasm/nasm_2.13.02-0.1_amd64.deb
- sudo apt-get install -y dpkg
- sudo dpkg -i /tmp/downloads/nasm_2.13.02-0.1_amd64.deb
# Cross-compiling to 32-bit Linux
- mkdir -p ${CHROOT_DIR}/haxm
- cp -r . ${CHROOT_DIR}/haxm
- sudo apt-get install -y debootstrap schroot
- |
( echo "[${CHROOT}]"
echo "type=directory"
echo "directory=${CHROOT_DIR}"
echo "personality=linux32"
echo "users=`id -un`"
echo "root-users=`id -un`"
) | sudo tee /etc/schroot/chroot.d/${CHROOT}.conf > /dev/null
- sudo debootstrap --variant=buildd --arch=i386 trusty ${CHROOT_DIR}
- schroot -c ${CHROOT} -u root -- sed -i "1p ; 1s| trusty | trusty-updates |" /etc/apt/sources.list
- schroot -c ${CHROOT} -u root -- apt update
- schroot -c ${CHROOT} -u root -- apt-cache search linux-header
- schroot -c ${CHROOT} -u root -- apt install -y linux-headers-`uname -r`
- wget -P /tmp/downloads http://mirrors.kernel.org/ubuntu/pool/universe/n/nasm/nasm_2.13.02-0.1_i386.deb
- schroot -c ${CHROOT} -u root -- apt install -y dpkg
- schroot -c ${CHROOT} -u root -- dpkg -i /tmp/downloads/nasm_2.13.02-0.1_i386.deb
script:
- cd platforms/linux
- make -j$(nproc)
# Cross-compiling to 32-bit Linux
- schroot -c ${CHROOT} --directory ${CHROOT_DIR}/haxm/platforms/linux -- make -j$(nproc)
- name: "haxm-windows"
os: windows
install:
- choco install -y nuget.commandline
- choco install -y windowsdriverkit10 --version 10.0.17763
- choco install -y windows-sdk-10.1 --version 10.1.17763.1
script:
- cd platforms/windows
- nuget restore
- export PATH="$PATH:/c/Program Files (x86)/Microsoft Visual Studio/Installer/"
- export MSVC=$(vswhere -latest -products "*" -requires Microsoft.Component.MSBuild -property installationPath)
- export MSVC=$(echo /$MSVC | sed -e 's/\\/\//g' -e 's/://')
- export PATH="$PATH:$MSVC/MSBuild/15.0/Bin/"
# TODO: Remove the following hack when no longer needed.
# NOTE: Officially WDK does not support VS Build Tools, only regular VS/EWDK installations,
# but since those are not supported by TravisCI, we need to install targets manually.
- unzip "/c/Program Files (x86)/Windows Kits/10/Vsix/WDK.vsix" -d wdk
- cp -R wdk/\$VCTargets/* "$MSVC/Common7/IDE/VC/VCTargets"
- export PROPS="//p:DefaultWindowsSDKVersion=10.0.17763.0 //p:SpectreMitigation=false"
- MSBuild.exe haxm.sln $PROPS //p:Configuration="Debug" //p:Platform="Win32"
- MSBuild.exe haxm.sln $PROPS //p:Configuration="Debug" //p:Platform="x64"
- build/tests/x64/Debug/haxm-tests.exe
You can’t perform that action at this time.