-
Notifications
You must be signed in to change notification settings - Fork 772
132 lines (114 loc) · 4.83 KB
/
docker.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: docker
on:
# Trigger this workflow when the "deploy" workflow has completed successfully
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run
workflow_run:
workflows:
- deploy
branches:
- master
types:
- completed
jobs:
# runs on x86-64 (xeon-d) host: matterhorn
image_amd64:
runs-on: [self-hosted, linux, X64]
# docker images are only built and published (to DockerHub) when merging
# to master (not a yet unmerged PR!)
if: github.ref == 'refs/heads/master'
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
steps:
- uses: actions/checkout@v2
- name: Set environment
run: |
echo AUTOBAHN_BUILD_DATE=`date -u +"%Y-%m-%d"` >> $GITHUB_ENV
echo AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV
echo AUTOBAHN_VCS_REF=`git rev-parse --short ${GITHUB_SHA}` >> $GITHUB_ENV
echo AUTOBAHN_VERSION=$(grep -E '^(__version__)' ./autobahn/_version.py | cut -d ' ' -f3 | sed -e 's|[u"'\'']||g') >> $GITHUB_ENV
- name: Print environment
run: |
echo ""
echo "Build environment configured:"
echo ""
echo " AUTOBAHN_BUILD_DATE = ${AUTOBAHN_BUILD_DATE}"
echo " AUTOBAHN_BUILD_ID = ${AUTOBAHN_BUILD_ID}"
echo " AUTOBAHN_VCS_REF = ${AUTOBAHN_VCS_REF}"
echo " AUTOBAHN_VERSION = ${AUTOBAHN_VERSION}"
echo ""
echo "Wheels (source):"
echo " AWS_DEFAULT_REGION = ${AWS_DEFAULT_REGION}"
echo " AWS_S3_BUCKET_NAME = ${AWS_S3_BUCKET_NAME}"
echo ""
echo "Docker image (publish):"
echo " DOCKERHUB_USER = ${DOCKERHUB_USER}"
echo ""
- name: Build & publish Docker image for cpy-amd64
run: |
cd ./docker && \
make download_wheels && \
make build_cpy_amd64 && \
make test_cpy_amd64
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
make publish_cpy_amd64
- name: Build & publish Docker image for pypy-amd64
run: |
cd ./docker && \
make download_wheels && \
make build_pypy_amd64 && \
make test_pypy_amd64
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
make publish_pypy_amd64
# runs on ARM64v8 (AWS Graviton) host: buildbox-arm64.crossbario.com
# image_arm64:
# runs-on: [self-hosted, linux, ARM64]
# # docker images are only built and published (to DockerHub) when merging
# # to master (not a yet unmerged PR!)
# if: github.ref == 'refs/heads/master'
# env:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
# AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
# steps:
# - uses: actions/checkout@v2
# - name: Set environment
# run: |
# echo AUTOBAHN_BUILD_DATE=`date -u +"%Y-%m-%d"` >> $GITHUB_ENV
# echo AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV
# echo AUTOBAHN_VCS_REF=`git rev-parse --short ${GITHUB_SHA}` >> $GITHUB_ENV
# echo AUTOBAHN_VERSION=$(grep -E '^(__version__)' ./autobahn/_version.py | cut -d ' ' -f3 | sed -e 's|[u"'\'']||g') >> $GITHUB_ENV
# - name: Print environment
# run: |
# echo ""
# echo "Build environment configured:"
# echo ""
# echo " AUTOBAHN_BUILD_DATE = ${AUTOBAHN_BUILD_DATE}"
# echo " AUTOBAHN_BUILD_ID = ${AUTOBAHN_BUILD_ID}"
# echo " AUTOBAHN_VCS_REF = ${AUTOBAHN_VCS_REF}"
# echo " AUTOBAHN_VERSION = ${AUTOBAHN_VERSION}"
# echo ""
# echo "Wheels (source):"
# echo " AWS_DEFAULT_REGION = ${AWS_DEFAULT_REGION}"
# echo " AWS_S3_BUCKET_NAME = ${AWS_S3_BUCKET_NAME}"
# echo ""
# echo "Docker image (publish):"
# echo " DOCKERHUB_USER = ${DOCKERHUB_USER}"
# echo ""
# - name: Build & publish Docker image for cpy-arm64
# run: |
# cd ./docker && \
# make download_wheels && \
# make build_cpy_arm64v8 && \
# make test_cpy_arm64v8
# docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
# make publish_cpy_arm64v8
# - name: Build & publish Docker image for pypy-arm64
# run: |
# cd ./docker && \
# make download_wheels && \
# make build_pypy_arm64v8 && \
# make test_pypy_arm64v8
# docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_PASSWORD }} docker.io && \
# make publish_pypy_arm64v8