Skip to content

Commit

Permalink
Added travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroliu committed Sep 9, 2019
1 parent e85b79e commit 66dd974
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
language: bash

env:
global:
- PATH=$PATH:/tmp/bin
- TAG=2019042701

matrix:
#~ - ARCH=x86_64 BOOTSTRAP=x86_64
#~ - ARCH=i686 BOOTSTRAP=i686
- ARCH=x86_64-musl BOOTSTRAP=x86_64-musl

install:
- docker pull voidlinux/masterdir-$BOOTSTRAP:$TAG
- docker run -d --name void -v "$(pwd)":/hostrepo -v /tmp:/tmp -e PATH="$PATH" voidlinux/masterdir-$BOOTSTRAP:$TAG /bin/sh -c 'sleep inf'

before_script:
- mkdir -p /tmp/bin
- wget -q -O - https://github.com/chneukirchen/xtools/archive/master.tar.gz | gunzip | tar x -C /tmp/bin --wildcards "xtools-master/x*" --strip-components=1 || exit 1

script:
- docker exec -t void hostrepo/travis/build.sh $BOOTSTRAP $ARCH

#~ after_script:
#~ - docker exec -t void hostrepo/common/travis/show_files.sh $BOOTSTRAP $ARCH; fi

deploy:
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file:
- glibc-x86_64-musl.tar.gz
skip_cleanup: true
on:
tags: true

notifications:
email: false

25 changes: 25 additions & 0 deletions travis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
#
# build.sh

set -euf -o pipefail

if [ "$1" != "$2" ]; then
arch="-a $2"
fi
bootstrap="$1"
arch="$2"

if [ "$arch" = "x86_64-musl" ] ; then
(
cd /hostrepo/snippets/void-glibc-in-musl
rm -f glibc
gcc -s -o glibc glibc.c
tar zcvf /hostrepo/glibc-$arch.tar.gz glibc
rm -f glibc
)
fi

ls -l

exit 0

0 comments on commit 66dd974

Please sign in to comment.