67 Commits

Author SHA1 Message Date
Reto Schneider
4f6917ef9c ci: Update OpenSSF actions
This hopefully resolves the problem with failing artifact upload.

Source of the changes: https://github.com/ossf/scorecard/, file
.github/workflows/scorecard-analysis.yml
2025-03-27 11:36:10 +01:00
Lukas Woodtli
535230ce78 ci: Remove defunct foreign architectures from actions
The compiler produces a segfault on the emulated architectures. To be
able to continue the work on Wakaama we disable testing on these
architectures for the time being.
2025-02-11 16:26:06 +01:00
Lukas Woodtli
84935823bf test: Build and unit test examples with sanitizers
This way the Wakaama library is built and tested with the configurations
that the examples use.
2024-12-17 16:32:13 +01:00
Lukas Woodtli
1cc77834c6 test: Add action dedicated to integration tests
This way it's easier to handle the different kind of tests.
2024-12-17 16:32:13 +01:00
Lukas Woodtli
c6092f160d ci: Remove clang static analyzer action
Static analysis is done with `CodeChecker` now. It integrates the clang
static analyzer and `cppcheck`.
2024-12-10 15:12:41 +01:00
Lukas Woodtli
10e8365728 ci: Use CodeChecker as static analysis tool
CodeChecker combines multiple static code analysis tools including
`clang-sa`. It also provides the possibility to check against a baseline
to report only newly introduced issues.
Moreover it is simpler to use.
It could eventually replace `clang-sa` completely in the pipeline.
2024-12-10 15:12:41 +01:00
Lukas Woodtli
9ee63a22ca make: Client examples as individual projects
The client example projects now use Wakaama as a direct dependency. They
have also been split into three different projects (udp, tinydtls and
raw_block1). The CI and integration tests were adjusted for the new
project.
2024-12-03 15:21:29 +01:00
Reto Schneider
ec4458bae7 ci: Cancel outdated runs
Canceling builds of commits which are no longer (really) relevant seems
like a sensible thing to do.
2024-11-26 10:24:45 +01:00
Reto Schneider
d28bd14114 ci: Enforce pinned pip dependencies
This should give us a 10/10 OpenSSF rating for pinned dependencies.
2024-11-18 09:14:48 +01:00
Reto Schneider
097686cf4c ci: scorecard: Remove non-main branch
This branch name has been accidentally committed in
220362caf725e9c540c071eca289185fc4c056f5 (ci: Add OSSF Scorecard
action).
2024-11-18 09:14:15 +01:00
Reto Schneider
d723815b73 ci: Remove pip upgrade
OpenSSF scorecard does not want us to upgrade to unspecified versions.

Removing the update seems like the simplest solution, as the version
contained in the ubuntu-20.04 base image is recent enough.
2024-11-15 17:28:23 +01:00
Reto Schneider
a1655b913e ci: Pin GitHub actions versions
One step to improve our OpenSSF score card result.
2024-11-15 17:28:23 +01:00
Lukas Woodtli
e2472938c4 ci: Update run-on-arch-action
The action failed with:

"ERROR: failed to solve: arm32v7/debian:bookworm: failed to resolve
source metadata for docker.io/arm32v7/debian:bookworm"
2024-11-14 19:45:52 +01:00
Reto Schneider
220362caf7 ci: Add OSSF Scorecard action
This gives use a quick overview of our security.
2024-11-11 10:00:44 +01:00
Lukas Woodtli
d638712749 cmake: Bootstrap server as individual project
The bootstrap server project now uses Wakaama as a direct dependent
project. The CI and integration tests were adjusted for the new project.
2024-10-31 09:36:53 +01:00
Lukas Woodtli
7e1d606d9c cmake: Server as individual project
The server project now uses Wakaama as a direct dependent project. The
CI and integration tests were adjusted for the new project.
2024-10-30 16:50:21 +01:00
Lukas Woodtli
cc0b92644d doc: Build doxygen documentation
The Doxygen documentation is generated and uploaded with GitHub actions.

