Browse Source

CI: add GCC 12

Benoit Blanchon 2 years ago
parent
commit
fc1f06822c

+ 4 - 0
.devcontainer/gcc12/Dockerfile

@@ -0,0 +1,4 @@
+FROM ubuntu:22.04
+
+RUN apt-get update
+RUN apt-get install -y cmake git g++-12

+ 20 - 0
.devcontainer/gcc12/devcontainer.json

@@ -0,0 +1,20 @@
+{
+	"name": "GCC 12",
+	"build": {
+		"dockerfile": "Dockerfile",
+	},
+	"runArgs": [
+		"--name=ArduinoJson-gcc12"
+	],
+	"customizations": {
+		"vscode": {
+			"extensions": [
+				"ms-vscode.cmake-tools"
+			],
+			"settings": {
+				"cmake.generator": "Unix Makefiles",
+				"cmake.buildDirectory": "/tmp/build"
+			}
+		}
+	}
+}

+ 1 - 0
.github/workflows/ci.yml

@@ -44,6 +44,7 @@ jobs:
           - gcc: "10"
             cxxflags: -funsigned-char # Issue #1715
           - gcc: "11"
+          - gcc: "12"
     steps:
       - name: Install
         run: |

+ 1 - 1
README.md

@@ -80,7 +80,7 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
     * [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=7.x)
     * Continuously tested on
         * [Visual Studio 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/7.x)
-        * [GCC 5, 6, 7, 8, 9, 10, 11](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
+        * [GCC 5, 6, 7, 8, 9, 10, 11, 12](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
         * [Clang 3.9, 4.0, 5.0, 6.0, 7, 8, 9, 10, 11, 12, 13, 14, 15](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
     * [Continuously fuzzed with Google OSS Fuzz](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)
     * Passes all default checks of [clang-tidy](https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/)

+ 1 - 1
extras/tests/ResourceManager/saveString.cpp

@@ -25,7 +25,7 @@ TEST_CASE("ResourceManager::saveString()") {
   SECTION("Duplicates different strings") {
     auto a = saveString(resources, "hello");
     auto b = saveString(resources, "world");
-    REQUIRE(a->data != b->data);
+    REQUIRE(+a->data != +b->data);
     REQUIRE(a->length == 5);
     REQUIRE(b->length == 5);
     REQUIRE(a->references == 1);