76 lines
2.5 KiB
YAML
76 lines
2.5 KiB
YAML
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
tags:
|
|
include:
|
|
- '*'
|
|
|
|
jobs:
|
|
- job: Nix
|
|
strategy:
|
|
matrix:
|
|
Linux:
|
|
imageName: ubuntu-latest
|
|
Linux Debug:
|
|
imageName: ubuntu-latest
|
|
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Debug
|
|
Linux -fsanitize=address,undefined:
|
|
imageName: ubuntu-latest
|
|
CMAKE_OPTIONS: -DLEAN_EXTRA_CXX_FLAGS=-fsanitize=address,undefined -DLEANC_EXTRA_FLAGS=-fsanitize=address,undefined
|
|
Linux LLVM=ON:
|
|
imageName: ubuntu-latest
|
|
CMAKE_OPTIONS: -DLLVM=ON
|
|
Linux Clang 8 LLVM=ON:
|
|
imageName: ubuntu-latest
|
|
NIX_SHELL_OPTIONS: --arg clang '(import <nixpkgs> {}).clang_8'
|
|
CMAKE_OPTIONS: -DLLVM=ON
|
|
macOS:
|
|
imageName: macos-latest
|
|
pool:
|
|
vmImage: $(imageName)
|
|
steps:
|
|
- script: |
|
|
# https://github.com/commercialhaskell/stack/commit/b2e2f3d0568e6d73fc0477dee8ca7c04466ec1f6
|
|
(for i in {1..5}; do bash <(curl https://nixos.org/nix/install) && exit 0; done; exit 1)
|
|
. ~/.nix-profile/etc/profile.d/nix.sh
|
|
# open shell once for initial setup
|
|
eval nix-shell $NIX_SHELL_OPTIONS --run true
|
|
displayName: Setup
|
|
- script: |
|
|
. ~/.nix-profile/etc/profile.d/nix.sh
|
|
export CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ $CMAKE_OPTIONS"
|
|
eval nix-shell $NIX_SHELL_OPTIONS --run ./script/ci.sh
|
|
displayName: Build
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: cTest
|
|
testResultsFiles: build/Testing/*/Test.xml
|
|
testRunTitle: $(Agent.JobName)
|
|
condition: succeededOrFailed()
|
|
displayName: Publish test results
|
|
|
|
- job: Windows
|
|
pool:
|
|
vmImage: windows-latest
|
|
steps:
|
|
- script: |
|
|
choco install -y msys2
|
|
C:\tools\msys64\usr\bin\bash -lc "pacman --noconfirm -S make python mingw-w64-x86_64-cmake mingw-w64-x86_64-clang mingw-w64-x86_64-polly git diffutils"
|
|
displayName: Setup
|
|
- script: |
|
|
C:\tools\msys64\usr\bin\bash -l ./script/ci.sh
|
|
env:
|
|
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
|
# use mingw64 shell
|
|
MSYSTEM: MINGW64
|
|
# don't let bash reset cwd
|
|
CHERE_INVOKING: 1
|
|
displayName: Build
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFormat: cTest
|
|
testResultsFiles: build/Testing/*/Test.xml
|
|
testRunTitle: $(Agent.JobName)
|
|
condition: succeededOrFailed()
|
|
displayName: Publish test results
|