forked from a1ive/grub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (101 loc) · 3.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# SPDX-License-Identifier: GPL-3.0+
# Originally Copyright Roger Meier <[email protected]>
# Adapted for GRUB by Alexander Graf <[email protected]>
#
# Build GRUB on Travis CI - https://www.travis-ci.org/
#
dist: bionic
language: c
addons:
apt:
packages:
- build-essential
- libsdl1.2-dev
- python
- iasl
- lzop
- unifont
- autopoint
branches:
only:
- master
env:
global:
# Include all cross toolchain paths, so we can just call them later down.
- PATH=/usr/bin:/bin:/tmp/cross/gcc-9.2.0-nolibc/aarch64-linux/bin:/tmp/cross/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin:/tmp/cross/gcc-9.2.0-nolibc/ia64-linux/bin:/tmp/cross/gcc-9.2.0-nolibc/mips64-linux/bin:/tmp/cross/gcc-9.2.0-nolibc/powerpc64-linux/bin:/tmp/cross/gcc-9.2.0-nolibc/riscv32-linux/bin:/tmp/cross/gcc-9.2.0-nolibc/riscv64-linux/bin:/tmp/cross/gcc-9.2.0-nolibc/sparc64-linux/bin
before_script:
# Install necessary toolchains based on $CROSS_TARGETS variable.
- mkdir /tmp/cross
# These give us binaries like /tmp/cross/gcc-9.2.0-nolibc/ia64-linux/bin/ia64-linux-gcc
- for i in $CROSS_TARGETS; do
( cd /tmp/cross; wget -t 3 -O - https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-$i.tar.xz | tar xJ );
done
script:
# Comments must be outside the command strings below, or the Travis parser
# will get confused.
- ./bootstrap
# Build all selected GRUB targets.
- for target in $GRUB_TARGETS; do
plat=${target#*-};
arch=${target%-*};
[ "$arch" = "arm64" ] && arch=aarch64-linux;
[ "$arch" = "arm" ] && arch=arm-linux-gnueabi;
[ "$arch" = "ia64" ] && arch=ia64-linux;
[ "$arch" = "mipsel" ] && arch=mips64-linux;
[ "$arch" = "powerpc" ] && arch=powerpc64-linux;
[ "$arch" = "riscv32" ] && arch=riscv32-linux;
[ "$arch" = "riscv64" ] && arch=riscv64-linux;
[ "$arch" = "sparc64" ] && arch=sparc64-linux;
echo "Building $target";
mkdir obj-$target;
JOBS=`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 1`;
[ "$JOBS" == 1 ] || JOBS=$(($JOBS + 1));
( cd obj-$target && ../configure --target=$arch --with-platform=$plat --prefix=/tmp/grub && make -j$JOBS && make -j$JOBS install ) &> log || ( cat log; false );
done
matrix:
include:
# Each env setting here is a dedicated build.
- name: "x86_64-efi"
env:
- GRUB_TARGETS="x86_64-efi"
# - GRUB_TARGETS="x86_64-xen"
- name: "i386-efi"
env:
- GRUB_TARGETS="i386-efi"
- name: "i386-pc"
env:
- GRUB_TARGETS="i386-pc"
# - GRUB_TARGETS="i386-coreboot i386-ieee1275 i386-multiboot i386-qemu i386-xen i386-xen_pvh"
# - name: "powerpc"
# env:
# - GRUB_TARGETS="powerpc-ieee1275"
# - CROSS_TARGETS="powerpc64-linux"
# - name: "sparc64"
# env:
# - GRUB_TARGETS="sparc64-ieee1275"
# - CROSS_TARGETS="sparc64-linux"
# - name: "ia64"
# env:
# - GRUB_TARGETS="ia64-efi"
# - CROSS_TARGETS="ia64-linux"
# - name: "mips"
# env:
# - GRUB_TARGETS="mips-arc mipsel-arc mipsel-qemu_mips mips-qemu_mips"
# - CROSS_TARGETS="mips64-linux"
- name: "arm-efi"
env:
# - GRUB_TARGETS="arm-coreboot arm-efi arm-uboot"
- GRUB_TARGETS="arm-efi"
- CROSS_TARGETS="arm-linux-gnueabi"
- name: "arm64-efi"
env:
- GRUB_TARGETS="arm64-efi"
- CROSS_TARGETS="aarch64-linux"
# - name: "riscv32"
# env:
# - GRUB_TARGETS="riscv32-efi"
# - CROSS_TARGETS="riscv32-linux"
# - name: "riscv64"
# env:
# - GRUB_TARGETS="riscv64-efi"
# - CROSS_TARGETS="riscv64-linux"