-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
76 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,58 @@ | ||
jobs: | ||
# - template: ./osx.yml | ||
# parameters: | ||
# name: macOS | ||
# vmImage: macOS-10.13 | ||
# os: osx | ||
- template: ./windows.yml | ||
parameters: | ||
jobName: macOS | ||
vmImage: macOS-latest | ||
os: osx | ||
setupEnvironmentSteps: | ||
- task: Bash@3 | ||
displayName: Setup environment | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
set -x | ||
# Install stack | ||
curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C . | ||
# Script for restoring source files modification time from commit to avoid recompilation. | ||
curl -sSkL https://gist.githubusercontent.com/lehins/fd36a8cc8bf853173437b17f6b6426ad/raw/d9ddb32cac2f0dc6800be4fa54d450f0dcda6c60/git-modtime.hs -o git-modtime.hs | ||
# Restore mod time and setup ghc, if it wasn't restored from cache | ||
./stack script --resolver ${RESOLVER} git-modtime.hs | ||
# For faster CI turnaround, linux builds are still on Travis | ||
# - template: ./linux.yml | ||
# parameters: | ||
# name: Linux | ||
# vmImage: ubuntu-18.04 | ||
# jobName: Linux | ||
# vmImage: ubuntu-latest | ||
# os: linux | ||
|
||
- template: ./windows.yml | ||
- template: ./job.yml | ||
parameters: | ||
name: Windows | ||
vmImage: vs2017-win2016 | ||
os: windows | ||
jobName: Windows | ||
vmImage: vs2017-latest | ||
os: windows | ||
stackRoot: "$(System.DefaultWorkingDirectory)\\s" | ||
stackWork: ".w" | ||
stackWorkFull: "$(Build.SourcesDirectory)\\massiv-io\\$(STACK_WORK)" | ||
setupEnvironmentSteps: | ||
- powershell: | | ||
xcopy "$env:STACK_ROOT\\bin" "$env:LOCALAPPDATA\\Programs\\stack" /l /s /r /k /i /h /y /b | ||
displayName: Restore binaries | ||
condition: eq(variables.STACK_ROOT_RESTORED, 'true') | ||
continueOnError: true | ||
- task: Bash@3 | ||
displayName: Setup environment | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
set -x | ||
# Install stack | ||
curl -sSkL https://www.stackage.org/stack/windows-x86_64 -o stack.zip | ||
7z x stack.zip stack.exe -aoa | ||
# Script for restoring source files modification time from commit to avoid recompilation. | ||
curl -sSkL https://gist.githubusercontent.com/lehins/fd36a8cc8bf853173437b17f6b6426ad/raw/d9ddb32cac2f0dc6800be4fa54d450f0dcda6c60/git-modtime.hs -o git-modtime.hs | ||
# Restore mod time and setup ghc, if it wasn't restored from cache | ||
./stack script --resolver ${RESOLVER} git-modtime.hs | ||
- powershell: | | ||
xcopy "$env:LOCALAPPDATA\\Programs\\stack" "$env:STACK_ROOT\\bin" /l /s /r /k /i /h /y /b | ||
displayName: Save binaries | ||
continueOnError: true |