ci: gh-actions: clang+libc++ cannot find headers
authorMichael Wallner <mike@php.net>
Mon, 21 Dec 2020 15:15:46 +0000 (16:15 +0100)
committerMichael Wallner <mike@php.net>
Mon, 21 Dec 2020 15:15:46 +0000 (16:15 +0100)
.github/workflows/cmake-build-ci.gen
.github/workflows/cmake-build-ci.yml

index 1e268f6aa58b65bf907d0a35f5aed0549d58e05e..9494590bd66945bb79d7d03b57050b670491a027 100755 (executable)
@@ -32,40 +32,6 @@ const DEF = [
     "CXX" => "mingw",
   ]
 ];
-const ENV = [
-  "ubuntu-20.04" => [
-    "gnu" => [
-      "new" => [
-        "INSTALL_CC" => "gcc-10",
-        "INSTALL_CXX" => "g++-10",
-      ]
-    ],
-    "clang" => [
-      "new" => [
-        "CXXFLAGS" => "-stdlib=libc++"
-      ],
-      "cur" => [
-        "CXXFLAGS" => "-stdlib=libc++"
-      ],
-      "old" => [
-        "CXXFLAGS" => "-stdlib=libc++"
-      ],
-    ]
-  ],
-  "ubuntu-18.04" => [
-    "clang" => [
-      "new" => [
-        "CXXFLAGS" => "-stdlib=libc++"
-      ],
-      "cur" => [
-        "CXXFLAGS" => "-stdlib=libc++"
-      ],
-      "old" => [
-        "CXXFLAGS" => "-stdlib=libc++"
-      ],
-    ]
-  ]
-];
 const MAP = [
   'env.OS_VER' => [
     "ubuntu-20.04" => [
@@ -106,6 +72,44 @@ const MAP = [
     ],
   ]
 ];
+const ENV = [
+  "ubuntu-20.04" => [
+    "gnu" => [
+      "new" => [
+        "INSTALL_CC" => "gcc-10",
+        "INSTALL_CXX" => "g++-10",
+      ]
+    ],
+    "clang" => [
+      "new" => [
+        "CXXFLAGS" => "-stdlib=libc++"
+      ],
+      "cur" => [
+        "CXXFLAGS" => "-stdlib=libc++",
+        "INSTALL_CXX" => "libc++"
+          . MAP["env.OS_VER"]["ubuntu-20.04"]["env.CC_VND"]["clang"]["env.CC_VER"]["cur"] . "-dev"
+      ],
+      "old" => [
+        "CXXFLAGS" => "-stdlib=libc++",
+        "INSTALL_CXX" => "libc++"
+          . MAP["env.OS_VER"]["ubuntu-20.04"]["env.CC_VND"]["clang"]["env.CC_VER"]["old"] . "-dev"
+      ],
+    ]
+  ],
+  "ubuntu-18.04" => [
+    "clang" => [
+      "new" => [
+        "CXXFLAGS" => "-stdlib=libc++"
+      ],
+      "cur" => [
+        "CXXFLAGS" => "-stdlib=libc++"
+      ],
+      "old" => [
+        "CXXFLAGS" => "-stdlib=libc++"
+      ],
+    ]
+  ]
+];
 
 /**
  * @var bool $splat_map false = no splat map, null = default splat map, true = full splat map
index 1823cc3b32730bd0d4c5fb03a86d678159997d56..1599bed7fde5e2fdec034434addc9f84ce11998d 100644 (file)
@@ -446,12 +446,14 @@ jobs:
           echo CC="clang-9" >> ${GITHUB_ENV}
           echo CXX="clang++-9" >> ${GITHUB_ENV}
           echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
+          echo INSTALL_CXX="libc++-9-dev" >> ${GITHUB_ENV}
       - name: Prepare environment (for old clang on ubuntu-20.04)
         if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='old')
         run: |
           echo CC="clang-8" >> ${GITHUB_ENV}
           echo CXX="clang++-8" >> ${GITHUB_ENV}
           echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
+          echo INSTALL_CXX="libc++-8-dev" >> ${GITHUB_ENV}
       - name: Prepare environment (for new gnu on ubuntu-18.04)
         if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new')
         run: |