mirror of
https://github.com/enso-org/enso.git
synced 2024-11-27 04:32:09 +03:00
237 lines
8.7 KiB
YAML
237 lines
8.7 KiB
YAML
# https://aka.ms/yaml
|
|
|
|
trigger:
|
|
branches:
|
|
include: [ "*" ]
|
|
paths:
|
|
exclude:
|
|
- .github/*
|
|
- doc/*
|
|
- .gitignore
|
|
- .scalafmt.conf
|
|
- CODE_OF_CONDUCT.md
|
|
- CONTRIBUTING.md
|
|
- LICENSE
|
|
- README.md
|
|
|
|
pr: none
|
|
|
|
variables:
|
|
graalVersion: 19.3.0 # Please ensure this is in sync with the graalAPIVersion in build.sbt
|
|
graalReleasesUrl: https://github.com/graalvm/graalvm-ce-builds/releases/download
|
|
graalDistributionName: graalvm-ce-java8
|
|
sbtVersion: 1.3.3 # Please ensure this is in sync with project/build.properties
|
|
wasmpackVersion: 0.8.1
|
|
rustToolchain: nightly-2019-12-13
|
|
|
|
jobs:
|
|
- job: Linux
|
|
timeoutInMinutes: 90
|
|
pool:
|
|
vmImage: 'Ubuntu-16.04'
|
|
container:
|
|
image: oracle/graalvm-ce:$(graalVersion)-java8
|
|
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
|
|
steps:
|
|
- script: |
|
|
/tmp/docker exec -t -u 0 ci-container sh -c "yum install -y sudo"
|
|
displayName: Setup Sudo
|
|
- script: |
|
|
/tmp/docker exec -t -u 0 ci-container sh -c "yum install -y firefox"
|
|
displayName: Install Firefox
|
|
- script: |
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $(rustToolchain)
|
|
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
|
displayName: Install Rust
|
|
- script: |
|
|
cargo install wasm-pack --version $(wasmpackVersion)
|
|
displayName: Install Wasm-Pack
|
|
- script: |
|
|
curl -fSL -o sbt.tgz https://piccolo.link/sbt-$(sbtVersion).tgz
|
|
tar -x -z -C ~ -f sbt.tgz
|
|
echo "##vso[task.setvariable variable=PATH]~/sbt/bin/:$PATH"
|
|
displayName: Install SBT
|
|
- script: |
|
|
sbt -no-colors syntaxJS/fullOptJS
|
|
displayName: Generate target/scala-parser.js
|
|
continueOnError: true
|
|
- script: |
|
|
cargo build --all
|
|
displayName: Cargo Build
|
|
continueOnError: true
|
|
- script: |
|
|
cargo test --all
|
|
displayName: Cargo Test
|
|
continueOnError: true
|
|
- script: |
|
|
wasm-pack test common/rust/parser --headless --firefox
|
|
displayName: Wasm-Pack Test Parser
|
|
continueOnError: true
|
|
- script: |
|
|
sbt -no-colors test
|
|
displayName: Test SBT
|
|
continueOnError: true
|
|
- script: |
|
|
sbt -no-colors syntax/bench
|
|
displayName: Benchmark the Parser
|
|
continueOnError: true
|
|
- script: |
|
|
sbt -no-colors runtime/Benchmark/compile
|
|
displayName: Check Runtime Benchmarks Compile
|
|
continueOnError: true
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '**/TEST-*.xml'
|
|
- script: |
|
|
sbt language_server/assembly
|
|
displayName: Build the Uberjar
|
|
continueOnError: true
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
contents: "enso.jar"
|
|
TargetFolder: "$(Build.ArtifactStagingDirectory)"
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
|
|
artifactName: enso-cli
|
|
- script: |
|
|
echo "##vso[task.complete result=Failed;]DONE"
|
|
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
|
|
displayName: Fail on Issues
|
|
- job: macOS
|
|
timeoutInMinutes: 90
|
|
pool:
|
|
vmImage: macOS-10.13
|
|
steps:
|
|
- script: |
|
|
curl -fSL -o graal.tar.gz $(graalReleasesUrl)/vm-$(graalVersion)/$(graalDistributionName)-darwin-amd64-$(graalVersion).tar.gz
|
|
tar -x -z -C ~ -f graal.tar.gz
|
|
ls ~/$(graalDistributionName)-$(graalVersion)
|
|
sudo mv ~/$(graalDistributionName)-$(graalVersion) /Library/Java/JavaVirtualMachines
|
|
echo "##vso[task.setvariable variable=JAVA_HOME]/Library/Java/JavaVirtualMachines/$(graalDistributionName)-$(graalVersion)/Contents/Home"
|
|
echo "##vso[task.setvariable variable=PATH]/Library/Java/JavaVirtualMachines/$(graalDistributionName)-$(graalVersion)/Contents/Home/bin:$PATH"
|
|
displayName: Install GraalVM
|
|
- script: |
|
|
curl -fSL -o firefox.dmg "https://download.mozilla.org/?product=firefox-latest-ssl&os=osx"
|
|
hdiutil attach firefox.dmg
|
|
cp -R /Volumes/Firefox/Firefox.app /Applications/Firefox.app
|
|
displayName: Install Firefox
|
|
- script: |
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(rustToolchain)
|
|
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
|
displayName: Install Rust
|
|
- script: |
|
|
cargo install wasm-pack --version $(wasmpackVersion)
|
|
displayName: Install Wasm-Pack
|
|
- script: |
|
|
curl -fSL -o sbt.tgz https://piccolo.link/sbt-$(sbtVersion).tgz
|
|
tar -x -z -C ~ -f sbt.tgz
|
|
echo "##vso[task.setvariable variable=PATH]~/sbt/bin/:$PATH"
|
|
displayName: Install SBT
|
|
- script: |
|
|
sbt -no-colors syntaxJS/fullOptJS
|
|
displayName: Generate target/scala-parser.js
|
|
continueOnError: true
|
|
- script: |
|
|
cargo build --all
|
|
displayName: Cargo Build
|
|
continueOnError: true
|
|
- script: |
|
|
cargo test --all
|
|
displayName: Cargo Test
|
|
continueOnError: true
|
|
- script: |
|
|
wasm-pack test common/rust/parser --headless --firefox
|
|
displayName: Wasm-Pack Test Parser
|
|
continueOnError: true
|
|
- script: |
|
|
sbt -no-colors test
|
|
displayName: Test SBT
|
|
continueOnError: true
|
|
- script: |
|
|
sbt -no-colors syntax/bench
|
|
displayName: Benchmark the Parser
|
|
continueOnError: true
|
|
- script: |
|
|
sbt -no-colors runtime/Benchmark/compile
|
|
displayName: Check Runtime Benchmarks Compile
|
|
continueOnError: true
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '**/TEST-*.xml'
|
|
- script: |
|
|
echo "##vso[task.complete result=Failed;]DONE"
|
|
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
|
|
displayName: Fail on Issues
|
|
- job: Windows
|
|
timeoutInMinutes: 90
|
|
pool:
|
|
vmImage: windows-2019
|
|
steps:
|
|
- script: |
|
|
curl -fSL -o graal.zip $(graalReleasesUrl)/vm-$(graalVersion)/$(graalDistributionName)-windows-amd64-$(graalVersion).zip
|
|
7z x -y -oC:\ graal.zip
|
|
displayName: Install GraalVM
|
|
- script: |
|
|
curl -fSL -o firefox.exe "https://download.mozilla.org/?product=firefox-latest-ssl&os=win"
|
|
firefox.exe /S
|
|
displayName: Install Firefox
|
|
- script: |
|
|
curl -sSf -o rustup-init.exe "https://win.rustup.rs"
|
|
rustup-init.exe -y --default-toolchain $(rustToolchain)
|
|
rustup update nightly
|
|
rustup override set nightly
|
|
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
|
|
displayName: Install Rust
|
|
- script: |
|
|
cargo install wasm-pack --version $(wasmpackVersion)
|
|
displayName: Install Wasm-Pack
|
|
- script: |
|
|
curl -fSL -o sbt.tgz https://piccolo.link/sbt-$(sbtVersion).tgz
|
|
tar -x -z -C %USERPROFILE% -f sbt.tgz
|
|
displayName: Install SBT
|
|
- script: |
|
|
call refreshenv
|
|
echo ##vso[task.setvariable variable=JAVA_HOME]C:\$(graalDistributionName)-$(graalVersion)
|
|
echo ##vso[task.setvariable variable=PATH]C:\$(graalDistributionName)-$(graalVersion)\bin;%PATH%
|
|
echo ##vso[task.setvariable variable=PATH]%USERPROFILE%\sbt\bin\;%PATH%
|
|
displayName: Adjust Environment Variables
|
|
- script: |
|
|
sbt -no-colors syntaxJS/fullOptJS
|
|
displayName: Generate target/scala-parser.js
|
|
continueOnError: true
|
|
- script: |
|
|
cargo build --all
|
|
displayName: Cargo Build
|
|
continueOnError: true
|
|
- script: |
|
|
cargo test --all
|
|
continueOnError: true
|
|
displayName: Cargo Test
|
|
- script: |
|
|
wasm-pack test common/rust/parser --headless --firefox
|
|
displayName: Wasm-Pack Test Parser
|
|
continueOnError: true
|
|
- script: |
|
|
sbt test
|
|
displayName: Test SBT
|
|
continueOnError: true
|
|
- script: |
|
|
sbt syntax/bench
|
|
displayName: Benchmark the Parser
|
|
continueOnError: true
|
|
- script: |
|
|
sbt runtime/Benchmark/compile
|
|
displayName: Check Runtime Benchmarks Compile
|
|
continueOnError: true
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '**/TEST-*.xml'
|
|
- script: |
|
|
echo "##vso[task.complete result=Failed;]DONE"
|
|
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
|
|
displayName: Fail on Issues
|