Retro68/azure-pipelines.yml
Mark Cave-Ayland de06b24fd7 azure-pipelines.yml: push retro68 release image to GHCR
This release image contains the basic toolchain that can be used for building
projects without having to build Retro68 locally, including integration into a
CI pipeline.
2023-12-16 12:59:53 +01:00

57 lines
1.7 KiB
YAML

trigger:
- master
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 90
steps:
- checkout: self
submodules: true
- task: Docker@2
inputs:
command: build
repository: ghcr.io/mcayland/retro68-build
tags: latest
arguments: --target build
displayName: 'Build'
- task: Docker@2
inputs:
command: build
repository: ghcr.io/mcayland/retro68
tags: latest
arguments: --target release
displayName: 'Build release'
- script: |
docker run --name retro68-build --rm -i -d ghcr.io/mcayland/retro68-build:latest
docker exec -i retro68-build /bin/bash <<"EOF"
cd /Retro68-build
curl -L -O https://github.com/autc04/executor/releases/download/v0.1.0/Executor2000-0.1.0-Linux.tar.bz2
tar xfvj Executor2000-0.1.0-Linux.tar.bz2 Executor2000-0.1.0-Linux/bin/executor-headless
echo "executor-path=`pwd`/Executor2000-0.1.0-Linux/bin/executor-headless" > ~/.LaunchAPPL.cfg
echo "emulator=executor" >> ~/.LaunchAPPL.cfg
ctest --no-compress-output -T test -E Carbon || true
EOF
mkdir build && docker cp retro68-build:/Retro68-build/Testing build
docker stop retro68-build
displayName: Run Tests using Executor 2000
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: build/Testing/**/*.xml
buildPlatform: 'x86_64-linux'
- task: Docker@2
inputs:
command: login
containerRegistry: mcayland-github-docker
displayName: Login to GHCR
- task: Docker@2
inputs:
containerRegistry: mcayland-github-docker
repository: mcayland/retro68
command: push
tags: latest
displayName: 'Push release to GHCR'