Skip to content

Commit b0cb4be

Browse files
Merge pull request usdot-jpo-ode#64 from usdot-jpo-ode/release/2025-q1
Merge Release/2025 q1 into master
2 parents 6ce8588 + 47fd93a commit b0cb4be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2140
-339
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
options: "--user root"
1515
steps:
1616
- name: checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
# Checkout the code from the repository
1919

2020
- name: Install necessary dependencies
@@ -84,7 +84,7 @@ jobs:
8484
working-directory: ${{ env.working-directory }}
8585

8686
- name: Install sonar-scanner and build-wrapper
87-
uses: SonarSource/sonarcloud-github-c-cpp@v1
87+
uses: SonarSource/sonarcloud-github-c-cpp@v3
8888
# Install SonarScanner and build-wrapper for code analysis
8989

9090
- name: Build and Generate test coverage
@@ -101,20 +101,20 @@ jobs:
101101
working-directory: ${{ env.working-directory }}
102102

103103
- name: Archive code coverage results
104-
uses: actions/upload-artifact@v3
104+
uses: actions/upload-artifact@v4
105105
with:
106106
name: asn1-codec
107107
path: /__w/asn1-codec/asn1-codec/coverage/
108108
# Archive code coverage results for later reference
109109

110110
- name: Archive buildwrapper output
111-
uses: actions/upload-artifact@v3
111+
uses: actions/upload-artifact@v4
112112
with:
113113
name: asn1-codec
114114
path: /home/runner/work/asn1-codec/asn1-codec/bw-output
115115
# Archive build-wrapper output
116116

117-
- uses: actions/setup-java@v3
117+
- uses: actions/setup-java@v4
118118
with:
119119
distribution: 'temurin'
120120
java-version: '17'

.github/workflows/docker.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: Set up Docker Buildx
18-
uses: docker/setup-buildx-action@v2
18+
uses: docker/setup-buildx-action@v3
1919
- name: Build
20-
uses: docker/build-push-action@v3
20+
uses: docker/build-push-action@v5

.github/workflows/dockerhub.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Set up Docker Buildx
18-
uses: docker/setup-buildx-action@v2
18+
uses: docker/setup-buildx-action@v3
1919

2020
- name: Login to DockerHub
21-
uses: docker/login-action@v2
21+
uses: docker/login-action@v3
2222
with:
2323
username: ${{ secrets.DOCKERHUB_USERNAME }}
2424
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -28,7 +28,7 @@ jobs:
2828
run: echo "TAG=$(echo ${GITHUB_REF##*/} | sed 's/\//-/g')" >> $GITHUB_ENV
2929

3030
- name: Build
31-
uses: docker/build-push-action@v3
31+
uses: docker/build-push-action@v5
3232
with:
3333
push: true
3434
tags: usdotjpoode/asn1_codec:${{ env.TAG }}

Dockerfile

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# === BUILDER IMAGE ===
2-
FROM alpine:3.12 as builder
2+
FROM alpine:3.18 as builder
33
USER root
44
WORKDIR /asn1_codec
55
VOLUME ["/asn1_codec_share"]
@@ -10,21 +10,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
1010
g++ \
1111
make \
1212
bash \
13-
automake \
14-
libtool \
15-
autoconf \
1613
librdkafka \
17-
librdkafka-dev \
18-
flex \
19-
bison
14+
librdkafka-dev
15+
16+
# Dependencies that are not needed if asn1c is not installed in the build container:
17+
# libtool
18+
# automake
19+
# autoconf
20+
# bison
21+
# flex
2022

2123
# Install pugixml
2224
ADD ./pugixml /asn1_codec/pugixml
2325
RUN cd /asn1_codec/pugixml && mkdir -p build && cd build && cmake .. && make && make install
2426

25-
# Build and install asn1c submodule
26-
ADD ./usdot-asn1c /asn1_codec/asn1c
27-
RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
27+
# The codec C files are pre-generated manually so it isn't necessary to build asn1c in the container
28+
# # Build and install asn1c submodule
29+
# ADD ./usdot-asn1c /asn1_codec/asn1c
30+
# RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
2831

2932
# Make generated files available to the build & compile example
3033
RUN export LD_LIBRARY_PATH=/usr/local/lib
@@ -59,7 +62,7 @@ RUN echo "export CC=gcc" >> ~/.bashrc
5962
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make
6063

