forked from gentoo/sci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (40 loc) · 2.01 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
#
# Run repoman via travis
# See https://github.com/mrueg/repoman-travis
#
language: python
python:
- pypy
env:
- PORTAGE_VER="2.2.27"
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libxml2
before_script:
- mkdir travis-overlay
- mv !(travis-overlay) travis-overlay/
- mv .git travis-overlay/
- wget "https://raw.githubusercontent.com/mrueg/repoman-travis/master/.travis.yml" -O .travis.yml.upstream
- wget "https://raw.githubusercontent.com/mrueg/repoman-travis/master/spinner.sh"
- wget "https://github.com/gentoo/portage/archive/v${PORTAGE_VER}.tar.gz" -O portage-${PORTAGE_VER}.tar.gz
- wget "https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz" -O portage-tree.tar.gz
- sudo chmod a+rwX /etc/passwd /etc/group /etc /usr spinner.sh
- chmod a+rwx spinner.sh
- echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd
- echo "portage::250:portage,travis" >> /etc/group
- mkdir -p /etc/portage /usr/portage/distfiles
- wget "https://www.gentoo.org/dtd/metadata.dtd" -O /usr/portage/distfiles/metadata.dtd
- tar xzf portage-${PORTAGE_VER}.tar.gz
- tar xzf portage-tree.tar.gz -C /usr/portage --strip-components=1
- cp portage-${PORTAGE_VER}/cnf/repos.conf /etc/portage/
- ln -s /usr/portage/profiles/base/ /etc/portage/make.profile
- SIZE=$(stat -c %s .travis.yml.upstream)
- if ! cmp -n $SIZE -s .travis.yml .travis.yml.upstream; then echo -e "\e[31m !!! .travis.yml outdated! Update available https://github.com/mrueg/repoman-travis \e[0m" > /tmp/update ; fi
- cd travis-overlay
script:
- ./../spinner.sh "python ../portage-${PORTAGE_VER}/bin/repoman full -d"
# You can append own scripts after this line
- wget "https://raw.githubusercontent.com/mgorny/gentoo-xml-schema/master/metadata.xsd" -O metadata.xsd
- xmllint --noout --schema metadata.xsd */*/metadata.xml 2>&1 | grep "fails to validate"; [[ ${PIPESTATUS[0]} == 0 ]] || exit 1
notifications:
irc: "chat.freenode.net#gentoo-science"