diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..6d2442b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1 @@ +FROM ghcr.io/philips-software/amp-devcontainer:v4.0.2@sha256:2d052e0bcb3840ea45aaa21ea6904f6d84b0e310c97e5690a6d48da522ec384e diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6f5c884..f08e1b0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,18 +1,37 @@ { // This devcontainer has been set-up to run docker-from-docker scenarios as per // https://github.com/microsoft/vscode-dev-containers/tree/main/containers/docker-from-docker - "name": "amp-devcontainer", - "image": "ghcr.io/philips-software/amp-devcontainer:2.2.0", - "runArgs": [ "--add-host=host.docker.internal:host-gateway" ], + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, + "runArgs": ["--add-host=host.docker.internal:host-gateway"], "remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" }, "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], - "extensions": [ - "llvm-vs-code-extensions.vscode-clangd", - "marus25.cortex-debug", - "matepek.vscode-catch2-test-adapter", - "ms-vscode.cmake-tools", - "SonarSource.sonarlint-vscode" - ] + "customizations": { + "vscode": { + "extensions": [ + "llvm-vs-code-extensions.vscode-clangd", + "marus25.cortex-debug", + "matepek.vscode-catch2-test-adapter", + "mhutchie.git-graph", + "ms-vscode.cmake-tools", + "ms-vscode.cpptools", + "ms-vsliveshare.vsliveshare", + "SonarSource.sonarlint-vscode" + ], + "settings": { + "C_Cpp.autoAddFileAssociations": false, + "C_Cpp.intelliSenseEngine": "disabled", + "clangd.arguments": [ + "--query-driver=/**/arm-none-eabi-*" + ], + "cmake.copyCompileCommands": "${workspaceFolder}/build/compile_commands.json", + "cmake.options.statusBarVisibility": "compact", + "sonarlint.pathToCompileCommands": "${workspaceFolder}/build/compile_commands.json" + } + } + } } diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e2323ae..3173e5e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,7 @@ updates: directory: / schedule: interval: daily + - package-ecosystem: docker + directory: / + schedule: + interval: daily diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 775695a..010d862 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -18,7 +18,7 @@ jobs: sonar: name: SonarCloud runs-on: ubuntu-latest - container: ghcr.io/philips-software/amp-devcontainer:2.5.0 + container: ghcr.io/philips-software/amp-devcontainer:v4.0.2@sha256:2d052e0bcb3840ea45aaa21ea6904f6d84b0e310c97e5690a6d48da522ec384e env: SONAR_SCANNER_VERSION: 5.0.1.3006 SONAR_SERVER_URL: "https://sonarcloud.io" @@ -57,21 +57,22 @@ jobs: codeql: name: CodeQL runs-on: ubuntu-latest + container: ghcr.io/philips-software/amp-devcontainer:v4.0.2@sha256:2d052e0bcb3840ea45aaa21ea6904f6d84b0e310c97e5690a6d48da522ec384e permissions: security-events: write steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: persist-credentials: false - - run: sudo apt-get update && sudo apt-get install ninja-build - uses: hendrikmuhs/ccache-action@2a51777f6f64b7b7bea213601acba8f5f4fdbe03 # v1.2.11 with: key: ${{ github.job }} - uses: github/codeql-action/init@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 with: languages: cpp - - run: | - cmake --preset continuous-integration -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - cmake --build --preset continuous-integration + - uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7 + with: + configurePreset: "continuous-integration" + buildPreset: "continuous-integration" + configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']" - uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 - diff --git a/.mega-linter.yml b/.mega-linter.yml index 090dc77..59fef91 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -1,3 +1,4 @@ +--- ENABLE: - ACTION - DOCKERFILE