Skip to content

Commit a4ba005

Browse files
condensed builds for both archs into one pipeline, removed obsolete files
1 parent e521b1f commit a4ba005

10 files changed

+80
-198
lines changed

.github/workflows/containerize-and-push_arm.yaml renamed to .github/workflows/containerize-and-push.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************/
1313

14-
name: Containerize UStreamer and Push to Container Registry
14+
name: Containerize uStreamer and Push to Container Registry
1515

1616
on:
1717
push:
@@ -27,7 +27,6 @@ env:
2727
jobs:
2828
build-binary:
2929
runs-on: ubuntu-latest
30-
environment: production
3130
permissions:
3231
contents: read
3332
packages: write
@@ -73,12 +72,27 @@ jobs:
7372
run: |
7473
cross build --target aarch64-unknown-linux-musl --bin zenoh_mqtt --features="zenoh-transport mqtt-transport" --release
7574
76-
- name: Build and push Docker image
75+
- name: Build and push Docker image for arm64
7776
uses: docker/build-push-action@v5
7877
with:
7978
context: .
80-
file: "Dockerfile.zenoh_mqtt-arm-musl"
79+
file: "Dockerfile.zenoh-mqtt-arm"
8180
push: true
8281
platforms: linux/arm64
8382
tags: ${{ steps.meta.outputs.tags }}
8483
labels: ${{ steps.meta.outputs.labels }}
84+
85+
- name: Cross Build for amd64
86+
working-directory: example-streamer-implementations
87+
run: |
88+
cross build --target x86_64-unknown-linux-musl --bin zenoh_mqtt --features="zenoh-transport mqtt-transport" --release
89+
90+
- name: Build and push Docker image for amd64
91+
uses: docker/build-push-action@v5
92+
with:
93+
context: .
94+
file: "Dockerfile.zenoh-mqtt-amd"
95+
push: true
96+
platforms: linux/amd64
97+
tags: ${{ steps.meta.outputs.tags }}
98+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/containerize-and-push_amd.yaml

Lines changed: 0 additions & 82 deletions
This file was deleted.

Cross.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
[target.x86_64-unknown-linux-gnu]
2-
pre-build = [
3-
"dpkg --add-architecture $CROSS_DEB_ARCH",
4-
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
5-
]
6-
7-
[target.x86_64-unknown-linux-musl]
8-
pre-build = [
9-
"apt-get update && apt-get install --assume-yes libssl-dev",
10-
"export OPENSSL_ROOT_DIR=/usr",
11-
]
12-
13-
[target.aarch64-unknown-linux-gnu]
14-
# [build.env]
15-
# passthrough = ["CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_gnu"]
1+
# ********************************************************************************
2+
# Copyright (c) 2024 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************/
1613

1714
[build.env]
18-
passthrough = ["CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_musl"]
15+
passthrough = [
16+
"CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_musl",
17+
"CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_musl",
18+
]

Dockerfile.crossbuild

Lines changed: 0 additions & 23 deletions
This file was deleted.

Dockerfile.zenoh-mqtt-amd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ********************************************************************************
2+
# Copyright (c) 2024 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************/
13+
14+
FROM scratch
15+
16+
WORKDIR /app
17+
18+
COPY target/x86_64-unknown-linux-musl/release/zenoh_mqtt /app/zenoh_mqtt
19+
20+
EXPOSE 7447
21+
EXPOSE 1883
22+
23+
CMD ["./zenoh_mqtt", "--config", "config/CONFIG.json5"]

Dockerfile.zenoh-mqtt-arm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ********************************************************************************
2+
# Copyright (c) 2024 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************/
13+
14+
FROM scratch
15+
16+
WORKDIR /app
17+
18+
COPY target/aarch64-unknown-linux-musl/release/zenoh_mqtt /app/zenoh_mqtt
19+
20+
EXPOSE 7447
21+
EXPOSE 1883
22+
23+
CMD ["./zenoh_mqtt", "--config", "config/CONFIG.json5"]

Dockerfile.zenoh_mqtt

Lines changed: 0 additions & 21 deletions
This file was deleted.

Dockerfile.zenoh_mqtt-amd

Lines changed: 0 additions & 21 deletions
This file was deleted.

Dockerfile.zenoh_mqtt-arm

Lines changed: 0 additions & 21 deletions
This file was deleted.

Dockerfile.zenoh_mqtt-arm-musl

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)