tectonic/dist/azure-build-and-test-cross.yml

42 lines
1.2 KiB
YAML

# Copyright 2019-2022 the Tectonic Project
# Licensed under the MIT License.
steps:
- template: azure-generic-build-setup.yml
- bash: docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
displayName: Set up QEMU
- bash: docker run --rm -v $(pwd):/work:rw,Z tectonictypesetting/ttcross:latest
displayName: Install custom-built cross tool
- bash: |
echo "##vso[task.setvariable variable=CROSS_ARGS;]--target=$TARGET --release"
displayName: Set build variables
# Main build/test
- bash: ./cross build $CROSS_ARGS --all
displayName: "cross build"
- bash: ./cross test $CROSS_ARGS --all
displayName: "cross test"
# Publish binaries
- bash: |
set -ex
artifact_dir="$(Build.ArtifactStagingDirectory)/binary-$TARGET"
mkdir -p "$artifact_dir"
cranko cargo package-released-binaries --command-name=./cross --reroot=. \
-t $TARGET \
$artifact_dir \
-- build $CROSS_ARGS
displayName: "Package binaries"
- task: PublishPipelineArtifact@1
displayName: Publish packaged binary artifact
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/binary-$(TARGET)'
artifactName: binary-$(TARGET)