-
Notifications
You must be signed in to change notification settings - Fork 4
/
.cirrus.yml
37 lines (35 loc) · 3 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
x86_docker_builder:
env:
GITHUB_TOKEN: ENCRYPTED[98160948dd9e4613e0f7704958694e53fd7f021dd847938991e91c80e14ac5c91822aa9dff3fa34e52ec76f331beeeb5]
build_script: docker build -t ghcr.io/cheriot-platform/devcontainer:x86_64-latest .
smoketest_sail_script: docker run --rm ghcr.io/cheriot-platform/devcontainer:x86_64-latest /bin/sh -c "cd /tmp/ && git clone --recurse http://github.com/Microsoft/cheriot-rtos && cd cheriot-rtos/tests && xmake f --sdk=/cheriot-tools && xmake && xmake run"
smoketest_ibex_script: docker run --rm ghcr.io/cheriot-platform/devcontainer:x86_64-latest /bin/sh -c "cd /tmp/ && git clone --recurse http://github.com/Microsoft/cheriot-rtos && cd cheriot-rtos/tests && xmake f --sdk=/cheriot-tools --board=ibex-safe-simulator && xmake && xmake run"
login_script: |
if [ "$CIRRUS_BRANCH" == 'main' ] ; then echo $GITHUB_TOKEN | docker login ghcr.io -u davidchisnall --password-stdin ; fi
push_script: |
if [ "$CIRRUS_BRANCH" == 'main' ] ; then docker push ghcr.io/cheriot-platform/devcontainer:x86_64-latest ; fi
arm_docker_builder:
env:
CIRRUS_ARCH: arm64
GITHUB_TOKEN: ENCRYPTED[98160948dd9e4613e0f7704958694e53fd7f021dd847938991e91c80e14ac5c91822aa9dff3fa34e52ec76f331beeeb5]
build_script: docker build -t ghcr.io/cheriot-platform/devcontainer:aarch64-latest .
smoketest_sail_script: docker run --rm ghcr.io/cheriot-platform/devcontainer:aarch64-latest /bin/sh -c "cd /tmp/ && git clone --recurse http://github.com/Microsoft/cheriot-rtos && cd cheriot-rtos/tests && xmake f --sdk=/cheriot-tools && xmake && xmake run"
smoketest_ibex_script: docker run --rm ghcr.io/cheriot-platform/devcontainer:aarch64-latest /bin/sh -c "cd /tmp/ && git clone --recurse http://github.com/Microsoft/cheriot-rtos && cd cheriot-rtos/tests && xmake f --sdk=/cheriot-tools --board=ibex-safe-simulator && xmake && xmake run"
login_script: |
if [ "$CIRRUS_BRANCH" == 'main' ] ; then echo $GITHUB_TOKEN | docker login ghcr.io -u davidchisnall --password-stdin ; fi
push_script: |
if [ "$CIRRUS_BRANCH" == 'main' ] ; then docker push ghcr.io/cheriot-platform/devcontainer:aarch64-latest ; fi
final_docker_builder:
only_if: $CIRRUS_BRANCH == "main"
env:
GITHUB_TOKEN: ENCRYPTED[98160948dd9e4613e0f7704958694e53fd7f021dd847938991e91c80e14ac5c91822aa9dff3fa34e52ec76f331beeeb5]
depends_on:
- x86
- arm
login_script: echo $GITHUB_TOKEN | docker login ghcr.io -u davidchisnall --password-stdin
manifest_script: |
DATE_TAG=$(date +%Y-%m-%d.%H.%M)
docker manifest create ghcr.io/cheriot-platform/devcontainer:latest --amend ghcr.io/cheriot-platform/devcontainer:x86_64-latest --amend ghcr.io/cheriot-platform/devcontainer:aarch64-latest
docker manifest push --purge ghcr.io/cheriot-platform/devcontainer:latest
docker manifest create ghcr.io/cheriot-platform/devcontainer:$DATE_TAG --amend ghcr.io/cheriot-platform/devcontainer:x86_64-latest --amend ghcr.io/cheriot-platform/devcontainer:aarch64-latest
docker manifest push --purge ghcr.io/cheriot-platform/devcontainer:$DATE_TAG