6164
# === RUNTIME IMAGE ===
62-
FROM alpine:3.12
65+
FROM alpine:3.18
6366
USER root
6467
WORKDIR /asn1_codec
6568
VOLUME ["/asn1_codec_share"]

Dockerfile.debug

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# === BUILDER IMAGE ===
2+
FROM alpine:3.18 as builder
3+
USER root
4+
WORKDIR /asn1_codec
5+
VOLUME ["/asn1_codec_share"]
6+
7+
# add build dependencies
8+
RUN apk add --upgrade --no-cache --virtual .build-deps \
9+
cmake \
10+
g++ \
11+
make \
12+
bash \
13+
librdkafka \
14+
librdkafka-dev
15+
16+
# Dependencies that are not needed if asn1c is not installed in the build container:
17+
# libtool
18+
# automake
19+
# autoconf
20+
# bison
21+
# flex
22+
23+
# Install pugixml
24+
ADD ./pugixml /asn1_codec/pugixml
25+
RUN cd /asn1_codec/pugixml && mkdir -p build && cd build && cmake .. && make && make install
26+
27+
# The codec C files are pre-generated manually so it isn't necessary to build asn1c in the container
28+
# # Build and install asn1c submodule
29+
# ADD ./usdot-asn1c /asn1_codec/asn1c
30+
# RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
31+
32+
# Make generated files available to the build & compile example
33+
RUN export LD_LIBRARY_PATH=/usr/local/lib
34+
ADD ./asn1c_combined /asn1_codec/asn1c_combined
35+
RUN cd /asn1_codec/asn1c_combined && bash doIt.sh
36+
37+
38+
39+
# Remove any lingering .asn files
40+
RUN rm -rf /asn1c_codec/asn1c_combined/j2735-asn-files
41+
RUN rm -rf /asn1c_codec/asn1c_combined/semi-asn-files
42+
RUN rm -rf /asn1c_codec/asn1c_combined/scms-asn-files
43+
44+
# Remove duplicate files
45+
RUN rm -rf /asn1c_codec/asn1c_combined/generated-files
46+
47+
# add the source and build files
48+
ADD CMakeLists.txt /asn1_codec
49+
ADD ./config /asn1_codec/config
50+
ADD ./include /asn1_codec/include
51+
ADD ./src /asn1_codec/src
52+
ADD ./kafka-test /asn1_codec/kafka-test
53+
ADD ./unit-test-data /asn1_codec/unit-test-data
54+
ADD ./data /asn1_codec/data
55+
ADD ./run_acm.sh /asn1_codec
56+
ADD ./data /asn1_codec/data
57+
58+
RUN echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.profile
59+
RUN echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.bashrc
60+
RUN echo "export CC=gcc" >> ~/.profile
61+
RUN echo "export CC=gcc" >> ~/.bashrc
62+
63+
# Build acm.
64+
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make
65+
66+
67+
68+
69+
# === RUNTIME IMAGE ===
70+
FROM alpine:3.18
71+
USER root
72+
WORKDIR /asn1_codec
73+
VOLUME ["/asn1_codec_share"]
74+
75+
# add runtime dependencies
76+
RUN apk add --upgrade --no-cache \
77+
bash \
78+
librdkafka \
79+
librdkafka-dev
80+
81+
# copy the built files from the builder
82+
COPY --from=builder /asn1_codec /asn1_codec
83+
COPY --from=builder /build /build
84+
85+
# Add test data. This changes frequently so keep it low in the file.
86+
ADD ./docker-test /asn1_codec/docker-test
87+
88+
# Keep the container running but don't start up the app
89+
CMD ["tail", "-f", "/dev/null"]

Dockerfile.dev

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# === BUILDER IMAGE ===
2-
FROM alpine:3.12 as builder
2+
FROM alpine:3.18 as builder
33
USER root
44
WORKDIR /asn1_codec
55
VOLUME ["/asn1_codec_share"]
@@ -10,21 +10,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
1010
g++ \
1111
make \
1212
bash \
13-
automake \
14-
libtool \
15-
autoconf \
1613
librdkafka \
17-
librdkafka-dev \
18-
flex \
19-
bison
14+
librdkafka-dev
15+
16+
# Dependencies that are not needed if asn1c is not installed in the build container:
17+
# libtool
18+
# automake
19+
# autoconf
20+
# bison
21+
# flex
2022

2123
# Install pugixml
2224
ADD ./pugixml /asn1_codec/pugixml
2325
RUN cd /asn1_codec/pugixml && mkdir -p build && cd build && cmake .. && make && make install
2426

