Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,41 @@ matrix:
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 http://mirrors.kernel.org/ubuntu/pool/universe/n/nasm/nasm_2.13.02-0.1_amd64.deb
- 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 nasm_2.13.02-0.1_amd64.deb
- 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If the current directory is our git repo, maybe it would be better to tell wget to use a different location for the downloaded files? E.g. wget -P /tmp/haxm-downloads/ <url> (BTW, -P seems to automatically create the directory). Otherwise this line would copy an extra .deb file, and we would be building from a "dirty" source tree.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Fixed as of 2403ad3.

- 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
Expand Down