Code Monkey home page Code Monkey logo

buildbot's Introduction

Lutris buildbot
===============

This repository contains various build scripts for runners and games used by
Lutris. The target system for these scripts is Ubuntu 16.04 (the same system
used by the Lutris runtime).

It is advised to run these scripts from a LXC container. It's potentially
possible to use other container technology such as Docker but we strongly
advise against it. Virtual machines are ok to use too.

The only case where these containers need to communicate is when build 64bit
builds of Wine. These builds are actually multi-arch and provide 32 and 64bit
support. Make sure the 32 bit container is able to SSH (without a password) to
ubuntu@buildbot64 and inversely, that the 64bit container can SSH to
ubuntu@buildbot32.

To create the containers, first make sure you have the client installed::

    sudo apt install lxd lxd-client

Also make sure to add your current user to the lxc group::

    sudo usermod -G lxd myusername
    newgrp lxd

If this is a new lxd installation, prepare the host environment:

    cat buildbot/preseed | lxd init --preseed

alternatively to manually set all lxd options (not recommended) use:

    lxd init

You can create the containers with a command such as::

    lxc launch images:ubuntu/bionic/amd64 buildbot-bionic-amd64

or for the 32bit container::

    lxc launch images:ubuntu/bionic/i386 buildbot-bionic-i386

To set up the container, you can enter it with the following command::

    lxc exec <container name> bash

On each container, the minimal system should have the following packages installed::

    apt-get install -y build-essential vim git wget curl python openssh-server

On each container, set a passwd for your ubuntu user::

    passwd ubuntu

On each container, to install packages without having to enter a root password add with visudo:

    ubuntu ALL=NOPASSWD: /usr/bin/apt
    ubuntu ALL=NOPASSWD: /usr/bin/apt-get
    ubuntu ALL=NOPASSWD: /usr/bin/dpkg

Exit both containers, then run setup.sh to setup ssh config files on the host and containers:

    cd buildbot
    ./setup.sh buildbot-bionic-amd64 buildbot-bionic-i386

Run the container setup script on each container:

    ./setup-container.sh buildbot-bionic-amd64
    ./setup-container.sh buildbot-bionic-i386

Connect to each container and perform the following so that they can communicate with eachother and are build ready:

    ssh buildbot-bionic-amd64
    chown -R ubuntu:ubuntu ~/.ssh/config
    ssh-keygen
    ssh-copy-id ubuntu@buildbot32
    ./setup-userspace.sh
    exit

    ssh buildbot-bionic-i386
    chown -R ubuntu:ubuntu ~/.ssh/config
    ssh-keygen
    ssh-copy-id ubuntu@buildbot64
    ./setup-userspace.sh
    exit

Now you are ready to compile. To build a wine runner:

   ssh buildbot-bionic-amd64
   cd buildbot/runners/wine
   ./build.sh -pass -your -options -here

Options available are:

        -a|--as) usage: -a <custom build name>
        -b|--branch) usage: -b <git repo branch>
        -w|--with) usage: -w <git repo>
        -v|--version) usage: -v <version>
        -p|--patch) usage: -p <patch>
        -s|--staging
        -n|--noupload
        -d|--dependencies
        -6|--64bit
        -k|--keep

Example:

x86_64:
	ssh ubuntu@buildbot-bionic-amd64
	./build.sh --as lutris --version 4.10 --with https://github.com/lutris/wine --branch ge-protonified-4.10 --noupload --keep

i386:
	ssh ubuntu@buildbot-bionic-i386
	./build.sh --as lutris --version 4.10 --with https://github.com/lutris/wine --branch ge-protonified-4.10 --noupload --keep

Note: x86_64 build utilizes the i386 lxd container and is built with 32 bit included, you don't need to run both. i386 is for an i386-only build.

If you plan to publish runners and runtimes to Digital Ocean, don't forget to
copy the configuration files in ~/.aws/credentials and ~/.s3cfg

buildbot's People

Contributors

strycore avatar robloach avatar gloriouseggroll avatar daniel-j avatar letiliel avatar mike-teehan avatar natis1 avatar tannisroot avatar tk-glitch avatar 999gary avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.