25-
# Build and install asn1c submodule
26-
ADD ./usdot-asn1c /asn1_codec/asn1c
27-
RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
27+
# The codec C files are pre-generated manually so it isn't necessary to build asn1c in the container
28+
# # Build and install asn1c submodule
29+
# ADD ./usdot-asn1c /asn1_codec/asn1c
30+
# RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
2831

2932
# Make generated files available to the build & compile example
3033
RUN export LD_LIBRARY_PATH=/usr/local/lib
@@ -58,7 +61,7 @@ RUN echo "export CC=gcc" >> ~/.bashrc
5861
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make
5962

6063
# === RUNTIME IMAGE ===
61-
FROM alpine:3.12
64+
FROM alpine:3.18
6265
USER root
6366
WORKDIR /asn1_codec
6467
VOLUME ["/asn1_codec_share"]

Dockerfile.standalone

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# === BUILDER IMAGE ===
2-
FROM alpine:3.12 as builder
2+
FROM alpine:3.18 as builder
33
USER root
44
WORKDIR /asn1_codec
55

@@ -9,21 +9,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
99
g++ \
1010
make \
1111
bash \
12-
automake \
13-
libtool \
14-
autoconf \
1512
librdkafka \
16-
librdkafka-dev \
17-
flex \
18-
bison
13+
librdkafka-dev
14+
15+
# Dependencies that are not needed if asn1c is not installed in the build container:
16+
# libtool
17+
# automake
18+
# autoconf
19+
# bison
20+
# flex
1921

2022
# Install pugixml
2123
ADD ./pugixml /asn1_codec/pugixml
2224
RUN cd /asn1_codec/pugixml && mkdir -p build && cd build && cmake .. && make && make install
2325

24-
# Build and install asn1c submodule
25-
ADD ./usdot-asn1c /asn1_codec/asn1c
26-
RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
26+
# The codec C files are pre-generated manually so it isn't necessary to build asn1c in the container
27+
# # Build and install asn1c submodule
28+
# ADD ./usdot-asn1c /asn1_codec/asn1c
29+
# RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
2730

2831
# Make generated files available to the build & compile example
2932
RUN export LD_LIBRARY_PATH=/usr/local/lib
@@ -52,7 +55,7 @@ ADD ./data /asn1_codec/data
5255
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make
5356

5457
# === RUNTIME IMAGE ===
55-
FROM alpine:3.12
58+
FROM alpine:3.18
5659
USER root
5760
WORKDIR /asn1_codec
5861

Dockerfile.testing

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# === BUILDER IMAGE ===
2-
FROM alpine:3.12 as builder
2+
FROM alpine:3.18 as builder
33
USER root
44
WORKDIR /asn1_codec
55
VOLUME ["/asn1_codec_share"]
@@ -10,21 +10,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
1010
g++ \
1111
make \
1212
bash \
13-
automake \
14-
libtool \
15-
autoconf \
1613
librdkafka \
17-
librdkafka-dev \
18-
flex \
19-
bison
14+
librdkafka-dev
15+
16+
# Dependencies that are not needed if asn1c is not installed in the build container:
17+
# libtool
18+
# automake
19+
# autoconf
20+
# bison
21+
# flex
2022

2123
# Install pugixml
2224
ADD ./pugixml /asn1_codec/pugixml
2325
RUN cd /asn1_codec/pugixml && mkdir -p build && cd build && cmake .. && make && make install
2426

25-
# Build and install asn1c submodule
26-
ADD ./usdot-asn1c /asn1_codec/asn1c
27-
RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
27+
# The codec C files are pre-generated manually so it isn't necessary to build asn1c in the container
28+
# # Build and install asn1c submodule
29+
# ADD ./usdot-asn1c /asn1_codec/asn1c
30+
# RUN cd asn1c && test -f configure || autoreconf -iv && ./configure && make && make install
2831

2932
# Make generated files available to the build & compile example
3033
RUN export LD_LIBRARY_PATH=/usr/local/lib
@@ -60,7 +63,7 @@ RUN echo "export CC=gcc" >> ~/.bashrc
6063
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make
6164

6265
# === RUNTIME IMAGE ===
63-
FROM alpine:3.12
66+
FROM alpine:3.18
6467
USER root
6568
WORKDIR /asn1_codec
6669
VOLUME ["/asn1_codec_share"]

0 commit comments

Comments
 (0)