Skip to content

Commit

Permalink
fix for #29, update nodejs (#30)
Browse files Browse the repository at this point in the history
Also removes sonar-scanner. It's better to pull that is as a github action (SonarSource/sonarcloud-github-c-cpp@v1 ) so it stays up to date without re-publishing the container.
  • Loading branch information
thirtytwobits authored Apr 1, 2023
1 parent b31b9e6 commit f1e88ca
Show file tree
Hide file tree
Showing 6 changed files with 482 additions and 72 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ like [libcanard](https://github.com/OpenCyphal/libcanard) and
|----------|--------|-----|-------|-------|-----------------|
| [ts20.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | 3.10 | 9.3.0 | 10.0.0 | 3.16.3 | <ul><li>qemu</li><li>can-utils</li><li>sonar-scanner</li></ul> |
| [ts22.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | 3.10 | 11.3.0 | 15.0.7 | 3.22.1 | <ul><li>qemu</li><li>can-utils</li><li>sonar-scanner</li><li>doxygen 1.9.6</li></ul>
| [ts22.4.2](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | 3.10 | 11.3.0 | 15.0.7 | 3.22.1 | <ul><li>qemu</li><li>can-utils</li><li>~~sonar-scanner~~</li><li>doxygen 1.9.6</li><li>nvm</li><li>node 16.20.0</li></ul>

You can use this in your workflow yaml like this:

```none
jobs:
my-job:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toolshed:ts22.4.1
container: ghcr.io/opencyphal/toolshed:ts22.4.2
```


Expand Down
31 changes: 15 additions & 16 deletions toolshed/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ ENV LC_ALL=en_US.UTF-8
COPY provision.sh /
RUN /provision.sh

# +---------------------------------------------------------------------------+
# | NVM/nodejs
# +---------------------------------------------------------------------------+
WORKDIR /tmp
ADD nvm-install.sh ./nvm-install.sh
RUN . ./nvm-install.sh
ENV NVM_DIR="~/.nvm"
RUN . ~/.nvm/nvm.sh && nvm install v16.20.0

# +---------------------------------------------------------------------------+
# | LLVM
# +---------------------------------------------------------------------------+
Expand Down Expand Up @@ -92,28 +101,18 @@ ENV PATH="/usr/share/${GCC_ARM_NONE_LINUX_BASENAME}/bin:${PATH}"

RUN ${GCC_ARM_NONE_LINUX_TRIPLE}-gcc --version


# +---------------------------------------------------------------------------+
# | INSTALL SONAR SCANNER
# +---------------------------------------------------------------------------+
ENV SONAR_SCANNER_VERSION 4.7.0.2747
ENV SONAR_SCANNER_HOME=/sonar-scanner-${SONAR_SCANNER_VERSION}-linux
ENV SONAR_SCANNER_OPTS="-server"

ENV PATH="${SONAR_SCANNER_HOME}/build-wrapper-linux-x86:${PATH}"
ENV PATH="${SONAR_SCANNER_HOME}/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin:${PATH}"

COPY sonar_qube.sh /
RUN /sonar_qube.sh

# +---------------------------------------------------------------------------+
# | INSTALL THE PATH FOR INTERATIVE SESSIONS
# +---------------------------------------------------------------------------+
RUN echo "export PATH=$PATH" >> ~/.bashrc

# +---------------------------------------------------------------------------+
# | INSTALL PYTHON AND NPM STUFF
# | INSTALL PYTHON STUFF
# +---------------------------------------------------------------------------+
RUN pip3 install virtualenv
RUN pip3 install tox
RUN cd /tmp && npm install -g gh-pages

# +---------------------------------------------------------------------------+
# | LEAVE THE WORKDIR AS /repo
# +---------------------------------------------------------------------------+
WORKDIR /repo
24 changes: 0 additions & 24 deletions toolshed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,3 @@ To login to an interactive session do:
```bash
docker run --rm -it -v ${PWD}:/repo ghcr.io/opencyphal/toolshed:ts22.4.x
```

## Toolchain Documentation

### Sonarqube

Wrap yer build:

```bash
build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory cmake --build build/
```

Upload the results:

```bash
sonar-scanner \
-Dsonar.organization=OpenCyphal \
-Dsonar.projectKey=OpenCyphal_myproject \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.cfamily.build-wrapper-output=bw-output \
-Dsonar.login=TOKEN
```

A [CMake example on github](https://github.com/SonarSource/sonarcloud_example_cpp-cmake-linux-otherci)
Loading

0 comments on commit f1e88ca

Please sign in to comment.