mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 17:32:11 +03:00
Merge pull request #3046 from urbit/khrc-travis-combine
king: Build release tarballs with both king and vere.
This commit is contained in:
commit
1989f8af4c
22
.travis.yml
22
.travis.yml
@ -1,10 +1,18 @@
|
|||||||
|
stages:
|
||||||
|
- compile
|
||||||
|
# Don't run the combine stage in pull requests, because deploy is disabled there.
|
||||||
|
- name: combine
|
||||||
|
if: type != pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- stage: compile
|
||||||
|
os: linux
|
||||||
language: nix
|
language: nix
|
||||||
nix: 2.3.6
|
nix: 2.3.6
|
||||||
before_install:
|
before_install:
|
||||||
- git lfs pull
|
- git lfs pull
|
||||||
|
- echo "trusted-users = root travis" | sudo tee -a /etc/nix/nix.conf && sudo pkill nix-daemon
|
||||||
install:
|
install:
|
||||||
- nix-env -iA cachix -f https://cachix.org/api/v1/install
|
- nix-env -iA cachix -f https://cachix.org/api/v1/install
|
||||||
script:
|
script:
|
||||||
@ -14,7 +22,8 @@ jobs:
|
|||||||
- make release
|
- make release
|
||||||
- sh/ci-tests
|
- sh/ci-tests
|
||||||
|
|
||||||
- os: linux
|
- stage: compile
|
||||||
|
os: linux
|
||||||
language: generic
|
language: generic
|
||||||
env: STACK_YAML=pkg/hs/stack.yaml
|
env: STACK_YAML=pkg/hs/stack.yaml
|
||||||
cache:
|
cache:
|
||||||
@ -31,7 +40,8 @@ jobs:
|
|||||||
- stack test
|
- stack test
|
||||||
- sh/release-king-linux64-dynamic
|
- sh/release-king-linux64-dynamic
|
||||||
|
|
||||||
- os: osx
|
- stage: compile
|
||||||
|
os: osx
|
||||||
language: generic
|
language: generic
|
||||||
sudo: required
|
sudo: required
|
||||||
env: STACK_YAML=pkg/hs/stack.yaml
|
env: STACK_YAML=pkg/hs/stack.yaml
|
||||||
@ -49,6 +59,12 @@ jobs:
|
|||||||
- stack test
|
- stack test
|
||||||
- sh/release-king-darwin-dynamic
|
- sh/release-king-darwin-dynamic
|
||||||
|
|
||||||
|
- stage: combine
|
||||||
|
os: linux
|
||||||
|
language: generic
|
||||||
|
script:
|
||||||
|
- sh/combine-release-builds
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- skip_cleanup: true
|
- skip_cleanup: true
|
||||||
provider: gcs
|
provider: gcs
|
||||||
|
41
sh/combine-release-builds
Executable file
41
sh/combine-release-builds
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [ -n "${TRAVIS_TAG-}" ]
|
||||||
|
then
|
||||||
|
ver="$TRAVIS_TAG"
|
||||||
|
elif [ -n "${TRAVIS_COMMIT-}" ]
|
||||||
|
then
|
||||||
|
ver="$TRAVIS_COMMIT"
|
||||||
|
else
|
||||||
|
ver="$(git rev-parse HEAD)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
traced () {
|
||||||
|
echo '$' "$@" >&2; "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTarball () {
|
||||||
|
local plat=${1}
|
||||||
|
local haskbin=${2}
|
||||||
|
|
||||||
|
tmp=$(mktemp -d)
|
||||||
|
mkdir -p $tmp/$ver-$plat
|
||||||
|
|
||||||
|
# Fetch the vere binary and unpack it into its destination
|
||||||
|
wget "https://bootstrap.urbit.org/vere-$ver-$plat.tgz"
|
||||||
|
tar xzvf vere-$ver-$plat.tgz --strip=1 -C $tmp/$ver-$plat
|
||||||
|
|
||||||
|
# Fetch king haskell and give it executable permissions.
|
||||||
|
wget "https://bootstrap.urbit.org/$haskbin-$ver" -O $tmp/$ver-$plat/urbit-king
|
||||||
|
chmod 555 $tmp/$ver-$plat/urbit-king
|
||||||
|
|
||||||
|
echo "packaging release/$ver-$plat.tgz"
|
||||||
|
(cd $tmp; tar cz $ver-$plat) > release/$ver-$plat.tgz
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir -p release
|
||||||
|
|
||||||
|
buildTarball "linux64" "king-linux64-dynamic"
|
||||||
|
buildTarball "darwin" "king-darwin-dynamic"
|
@ -23,11 +23,11 @@ do
|
|||||||
sh/cross urbit "$plat"
|
sh/cross urbit "$plat"
|
||||||
|
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
mkdir -p $tmp/$ver-$plat
|
mkdir -p $tmp/vere-$ver-$plat
|
||||||
traced cp -r cross/$plat/* $tmp/$ver-$plat
|
traced cp -r cross/$plat/* $tmp/vere-$ver-$plat
|
||||||
|
|
||||||
echo "packaging release/$ver-$plat.tgz"
|
echo "packaging release/vere-$ver-$plat.tgz"
|
||||||
(cd $tmp; tar cz $ver-$plat) > release/$ver-$plat.tgz
|
(cd $tmp; tar cz vere-$ver-$plat) > release/vere-$ver-$plat.tgz
|
||||||
|
|
||||||
rm -rf $tmp
|
rm -rf $tmp
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user