mirror of
https://github.com/autc04/Retro68.git
synced 2024-06-06 05:29:38 +00:00
test setup for docker
This commit is contained in:
parent
147b839de6
commit
1d8f4f6774
|
@ -25,3 +25,9 @@ RUN mkdir /Retro68-build && \
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
|
|
||||||
COPY --from=build /Retro68-build/toolchain /Retro68-build/toolchain
|
COPY --from=build /Retro68-build/toolchain /Retro68-build/toolchain
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FROM ubuntu:20.04 AS testimage
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
|
@ -13,44 +13,58 @@ jobs:
|
||||||
- task: Docker@2
|
- task: Docker@2
|
||||||
inputs:
|
inputs:
|
||||||
command: build
|
command: build
|
||||||
repository: ghcr.io/autc04/retro68-build
|
repository: ghcr.io/autc04/testimage
|
||||||
tags: latest
|
tags: latest
|
||||||
arguments: --target build
|
arguments: --target testimage
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
- task: Docker@2
|
|
||||||
inputs:
|
|
||||||
command: build
|
# - task: Docker@2
|
||||||
repository: ghcr.io/autc04/retro68
|
# inputs:
|
||||||
tags: latest
|
# command: build
|
||||||
arguments: --target release
|
# repository: ghcr.io/autc04/retro68-build
|
||||||
displayName: 'Build release'
|
# tags: latest
|
||||||
|
# arguments: --target build
|
||||||
|
# displayName: 'Build'
|
||||||
|
# - task: Docker@2
|
||||||
|
# inputs:
|
||||||
|
# command: build
|
||||||
|
# repository: ghcr.io/autc04/retro68
|
||||||
|
# tags: latest
|
||||||
|
# arguments: --target release
|
||||||
|
# displayName: 'Build release'
|
||||||
|
# - script: |
|
||||||
|
# docker run --name retro68-build --rm -i -d ghcr.io/autc04/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: autc04-github-docker
|
||||||
|
# displayName: Login to GHCR
|
||||||
|
# - task: Docker@2
|
||||||
|
# inputs:
|
||||||
|
# containerRegistry: autc04-github-docker
|
||||||
|
# repository: autc04/testimage
|
||||||
|
# command: push
|
||||||
|
# tags: latest
|
||||||
|
# displayName: 'Push release to GHCR'
|
||||||
- script: |
|
- script: |
|
||||||
docker run --name retro68-build --rm -i -d ghcr.io/autc04/retro68-build:latest
|
docker login ghcr.io/autc04 -u autc04 -p $GHC_TOKEN
|
||||||
docker exec -i retro68-build /bin/bash <<"EOF"
|
docker push ghcr.io/autc04/testimage
|
||||||
cd /Retro68-build
|
env:
|
||||||
curl -L -O https://github.com/autc04/executor/releases/download/v0.1.0/Executor2000-0.1.0-Linux.tar.bz2
|
GHCR_TOKEN: $(GHCR_TOKEN)
|
||||||
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: autc04-github-docker
|
|
||||||
displayName: Login to GHCR
|
|
||||||
- task: Docker@2
|
|
||||||
inputs:
|
|
||||||
containerRegistry: autc04-github-docker
|
|
||||||
repository: autc04/retro68
|
|
||||||
command: push
|
|
||||||
tags: latest
|
|
||||||
displayName: 'Push release to GHCR'
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user