mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-02 11:54:06 +03:00
Simplify the CI (#119)
This PR removes some things in the travis CI that I cargo culted and didn't understand but am reasonably sure don't do anything except slow down CI times.
This commit is contained in:
parent
6c1a6575bb
commit
b23f7d2561
@ -31,7 +31,6 @@ matrix:
|
||||
install:
|
||||
- unset CC
|
||||
- export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:$PATH
|
||||
- ./.travis/install-ghr.sh
|
||||
- ./.travis/install-stack.sh
|
||||
|
||||
script:
|
||||
@ -43,8 +42,3 @@ script:
|
||||
$STACK test --ghc-options="$GHC_OPTIONS"
|
||||
set +ex
|
||||
|
||||
after_success:
|
||||
- |
|
||||
# Build and ship binary
|
||||
./.travis/attach-binary.sh
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -o errexit -o verbose
|
||||
|
||||
if test ! "$BUILD_BINARY" || test ! "$TRAVIS_TAG"
|
||||
then
|
||||
echo 'This is not a release build.'
|
||||
elif test ! "$GITHUB_TOKEN"
|
||||
then
|
||||
echo 'The GITHUB_TOKEN environment variable is not set!'
|
||||
exit 1
|
||||
else
|
||||
echo "Building binary for $TRAVIS_OS_NAME to $TRAVIS_TAG..."
|
||||
stack build --ghc-options -O2 --pedantic
|
||||
echo "Attaching binary for $TRAVIS_OS_NAME to $TRAVIS_TAG..."
|
||||
OWNER="$(echo "$TRAVIS_REPO_SLUG" | cut -f1 -d/)"
|
||||
REPO="$(echo "$TRAVIS_REPO_SLUG" | cut -f2 -d/)"
|
||||
BIN="$(stack path --local-install-root)/bin/$REPO"
|
||||
BUNDLE_NAME="$REPO-$TRAVIS_TAG-$TRAVIS_OS_NAME.tar.gz"
|
||||
cp "$BIN" "./$REPO"
|
||||
chmod +x "./$REPO"
|
||||
tar -czf "$BUNDLE_NAME" "$REPO"
|
||||
echo "SHA256:"
|
||||
shasum -a 256 "$BUNDLE_NAME"
|
||||
ghr -t "$GITHUB_TOKEN" -u "$OWNER" -r "$REPO" --replace "$(git describe --tags)" "$BUNDLE_NAME"
|
||||
fi
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -o errexit -o verbose
|
||||
|
||||
if test ! "$BUILD_BINARY" || test ! "$TRAVIS_TAG"
|
||||
then
|
||||
echo 'This is not a release build.'
|
||||
else
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]
|
||||
then
|
||||
ARCH="linux"
|
||||
else
|
||||
ARCH="darwin"
|
||||
fi
|
||||
echo "Installing ghr"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_${ARCH}_386.zip"
|
||||
curl -L ${URL} > ghr.zip
|
||||
mkdir -p "$HOME/bin"
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
unzip ghr.zip -d "$HOME/bin"
|
||||
rm ghr.zip
|
||||
fi
|
Loading…
Reference in New Issue
Block a user