Currently the code is not yet thoroughly documented.
2024-10-29 14:50:18 +01:00
Lukas Woodtli
1623d69eda ci: Use Ubuntu 24.04 on GH actions
Use the latest LTS version of Ubuntu.
2024-10-21 15:54:51 +02:00
Lukas Woodtli
e73ff3ddd5 ci: Allow to build in different directory
The CI build script now supports a flag to provide a custom build
directory.
2024-10-03 14:36:14 +02:00
Lukas Woodtli
d906b50d3d ci: Add build and run unit tests on macOS
Building and testing Wakaama on macOS with the default compiler and no
additional sanitizers. This makes sure that the code can be used with
macOS.
The integration tests don't work on macOS due to different timing
related to output on `stdout`.
2024-05-27 13:46:11 +02:00
Lukas Woodtli
d2fce1d338 ci: Fix Sonar organization and project name
Wakaama moved to the GitHub organization `eclipse-wakaama` but the
organization and project names in Sonar Cloud have not changed.
2024-05-27 13:34:46 +02:00
Lukas Woodtli
544494ef6d ci: Update codeql-action GitHub action
The GitHub actions `github/codeql-action` version 2 has been deprecated.
Updating to version 3.
2024-04-25 10:26:54 +02:00
Lukas Woodtli
6aac64dbfd ci: Update checkout GitHub action
The GitHub action `checkout` version 3 has been deprecated. Updating to
version 4.
2024-04-25 10:26:54 +02:00
Lukas Woodtli
0967d1c941 ci: Update upload-artifact GitHub action
The GitHub action `upload-artifact` versions 1 to 3 have been
deprecated. Updating to version 4.
2024-04-25 10:26:54 +02:00
Lukas Woodtli
5001ecc163 ci: Update Run-On-Arch GitHub Action
Use newer GitHub action to support more modern CMake version. Build on
Debian bookworm that supports CMake 3.25.
2024-04-25 10:13:15 +02:00
Lukas Woodtli
ec4609e0d7 Adjust for renaming 'master' to 'main'
The 'master' branch was renamed to 'main' to reduce the use of harmful
language. Therefore, some scripts and descriptions were adjusted to the
new name of the default branch.
Words matter!
2024-01-30 17:46:14 +01:00
Marc Lasch
48af173787 ci: Fix SonarCloud Scan with outdated Java version
SonarCloud Scan does no longer support Java 11. Use
`sonarsource/sonarcloud-github-c-cpp` action to install sonarcloud and
the build-wrapper directly from the original vendor instead of a third
party.
2024-01-30 11:14:10 +01:00
Marc Lasch
4a49d40bc3 ci: Install build tools from apt package manager
Use apt to install cmake and ninja-build instead of using third party
Github actions.
2024-01-29 19:16:36 +01:00
Lukas Woodtli
2d5ac1366c ci: Fix building and running with sanitizers
The sanitizers need to be activated at configuration time
of the CMake project. Not when executing the build command.
2023-11-21 10:24:50 +01:00
Marc Lasch
d45b4e3085 ci: Replace outdated codeql actions
Replaces the version v1 of the CodeQL Action which was deprecated on
January 18th, 2023, and is no longer updated or supported. More information:
https://github.blog/changelog/2023-01-18-code-scanning-codeql-action-v1-is-now-deprecated/

gitlint-ignore: all
2023-07-27 13:08:20 +02:00
Reto Schneider
0f3267f989 ci: Replace outdated actions
Resolves the following warning when running actions on GitHub:

 Node.js 12 actions are deprecated. Please update the following actions to use
 Node.js 16: actions/checkout@v2, seanmiddleditch/gha-setup-ninja@master. For
 more information see:
 https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

gitlint-ignore: all
2023-03-21 18:24:02 +01:00
Reto Schneider
729638fa05 ci: Update to Ubuntu 22.04
Updating to a newer version improves the tooling such as clang-format
as well as static and runtime error detection.
2023-03-21 18:24:02 +01:00
Reto Schneider
3eaf76e8d5 tinydtls: Update to most recent version, simplify usage
While (again) not an official release, this will advance us by 274
commits:

```
$ git rev-list --count 178b945e5497b813b1239e2fbf57e34b7488745f..HEAD
274
```
2023-03-01 09:18:15 +01:00
Reto Schneider
178182508f ci: Fix multiarch builds
Simply disabling the relevant security feature [1] because we do not
benefit from it.

