1313 - ' .github/workflows/webserver.yml'
1414
1515jobs :
16- webserver-build-test-ubuntu :
17- name : webserver-ubuntu-build
16+ webserver-build-test-ubuntu-x64 :
17+ name : webserver-ubuntu-build-x64
1818 runs-on : ubuntu-20.04
1919 steps :
2020 - name : checkout otel webserver
2424 uses : docker/setup-buildx-action@master
2525 with :
2626 install : true
27+ platforms : linux/amd64
2728 - name : cache docker layers
2829 uses : actions/cache@v3
2930 with :
@@ -34,18 +35,18 @@ jobs:
3435 - name : setup docker image
3536 run : |
3637 cd instrumentation/otel-webserver-module
37- docker buildx build -t apache_ubuntu -f docker/ubuntu20.04/Dockerfile \
38- --cache-from type=local,src=/tmp/buildx-cache/apache_ubuntu \
39- --cache-to type=local,dest=/tmp/buildx-cache/apache_ubuntu -new \
38+ docker buildx build -t apache_ubuntu_amd64 -f docker/ubuntu20.04/Dockerfile \
39+ --cache-from type=local,src=/tmp/buildx-cache/apache_ubuntu_amd64 \
40+ --cache-to type=local,dest=/tmp/buildx-cache/apache_ubuntu_amd64 -new \
4041 --load .
4142 - name : build
4243 run : |
43- docker run -idt --name apache_ubuntu_container apache_ubuntu /bin/bash
44+ docker run -idt --name apache_ubuntu_container_amd64 apache_ubuntu_amd64 /bin/bash
4445 cd instrumentation/otel-webserver-module
45- docker exec apache_ubuntu_container bash -c \
46+ docker exec apache_ubuntu_container_amd64 bash -c \
4647 'cd /otel-webserver-module; rm -rf *;'
47- docker cp . $(docker inspect --format="{{.Id}}" apache_ubuntu_container ):/otel-webserver-module/
48- docker exec apache_ubuntu_container bash -c \
48+ docker cp . $(docker inspect --format="{{.Id}}" apache_ubuntu_container_amd64 ):/otel-webserver-module/
49+ docker exec apache_ubuntu_container_amd64 bash -c \
4950 'cd /otel-webserver-module; rm -rf build; \
5051 cp -r /dependencies /otel-webserver-module/; \
5152 cp -r /build-dependencies /otel-webserver-module/; \
@@ -54,20 +55,91 @@ jobs:
5455
5556 - name : update cache
5657 run : |
57- rm -rf /tmp/buildx-cache/apache_ubuntu
58- mv /tmp/buildx-cache/apache_ubuntu -new /tmp/buildx-cache/apache_ubuntu
58+ rm -rf /tmp/buildx-cache/apache_ubuntu_amd64
59+ mv /tmp/buildx-cache/apache_ubuntu_amd64 -new /tmp/buildx-cache/apache_ubuntu_amd64
5960
60- webserver-build-test-centos7 :
61- name : webserver-centos7 -build
61+ webserver-build-test-ubuntu-arm64 :
62+ name : webserver-ubuntu -build-arm64
6263 runs-on : ubuntu-20.04
6364 steps :
6465 - name : checkout otel webserver
6566 uses : actions/checkout@v3
67+ - name : setup qemu
68+ uses : docker/setup-qemu-action@master
6669 - name : setup buildx
6770 id : buildx
6871 uses : docker/setup-buildx-action@master
6972 with :
7073 install : true
74+ platforms : linux/arm64
75+ - name : cache docker layers
76+ uses : actions/cache@v3
77+ with :
78+ path : /tmp/buildx-cache/
79+ key : apache-ubuntu-20.04-${{ github.sha }}
80+ restore-keys : |
81+ apache-ubuntu-20.04
82+ - name : setup docker image
83+ run : |
84+ cd instrumentation/otel-webserver-module
85+ docker buildx build -t apache_ubuntu_arm64 -f docker/ubuntu20.04/Dockerfile \
86+ --cache-from type=local,src=/tmp/buildx-cache/apache_ubuntu_arm64 \
87+ --cache-to type=local,dest=/tmp/buildx-cache/apache_ubuntu_arm64-new \
88+ --load . --platform linux/arm64
89+ - name : build
90+ run : |
91+ docker run -idt --platform linux/arm64 --name apache_ubuntu_container_arm64 apache_ubuntu_arm64 /bin/bash
92+ cd instrumentation/otel-webserver-module
93+ docker exec apache_ubuntu_container_arm64 bash -c \
94+ 'cd /otel-webserver-module; rm -rf *;'
95+ docker cp . $(docker inspect --format="{{.Id}}" apache_ubuntu_container_arm64):/otel-webserver-module/
96+ docker exec apache_ubuntu_container_arm64 bash -c \
97+ 'cd /otel-webserver-module; rm -rf build; \
98+ cp -r /dependencies /otel-webserver-module/; \
99+ cp -r /build-dependencies /otel-webserver-module/; \
100+
101+ ./gradlew assembleWebServerModule -DtargetSystem=ubuntu'
102+ # - name: unit test
103+ # run: |
104+ # docker exec apache_ubuntu_container_arm64 bash -c \
105+ # 'cd /otel-webserver-module; ./gradlew runUnitTest'
106+ - name : update cache
107+ run : |
108+ rm -rf /tmp/buildx-cache/apache_ubuntu_arm64
109+ mv /tmp/buildx-cache/apache_ubuntu_arm64-new /tmp/buildx-cache/apache_ubuntu_arm64
110+ # - name: copy artifacts
111+ # id: artifacts
112+ # run: |
113+ # cd instrumentation/otel-webserver-module
114+ # mkdir -p /tmp/apache_ubuntu_arm64/
115+ # docker cp apache_ubuntu_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
116+ # /tmp/apache_ubuntu_arm64/
117+ # - name: upload artifacts
118+ # uses: actions/upload-artifact@v3
119+ # with:
120+ # name: opentelemetry-webserver-sdk-arm64-linux.tgz
121+ # path: /tmp/apache_ubuntu_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
122+ # - name: run integrationtest
123+ # run: |
124+ # docker rm -f apache_ubuntu_container_arm64
125+ # cd instrumentation/otel-webserver-module
126+ # docker compose --profile ubuntu20.04 up -d
127+ # docker ps -a
128+ # sleep 30
129+ # ./gradlew :test:integration:integrationTests -i
130+
131+ webserver-build-test-centos7-x64 :
132+ name : webserver-centos7-build-x64
133+ runs-on : ubuntu-20.04
134+ steps :
135+ - name : checkout otel webserver
136+ uses : actions/checkout@v3
137+ - name : setup buildx
138+ id : buildx
139+ uses : docker/setup-buildx-action@master
140+ with :
141+ install : true
142+ platforms : linux/amd64
71143 # - name: cache docker layers
72144 # uses: actions/cache@v3
73145 # with:
@@ -78,45 +150,114 @@ jobs:
78150 - name : setup docker image
79151 run : |
80152 cd instrumentation/otel-webserver-module
81- docker buildx build -t apache_centos7 -f docker/centos7/Dockerfile \
153+ docker buildx build -t apache_centos7_amd64 -f docker/centos7/Dockerfile \
82154 --load .
83155 - name : build
84156 run : |
85- docker run -idt --name apache_centos7_container apache_centos7 /bin/bash
157+ docker run -idt --name apache_centos7_container_amd64 apache_centos7_amd64 /bin/bash
86158 cd instrumentation/otel-webserver-module
87- docker exec apache_centos7_container bash -c \
159+ docker exec apache_centos7_container_amd64 bash -c \
88160 'cd /otel-webserver-module; rm -rf *;'
89- docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container ):/otel-webserver-module/
90- docker exec apache_centos7_container bash -c \
161+ docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_amd64 ):/otel-webserver-module/
162+ docker exec apache_centos7_container_amd64 bash -c \
91163 'cd /otel-webserver-module; rm -rf build; \
92164 cp -r /dependencies /otel-webserver-module/; \
93165 cp -r /build-dependencies /otel-webserver-module/; \
94166 ./gradlew assembleWebServerModule'
95167 - name : unit test
96168 run : |
97- docker exec apache_centos7_container bash -c \
169+ docker exec apache_centos7_container_amd64 bash -c \
98170 'cd /otel-webserver-module; ./gradlew runUnitTest'
99171 # - name: update cache
100172 # run: |
101- # rm -rf /tmp/buildx-cache/apache_centos7
102- # mv /tmp/buildx-cache/apache_centos7 -new /tmp/buildx-cache/apache_centos7
173+ # rm -rf /tmp/buildx-cache/apache_centos7_amd64
174+ # mv /tmp/buildx-cache/apache_centos7_amd64 -new /tmp/buildx-cache/apache_centos7_amd64
103175 - name : copy artifacts
104176 id : artifacts
105177 run : |
106178 cd instrumentation/otel-webserver-module
107- mkdir -p /tmp/apache_centos7 /
108- docker cp apache_centos7_container :/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
109- /tmp/apache_centos7 /
179+ mkdir -p /tmp/apache_centos7_amd64 /
180+ docker cp apache_centos7_container_amd64 :/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
181+ /tmp/apache_centos7_amd64 /
110182 - name : upload artifacts
111183 uses : actions/upload-artifact@v3
112184 with :
113185 name : opentelemetry-webserver-sdk-x64-linux.tgz
114- path : /tmp/apache_centos7/opentelemetry-webserver-sdk-x64-linux.tgz
186+ path : /tmp/apache_centos7_amd64/opentelemetry-webserver-sdk-x64-linux.tgz
187+ - name : run integrationtest
188+ run : |
189+ docker rm -f apache_centos7_container_amd64
190+ cd instrumentation/otel-webserver-module
191+ docker compose --profile centos7 up -d
192+ docker ps -a
193+ sleep 30
194+ ./gradlew :test:integration:integrationTests -i
195+
196+ webserver-build-test-centos7-arm64 :
197+ name : webserver-centos7-build-arm64
198+ runs-on : ubuntu-20.04
199+ steps :
200+ - name : checkout otel webserver
201+ uses : actions/checkout@v3
202+ - name : setup qemu
203+ uses : docker/setup-qemu-action@master
204+ - name : setup buildx
205+ id : buildx
206+ uses : docker/setup-buildx-action@master
207+ with :
208+ install : true
209+ platforms : linux/arm64
210+ # - name: cache docker layers
211+ # uses: actions/cache@v3
212+ # with:
213+ # path: /tmp/buildx-cache/
214+ # key: apache-centos7-${{ github.sha }}
215+ # restore-keys: |
216+ # apache-centos7
217+ - name : setup docker image
218+ run : |
219+ cd instrumentation/otel-webserver-module
220+ docker buildx build -t apache_centos7_arm64 -f docker/centos7/Dockerfile \
221+ --load . --platform linux/arm64 --build-arg BUILD_ARCH='arm64' \
222+ --build-arg CMAKE_ARCH='aarch64' --build-arg GOSU_ARCH='arm64' \
223+ --build-arg JDK_ARCH='aarch64' --build-arg NGINX_ARCH='aarch64'
224+ - name : build
225+ run : |
226+ docker run -idt --platform linux/arm64 --name apache_centos7_container_arm64 apache_centos7_arm64 /bin/bash
227+ cd instrumentation/otel-webserver-module
228+ docker exec apache_centos7_container_arm64 bash -c \
229+ 'cd /otel-webserver-module; rm -rf *;'
230+ docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_arm64):/otel-webserver-module/
231+ docker exec apache_centos7_container_arm64 bash -c \
232+ 'cd /otel-webserver-module; rm -rf build; \
233+ cp -r /dependencies /otel-webserver-module/; \
234+ cp -r /build-dependencies /otel-webserver-module/; \
235+ ./gradlew assembleWebServerModule'
236+ - name : unit test
237+ run : |
238+ docker exec apache_centos7_container_arm64 bash -c \
239+ 'cd /otel-webserver-module; ./gradlew runUnitTest'
240+ # - name: update cache
241+ # run: |
242+ # rm -rf /tmp/buildx-cache/apache_centos7_arm64
243+ # mv /tmp/buildx-cache/apache_centos7_arm64-new /tmp/buildx-cache/apache_centos7_arm64
244+ - name : copy artifacts
245+ id : artifacts
246+ run : |
247+ cd instrumentation/otel-webserver-module
248+ mkdir -p /tmp/apache_centos7_arm64/
249+ docker cp apache_centos7_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
250+ /tmp/apache_centos7_arm64/
251+ - name : upload artifacts
252+ uses : actions/upload-artifact@v3
253+ with :
254+ name : opentelemetry-webserver-sdk-arm64-linux.tgz
255+ path : /tmp/apache_centos7_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
115256 - name : run integrationtest
116257 run : |
117- docker rm -f apache_centos7_container
258+ docker rm -f apache_centos7_container_arm64
118259 cd instrumentation/otel-webserver-module
119- docker- compose --profile centos7 up -d
260+ docker compose --profile centos7 up -d
120261 docker ps -a
121262 sleep 30
122263 ./gradlew :test:integration:integrationTests -i
0 commit comments