Files
runner-images/images/macos/provision/core/stack.sh
Darii Nurgaleev df05e8c6cb [macOS] Pester tests fail on error (#2378)
* [macOS] Fail Pester tests on error

* return it back

* [macOS] Pester tests fail on error

* some tests were moved

* appcenter cli moved

* openssl separate describe

* added new tests for java

* moved stack from haskell

* invoke tests to stack

* xamarin added tests sources

* mongo tests fix

* ndk path

* xamarin-android-ndk-tests removed

* fix nitpicks

* added new filename for XamarinNDK

* AzCopy Describe change

* added azcopy C correct.

* android additional_tools tests

* remove null elements from massive

* added new lines for verification macos 10.13

* add Android Tests for mac, not for linux
2021-01-11 09:30:51 +03:00

27 lines
897 B
Bash

#!/bin/bash -e -o pipefail
source ~/utils/invoke-tests.sh
source ~/utils/utils.sh
echo "Get the latest Stack version..."
StackRelease=$(curl -s "https://api.github.com/repos/commercialhaskell/stack/releases/latest")
DownloadUrl=$(echo $StackRelease | jq -r '.assets[].browser_download_url | select(contains("osx-x86_64.tar.gz"))' | head -n 1)
StackVersion=$(echo $StackRelease | jq -r '.name' | cut -c2-)
StackArchive="/tmp/stack.tar.gz"
echo "Download stack version $StackVersion..."
download_with_retries $DownloadUrl "/tmp" "stack.tar.gz"
StackToolcachePath="$AGENT_TOOLSDIRECTORY/stack/$StackVersion"
DestinationPath="$StackToolcachePath/x64"
mkdir -p $DestinationPath
echo "Unzip stack archive..."
tar -xzf $StackArchive -C $DestinationPath --strip 1
touch $StackToolcachePath/x64.complete
echo "export PATH="\$PATH":$DestinationPath" >> "$HOME/.bashrc"
invoke_tests "Common" "Stack"