Skip to content

Commit

Permalink
Adding cppcheck and jlink to #ts toolshed (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
thirtytwobits authored Mar 2, 2025
1 parent 282d1ca commit ea1c923
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 37 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/toolshed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ jobs:

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: toolshed
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ (github.event_name != 'pull_request' && !github.event.release.prerelease) && 'true' || 'false' }}
tags: ${{ steps.meta.outputs.tags }}
outputs: >
type=image,
name=${{ env.REGISTRY_IMAGE }},
push-by-digest=true,
name-canonical=true,
push=${{ (github.event_name != 'pull_request' && !github.event.release.prerelease) && 'true' || 'false' }}
- name: Export digest
if: ${{ github.event_name != 'pull_request' && !github.event.release.prerelease}}
Expand Down Expand Up @@ -110,13 +115,18 @@ jobs:

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: toolshed
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ (github.event_name != 'pull_request' && !github.event.release.prerelease) && 'true' || 'false' }}
tags: ${{ steps.meta.outputs.tags }}
outputs: >
type=image,
name=${{ env.REGISTRY_IMAGE }},
push-by-digest=true,
name-canonical=true,
push=${{ (github.event_name != 'pull_request' && !github.event.release.prerelease) && 'true' || 'false' }}
- name: Export digest
if: ${{ github.event_name != 'pull_request' && !github.event.release.prerelease}}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ like [libcanard](https://github.com/OpenCyphal/libcanard) and

| tag | Python | GCC (native) | GCC (arm-none-eabi) | Clang (native) | Cmake | Host Platforms | Other Utilities |
|----------|--------|--------------|---------------------|----------------|-------|----------------|-----------------|
| [ts24.4.2](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | <ul><li>3.12</li><li>3.10</li></ul> | <ul><li>13.3.0</li><li>12.3.0</li><li>11.4.0</li><li>10.5.0</li><li>7.5.0</li></ul>| 13.3.1 | <ul><li>19.1.7</li><li>18.1.8</li></ul> | 3.31.5 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | <ul><li>yakut 0.13.0</li><li>libpcap0.8-dev</li><li>network-tools</li><li>can-utils</li><li>doxygen 1.13.2</li><li>tox</li><li>nox</li><li>govr</li><li>gcc-multilib (amd64 only)</li></ul> |
| [ts24.4.3](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | <ul><li>3.12</li><li>3.10</li></ul> | <ul><li>13.3.0</li><li>12.3.0</li><li>11.4.0</li><li>10.5.0</li><li>7.5.0</li></ul>| 13.3.1 | <ul><li>19.1.7</li><li>18.1.8</li></ul> | 3.31.5 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | <ul><li>JLink V816</li><li>cppcheck-2.13</li><li>yakut 0.13.0</li><li>libpcap0.8-dev</li><li>network-tools</li><li>can-utils</li><li>doxygen 1.13.2</li><li>tox</li><li>nox</li><li>govr</li><li>gcc-multilib (amd64 only)</li></ul> |
| [ts24.4.2](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | <ul><li>3.12</li><li>3.10</li></ul> | <ul><li>13.3.0</li><li>12.3.0</li><li>11.4.0</li><li>10.5.0</li><li>7.5.0</li></ul>| 13.3.1 | <ul><li>19.1.7</li><li>18.1.8</li></ul> | 3.31.5 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | <ul><li>yakut 0.13.0</li><li>libpcap0.8-dev</li><li>network-tools</li><li>can-utils</li><li>doxygen 1.13.2</li><li>gcc-multilib (amd64 only)</li></ul> |
| [ts24.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | <ul><li>3.12</li><li>3.10</li></ul> | <ul><li>13.3.0</li><li>12.3.0</li><li>11.4.0</li><li>10.5.0</li><li>7.5.0</li></ul>| 13.3.1 | <ul><li>19.1.7</li><li>18.1.8</li></ul> | 3.31.5 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | <li>can-utils</li><li>doxygen 1.13.2</li><li>tox</li><li>nox</li><li>govr</li><li>gcc-multilib (amd64 only)</li></ul> |
| [ts22.4.10](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | 3.10 | 12.3.0 | 13.3.1 | 18.1.3 | 3.30.1 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | <ul><li>qemu</li><li>can-utils</li><li>doxygen 1.10.0</li><li>nvm</li><li>node 20.x</li><li>nox</li><li>govr</li><li>gcc-multilib (amd64 only)</li></ul> |
| [ts22.4.8](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | 3.10 | 12.3.0 | (N/A) | 18.1.3 | 3.22.1 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | <ul><li>qemu</li><li>can-utils</li><li>doxygen 1.10.0</li><li>nvm</li><li>node 20.x</li><li>nox</li><li>govr</li><li>gcc-multilib (amd64 only)</li></ul> |
Expand Down
66 changes: 38 additions & 28 deletions toolshed/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,10 @@ RUN ./post-provision.sh
# INSTALL THE PATH FOR INTERACTIVE SESSIONS
RUN echo "export PATH=$PATH" >> ~/.bashrc

# LEAVE THE WORKDIR AS /repo
WORKDIR /repo

# +---------------------------------------------------------------------------+
# | INSTALL PYTHON STUFF
# +---------------------------------------------------------------------------+
FROM provisioning AS python
WORKDIR /tmp

RUN apt-get -y install pipx
RUN echo "export PATH=/root/.local/bin:$PATH" >> ~/.bashrc
RUN pipx install tox
RUN pipx install nox
RUN pipx install gcovr
RUN pipx install yakut
RUN git clone --depth 1 https://github.com/OpenCyphal/public_regulated_data_types.git ~/public_regulated_data_types

# LEAVE THE WORKDIR AS /repo
WORKDIR /repo

# +---------------------------------------------------------------------------+
# | LLVM
# +---------------------------------------------------------------------------+
FROM python AS llvm
FROM provisioning AS llvm
WORKDIR /tmp

ADD llvm-install.sh ./llvm-install.sh
Expand All @@ -76,9 +56,6 @@ RUN ./llvm-select.sh 18 18
RUN ./llvm-install.sh 19 all
RUN ./llvm-select.sh 19 99

# LEAVE THE WORKDIR AS /repo
WORKDIR /repo

# +---------------------------------------------------------------------------+
# | DOXYGEN BUILD (PARALLEL)
# +---------------------------------------------------------------------------+
Expand Down Expand Up @@ -109,9 +86,6 @@ RUN cmake --install .
WORKDIR /tmp
RUN rm -rf doxygen-Release

# LEAVE THE WORKDIR AS /repo
WORKDIR /repo

# +---------------------------------------------------------------------------+
# | GCC::native
# +---------------------------------------------------------------------------+
Expand Down Expand Up @@ -140,7 +114,7 @@ FROM arm-none-eabi-${TARGETARCH} AS arm-none-eabi
WORKDIR /tmp
COPY cached-download.sh .

ARG ARM_NONE_EABI_VERSION=13.3.rel1
ARG ARM_NONE_EABI_VERSION=14.2.rel1
ARG ARM_NONE_EABI_CHECKSUM_FILE=arm-gnu-toolchain-${ARM_NONE_EABI_VERSION}-${GCC_HOST_VERSION}-arm-none-eabi.tar.xz.sha256asc

COPY ${ARM_NONE_EABI_CHECKSUM_FILE} .
Expand All @@ -157,5 +131,41 @@ ADD arm-none-eabi-gcc-select.sh ./arm-none-eabi-gcc-select.sh
RUN ./arm-none-eabi-gcc-select.sh 1 /opt/arm-gnu-toolchain-${ARM_NONE_EABI_VERSION}-${GCC_HOST_VERSION}-arm-none-eabi/bin/
RUN update-alternatives --display arm-none-eabi-gcc

# +---------------------------------------------------------------------------+
# | GCC::native
# +---------------------------------------------------------------------------+
FROM arm-none-eabi AS jlink

WORKDIR /tmp

# From the forum: https://forum.segger.com/index.php/Thread/8953-SOLVED-J-Link-Linux-installer-fails-for-Docker-containers-Error-Failed-to-update/
ADD JLink_Linux_V816_${TARGETARCH}.deb ./JLink_Linux_V816.deb
RUN apt-get -y install libxcb-render-util0 libxcb-icccm4 libxcb-keysyms1 libxcb-image0 libxkbcommon0 libxkbcommon-x11-0
RUN dpkg --unpack JLink_Linux_V816.deb \
&& rm -f /var/lib/dpkg/info/jlink.postinst
RUN dpkg --configure jlink
RUN apt install -yf
RUN echo "export PATH=/opt/SEGGER/JLink:$PATH" >> ~/.bashrc
RUN rm JLink_Linux_V816.deb

# +---------------------------------------------------------------------------+
# | INSTALL PYTHON STUFF
# +---------------------------------------------------------------------------+
FROM jlink AS python
WORKDIR /tmp

RUN apt-get -y install pipx
ENV PIPX_HOME=/opt/pipx
ENV PIPX_BIN_DIR=/usr/local/bin
RUN echo "export PATH=$PIPX_HOME:$PIPX_BIN_DIR:$PATH" >> ~/.bashrc
RUN pipx install cowsay
RUN pipx install tox
RUN pipx install nox
RUN pipx install gcovr
RUN pipx install yakut
RUN cowsay -t moo
RUN git clone --depth 1 https://github.com/OpenCyphal/public_regulated_data_types.git ~/public_regulated_data_types

# +---------------------------------------------------------------------------+# LEAVE THE WORKDIR AS /repo
# LEAVE THE WORKDIR AS /repo
WORKDIR /repo
Binary file added toolshed/JLink_Linux_V816_amd64.deb
Binary file not shown.
Binary file added toolshed/JLink_Linux_V816_arm64.deb
Binary file not shown.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
87330bab085dd8749d4ed0ad633674b9dc48b237b61069e3b481abd364d0a684 arm-gnu-toolchain-14.2.rel1-aarch64-arm-none-eabi.tar.xz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
62a63b981fe391a9cbad7ef51b17e49aeaa3e7b0d029b36ca1e9c3b2a9b78823 arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
3 changes: 3 additions & 0 deletions toolshed/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ apt-get -y install nodejs
apt-get -y install npm
apt-get -y install libpcap0.8-dev
apt-get -y install net-tools
apt-get -y install iproute2
apt-get -y install cppcheck
apt-get -y install libncurses5

0 comments on commit ea1c923

Please sign in to comment.