Skip to content

Commit

Permalink
Merge pull request #64 from usdot-jpo-ode/release/2025-q1
Browse files Browse the repository at this point in the history
Merge Release/2025 q1 into master
  • Loading branch information
SaikrishnaBairamoni authored Jan 27, 2025
2 parents 6ce8588 + 47fd93a commit b0cb4be
Show file tree
Hide file tree
Showing 44 changed files with 2,140 additions and 339 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
options: "--user root"
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
# Checkout the code from the repository

- name: Install necessary dependencies
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
working-directory: ${{ env.working-directory }}

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

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

- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: asn1-codec
path: /__w/asn1-codec/asn1-codec/coverage/
# Archive code coverage results for later reference

- name: Archive buildwrapper output
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: asn1-codec
path: /home/runner/work/asn1-codec/asn1-codec/bw-output
# Archive build-wrapper output

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
8 changes: 4 additions & 4 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

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

- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: true
tags: usdotjpoode/asn1_codec:${{ env.TAG }}
25 changes: 14 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# === BUILDER IMAGE ===
FROM alpine:3.12 as builder
FROM alpine:3.18 as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -10,21 +10,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
g++ \
make \
bash \
automake \
libtool \
autoconf \
librdkafka \
librdkafka-dev \
flex \
bison
librdkafka-dev

# Dependencies that are not needed if asn1c is not installed in the build container:
# libtool
# automake
# autoconf
# bison
# flex

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

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

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

# === RUNTIME IMAGE ===
FROM alpine:3.12
FROM alpine:3.18
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand Down
89 changes: 89 additions & 0 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# === BUILDER IMAGE ===
FROM alpine:3.18 as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add build dependencies
RUN apk add --upgrade --no-cache --virtual .build-deps \
cmake \
g++ \
make \
bash \
librdkafka \
librdkafka-dev

# Dependencies that are not needed if asn1c is not installed in the build container:
# libtool
# automake
# autoconf
# bison
# flex

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

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

# Make generated files available to the build & compile example
RUN export LD_LIBRARY_PATH=/usr/local/lib
ADD ./asn1c_combined /asn1_codec/asn1c_combined
RUN cd /asn1_codec/asn1c_combined && bash doIt.sh



# Remove any lingering .asn files
RUN rm -rf /asn1c_codec/asn1c_combined/j2735-asn-files
RUN rm -rf /asn1c_codec/asn1c_combined/semi-asn-files
RUN rm -rf /asn1c_codec/asn1c_combined/scms-asn-files

# Remove duplicate files
RUN rm -rf /asn1c_codec/asn1c_combined/generated-files

# add the source and build files
ADD CMakeLists.txt /asn1_codec
ADD ./config /asn1_codec/config
ADD ./include /asn1_codec/include
ADD ./src /asn1_codec/src
ADD ./kafka-test /asn1_codec/kafka-test
ADD ./unit-test-data /asn1_codec/unit-test-data
ADD ./data /asn1_codec/data
ADD ./run_acm.sh /asn1_codec
ADD ./data /asn1_codec/data

RUN echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.profile
RUN echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.bashrc
RUN echo "export CC=gcc" >> ~/.profile
RUN echo "export CC=gcc" >> ~/.bashrc

# Build acm.
RUN mkdir -p /build && cd /build && cmake /asn1_codec && make




# === RUNTIME IMAGE ===
FROM alpine:3.18
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]

# add runtime dependencies
RUN apk add --upgrade --no-cache \
bash \
librdkafka \
librdkafka-dev

# copy the built files from the builder
COPY --from=builder /asn1_codec /asn1_codec
COPY --from=builder /build /build

# Add test data. This changes frequently so keep it low in the file.
ADD ./docker-test /asn1_codec/docker-test

# Keep the container running but don't start up the app
CMD ["tail", "-f", "/dev/null"]
25 changes: 14 additions & 11 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# === BUILDER IMAGE ===
FROM alpine:3.12 as builder
FROM alpine:3.18 as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -10,21 +10,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
g++ \
make \
bash \
automake \
libtool \
autoconf \
librdkafka \
librdkafka-dev \
flex \
bison
librdkafka-dev

# Dependencies that are not needed if asn1c is not installed in the build container:
# libtool
# automake
# autoconf
# bison
# flex

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

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

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

# === RUNTIME IMAGE ===
FROM alpine:3.12
FROM alpine:3.18
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand Down
25 changes: 14 additions & 11 deletions Dockerfile.standalone
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# === BUILDER IMAGE ===
FROM alpine:3.12 as builder
FROM alpine:3.18 as builder
USER root
WORKDIR /asn1_codec

Expand All @@ -9,21 +9,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
g++ \
make \
bash \
automake \
libtool \
autoconf \
librdkafka \
librdkafka-dev \
flex \
bison
librdkafka-dev

# Dependencies that are not needed if asn1c is not installed in the build container:
# libtool
# automake
# autoconf
# bison
# flex

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

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

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

# === RUNTIME IMAGE ===
FROM alpine:3.12
FROM alpine:3.18
USER root
WORKDIR /asn1_codec

Expand Down
25 changes: 14 additions & 11 deletions Dockerfile.testing
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# === BUILDER IMAGE ===
FROM alpine:3.12 as builder
FROM alpine:3.18 as builder
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand All @@ -10,21 +10,24 @@ RUN apk add --upgrade --no-cache --virtual .build-deps \
g++ \
make \
bash \
automake \
libtool \
autoconf \
librdkafka \
librdkafka-dev \
flex \
bison
librdkafka-dev

# Dependencies that are not needed if asn1c is not installed in the build container:
# libtool
# automake
# autoconf
# bison
# flex

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

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

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

# === RUNTIME IMAGE ===
FROM alpine:3.12
FROM alpine:3.18
USER root
WORKDIR /asn1_codec
VOLUME ["/asn1_codec_share"]
Expand Down
Loading

0 comments on commit b0cb4be

Please sign in to comment.