[1] 8959555cee
2023-02-21 10:55:01 +01:00
Marc Lasch
a108ed84a7 ci: Default to clang-format-12
Use clang-format-12 for CI runs. Ubuntu 22.04 LTS does not package
clang-format-10 anymore. Both Ubuntu 22.04 LTS and 20.04 LTS ship
clang-format-12.
2022-07-05 17:06:44 +02:00
Reto Schneider
8533386530 ci: Fix standalone examples
"name:" is absolutely required, but when missing, does not prevent
GitHub from displaying a CI tick. :(
2022-02-10 11:03:07 +01:00
Reto Schneider
6eaeea2177 [GH-574] ci: Enforce CMake formatting
This ensures we can always run cmake-format on our CMake files.
2022-02-08 22:28:44 +01:00
Reto Schneider
d57d5471c0 [GH-574] ci: Configure and integrate cmake-format
cmake-format ensures that our CMake code adheres to the format accepted
by cmake-format.

The code style is based on default one, with some minor adjustments.
2022-02-04 18:04:32 +01:00
Reto Schneider
b8e85f3002 cmake: Simplify build system
Before this, the build system set many flags and defines globally,
making it hard-to-impossible to build binaries with freely chosen
combinations of defines in the same build tree.

With this new design, compilation flags are bound to their targets,
which is the preferred style since CMake ~3.0.

Pro:
 - Unit tests and compilation checks can cover arbitrary (all!) defines
 - Simplified usage when including Wakaama in a CMake based project:
   - include wakaama.cmake
   - add_executable(your-binary ...)
   - target_compile_definitions(your-binary ...)
   - target_sources_wakaama(your-binary)
 - DTLS enabled example client built next to the plaintext one. This
   will make it easier to integrate both binaries in the same
   integration test run.

Con:
 - Building the example client project requires the tinydtls submodule
   to be checked out. Same goes for the top level "wakaama" project,
   which includes the example client.
2022-02-04 18:04:32 +01:00
Reto Schneider
2aae90cf57 ci: Simplify compliance GitHub action
This should work equally well and does not waste resources on multiple
checkouts.
2022-02-04 18:04:32 +01:00
Reto Schneider
ace39f967c ci: Fix typo
sanititzed -> sanitized
2022-02-04 18:04:32 +01:00
Reto Schneider
15f66cd4c5 ci: Build all examples as standalone
This ensures the examples can be built independently as described in the
readme file.
2022-02-04 17:56:50 +01:00
Reto Schneider
d2cb0b1a19 ci: Update and simplify multiarch builds
The CMake version 3.18.4 binary from Debian Bullseye seems to work and
speeds up the builds greatly.
2022-01-16 12:11:55 +01:00
Leif Sandstrom
ae806d6876 Add more integration tests
Add int-102, int-105, int-301, int-302
2021-05-28 13:05:22 +02:00
Leif Sandstrom
a1281ab4ab Add integration tests
Add initial pytest based integration tests
2021-05-25 17:17:49 +02:00
Reto Schneider
f623e8c0a5 [GH-574] ci: Configure and integrate clang-format
git-clang-format ensures that all *new* code being submitted adheres to
the format dictated by clang-format.

The code style is based on LLVM (the creator of clang-format), but with
4 instead of 2 spaces indent width and a maximum of 120 instead of 80
characters per line in order to blend in well with existing code.

Please note:
- The er-coap-13 code gets exempt, as at some point, we probably want to
  to interact with whatever upstream there might be. For those files,
  just do what existing code does (which varies every few lines).
- Default is clang-format-10, which is available in the Ubuntu 20.04
  GitHub runner.
2021-04-27 14:42:34 +02:00
Reto Schneider
c9cb48fc28 ci: Fix typo
Checkpatch is not even used in this project.
2021-04-27 14:42:34 +02:00
Reto Schneider
89b9d3efda [GH-585] ci: Fix SonarQube data collection
This workflow does not have gitlint installed, and does not need it.
Therefore it should not try to invoke it.

This error could get introduced because SonarCloud scan are running only
on master for now. See 866e5050838a9edf03ce79698823677f73635cb3 for
details.
2021-04-22 09:53:09 +02:00
Reto Schneider
54b4cf9f98 [GH-585] ci: Remove unneeded command
This was used for debugging purposes and is no longer needed.
2021-04-22 09:53:09 +02:00
Reto Schneider
8218ddcffe [GH-585] ci: Integrate gitlint
This is a fairly default configuration, which, among other stuff,
checks for the subject line being 72 or less characters as required by
the Eclipse project handbook.

Non-default rules:
- Enforce at least 20 characters in the commit body
- Disallow the word "fixup" in the title messages. Intended to prevent
  accidents like d31d026cb24bc88730c065d3be800a8d8e78e2b0.

In case any of those rules get in the way, use the "gitlint-ignore" tag
in the commit message to suppress gitlint findings for this specific
commit. To configure a rule permanently, adapt .gitlint.

The GitHub Action runs only on PRs, not after each push. The idea is to
prevent annoyance when working on code, using WIP or other non-compliant
commit messages.
2021-04-21 22:44:31 +02:00