mirror of https://github.com/aminya/setup-cpp.git
test: add script for docker image structure tests
This commit is contained in:
parent
40453112a2
commit
7d8a4af8c4
|
|
@ -72,5 +72,8 @@
|
|||
"prettier.enable": false,
|
||||
"javascript.preferences.importModuleSpecifierEnding": "js",
|
||||
"typescript.preferences.importModuleSpecifierEnding": "js",
|
||||
"eslint.useESLintClass": true
|
||||
"eslint.useESLintClass": true,
|
||||
"yaml.schemas": {
|
||||
"https://json.schemastore.org/container-structure-test.json": "/dev/docker/ci/tests/*.yml"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcc
|
||||
command: /usr/bin/gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcc.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-15/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
import fastGlob from "fast-glob"
|
||||
const { glob } = fastGlob
|
||||
import path from "path"
|
||||
import { execa } from "execa"
|
||||
|
||||
async function main() {
|
||||
const testFiles = await glob("./dev/docker/ci/*.yml")
|
||||
const results = await Promise.all(testFiles.map(async (testFile) => {
|
||||
try {
|
||||
// the image name
|
||||
const image = `setup-cpp-${path.basename(testFile, ".yml")}`
|
||||
|
||||
// check if the image exists
|
||||
const imageExists = await execa("docker", ["images", "-q", image])
|
||||
if (imageExists.exitCode !== 0 || imageExists.stdout.trim() === "") {
|
||||
console.log(`Image ${image} does not exist`)
|
||||
return 2
|
||||
}
|
||||
|
||||
await execa("container-structure-test", ["test", "--image", image, "--config", testFile], {
|
||||
stdio: "inherit",
|
||||
})
|
||||
return 0
|
||||
} catch (error) {
|
||||
console.error(error.message)
|
||||
return 1
|
||||
}
|
||||
}))
|
||||
|
||||
if (results.some((result) => result === 1)) {
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
await main()
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcc
|
||||
command: /usr/bin/gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcc.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-15/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-cpp
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-cpp.*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: gcc
|
||||
command: /usr/bin/gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcc.*"]
|
||||
- name: g++
|
||||
command: /usr/bin/g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*g++.*"]
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
import path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import { execa } from "execa"
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const rootDir = path.resolve(__dirname, "..", "..", "..", "..")
|
||||
const testsDir = path.resolve(rootDir, "./dev/docker/ci/tests")
|
||||
|
||||
async function main() {
|
||||
const variants = ["base", "gcc", "llvm", "mingw"]
|
||||
|
||||
const distros = ["ubuntu", "fedora", "arch"]
|
||||
|
||||
let failed = false
|
||||
for (const distro of distros) {
|
||||
for (const variant of variants) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const result = await testDocker(variant, distro)
|
||||
if (result !== 0) {
|
||||
failed = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
await main()
|
||||
|
||||
/**
|
||||
* Test the docker image
|
||||
* @param variant - The variant to test
|
||||
* @param distro - The distro to test
|
||||
* @returns The exit code of the test
|
||||
*/
|
||||
async function testDocker(variant: string, distro: string): Promise<number> {
|
||||
try {
|
||||
const image = variant === "base"
|
||||
? `aminya/setup-cpp-${distro}:latest`
|
||||
: `aminya/setup-cpp-${distro}-${variant}:latest`
|
||||
const testConfig = path.join(testsDir, `${variant}.yml`)
|
||||
|
||||
console.log(`Testing ${image} with ${testConfig} `)
|
||||
|
||||
// Test the specific config
|
||||
await runContainerStructureTest(image, testConfig)
|
||||
|
||||
// Test the base config
|
||||
if (variant !== "base") {
|
||||
const baseResult = await testDocker("base", distro)
|
||||
if (baseResult !== 0) {
|
||||
return baseResult
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message)
|
||||
} else {
|
||||
console.error(error)
|
||||
}
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
async function runContainerStructureTest(image: string, testConfig: string) {
|
||||
await execa("container-structure-test", [
|
||||
"test",
|
||||
"--pull",
|
||||
"--image",
|
||||
image,
|
||||
"--config",
|
||||
testConfig,
|
||||
"--platform",
|
||||
"linux/amd64",
|
||||
], {
|
||||
stdio: "inherit",
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-19/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "llvm"
|
||||
path: "/root/llvm"
|
||||
shouldExist: true
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcc
|
||||
command: /usr/bin/gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcc.*"]
|
||||
- name: g++
|
||||
command: /usr/bin/g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*g++.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "ninja"
|
||||
path: "/root/ninja"
|
||||
shouldExist: true
|
||||
- name: "cmake"
|
||||
path: "/root/cmake"
|
||||
shouldExist: true
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: clang
|
||||
command: /usr/lib/llvm-15/bin/clang
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*clang.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "llvm"
|
||||
path: "/root/llvm"
|
||||
shouldExist: true
|
||||
- name: "ninja"
|
||||
path: "/root/ninja"
|
||||
shouldExist: true
|
||||
- name: "cmake"
|
||||
path: "/root/cmake"
|
||||
shouldExist: true
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
schemaVersion: 2.0.0
|
||||
|
||||
commandTests:
|
||||
- name: cmake
|
||||
command: cmake
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*3.*"]
|
||||
- name: ninja
|
||||
command: /root/ninja/ninja
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: task
|
||||
command: task
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Task version:\\s*v3.*"]
|
||||
- name: python
|
||||
command: python
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: python3
|
||||
command: python3
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*Python.*"]
|
||||
- name: make
|
||||
command: make
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*GNU Make.*"]
|
||||
- name: cppcheck
|
||||
command: cppcheck
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: gcovr
|
||||
command: gcovr
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*gcovr.*"]
|
||||
- name: doxygen
|
||||
command: doxygen
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*1.*"]
|
||||
- name: ccache
|
||||
command: ccache
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: conan
|
||||
command: conan
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: meson
|
||||
command: meson
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-format
|
||||
command: cmake-format
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: cmake-lint
|
||||
command: cmake-lint
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*"]
|
||||
- name: mingw c compiler
|
||||
command: x86_64-w64-mingw32-gcc
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-gcc.*"]
|
||||
- name: mingw c++ compiler
|
||||
command: x86_64-w64-mingw32-g++
|
||||
args: ["--version"]
|
||||
expectedOutput: [".*x86_64-w64-mingw32-g\\+\\+*"]
|
||||
- name: powershell
|
||||
command: pwsh
|
||||
args: ["-Version"]
|
||||
expectedOutput: [".*PowerShell.*"]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: "vcpkg"
|
||||
path: "/root/vcpkg"
|
||||
shouldExist: true
|
||||
- name: "cross root"
|
||||
path: "/usr/x86_64-w64-mingw32"
|
||||
shouldExist: true
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
"test.lint.root.eslint": "eslint './{src,dev}/**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
|
||||
"test.lint.biome": "biome check",
|
||||
"test.lint.dprint": "dprint check",
|
||||
"test.docker": "node ./dev/docker/ci/docker-test.mjs",
|
||||
"test.docker": "tsx ./dev/docker/ci/tests/index.mts",
|
||||
"test": "turbo test && jest --runInBand --forceExit --coverage",
|
||||
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs"
|
||||
},
|
||||
|
|
@ -144,6 +144,7 @@
|
|||
"timers-browserify": "^2.0.12",
|
||||
"ts-node": "^10.9.2",
|
||||
"ts-readme": "^1.1.3",
|
||||
"tsx": "^4.19.3",
|
||||
"turbo": "2.4.4",
|
||||
"typescript": "^5.8.2",
|
||||
"ubuntu-version": "^2.0.0",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ importers:
|
|||
version: 2.2.5
|
||||
'@liuli-util/vite-plugin-node':
|
||||
specifier: ^0.9.0
|
||||
version: 0.9.0(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0))
|
||||
version: 0.9.0(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))
|
||||
'@octokit/core':
|
||||
specifier: ^6.1.4
|
||||
version: 6.1.4
|
||||
|
|
@ -262,6 +262,9 @@ importers:
|
|||
ts-readme:
|
||||
specifier: ^1.1.3
|
||||
version: 1.1.3(typescript@5.8.2)
|
||||
tsx:
|
||||
specifier: ^4.19.3
|
||||
version: 4.19.3
|
||||
turbo:
|
||||
specifier: 2.4.4
|
||||
version: 2.4.4
|
||||
|
|
@ -279,10 +282,10 @@ importers:
|
|||
version: 0.0.2
|
||||
vite:
|
||||
specifier: ^6.2.0
|
||||
version: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0)
|
||||
version: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||
vite-plugin-babel:
|
||||
specifier: ^1.3.0
|
||||
version: 1.3.0(@babel/core@7.26.9)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0))
|
||||
version: 1.3.0(@babel/core@7.26.9)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))
|
||||
web-streams-polyfill:
|
||||
specifier: ^4.1.0
|
||||
version: 4.1.0
|
||||
|
|
@ -3306,6 +3309,9 @@ packages:
|
|||
resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
get-tsconfig@4.10.0:
|
||||
resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==}
|
||||
|
||||
git-config-path@2.0.0:
|
||||
resolution: {integrity: sha512-qc8h1KIQbJpp+241id3GuAtkdyJ+IK+LIVtkiFTRKRrmddDzs3SI9CvP1QYmWBFvm1I/PWRwj//of8bgAc0ltA==}
|
||||
engines: {node: '>=4'}
|
||||
|
|
@ -4781,6 +4787,9 @@ packages:
|
|||
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
resolve-pkg-maps@1.0.0:
|
||||
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||
|
||||
resolve.exports@2.0.3:
|
||||
resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==}
|
||||
engines: {node: '>=10'}
|
||||
|
|
@ -5243,6 +5252,11 @@ packages:
|
|||
peerDependencies:
|
||||
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
|
||||
|
||||
tsx@4.19.3:
|
||||
resolution: {integrity: sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
hasBin: true
|
||||
|
||||
tunnel@0.0.6:
|
||||
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
|
||||
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
|
||||
|
|
@ -6660,14 +6674,14 @@ snapshots:
|
|||
'@jridgewell/resolve-uri': 3.1.2
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
||||
'@liuli-util/vite-plugin-node@0.9.0(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0))':
|
||||
'@liuli-util/vite-plugin-node@0.9.0(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))':
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.51.1(@types/node@22.13.8)
|
||||
magic-string: 0.30.17
|
||||
pathe: 1.1.2
|
||||
rollup-plugin-node-externals: 7.1.3(rollup@4.34.9)
|
||||
vite: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0)
|
||||
vite-plugin-dts: 3.9.1(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0))
|
||||
vite: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||
vite-plugin-dts: 3.9.1(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- rollup
|
||||
|
|
@ -9154,6 +9168,10 @@ snapshots:
|
|||
es-errors: 1.3.0
|
||||
get-intrinsic: 1.3.0
|
||||
|
||||
get-tsconfig@4.10.0:
|
||||
dependencies:
|
||||
resolve-pkg-maps: 1.0.0
|
||||
|
||||
git-config-path@2.0.0: {}
|
||||
|
||||
git-hooks-list@1.0.3: {}
|
||||
|
|
@ -10868,6 +10886,8 @@ snapshots:
|
|||
|
||||
resolve-from@5.0.0: {}
|
||||
|
||||
resolve-pkg-maps@1.0.0: {}
|
||||
|
||||
resolve.exports@2.0.3: {}
|
||||
|
||||
resolve@1.19.0:
|
||||
|
|
@ -11401,6 +11421,13 @@ snapshots:
|
|||
tslib: 1.14.1
|
||||
typescript: 5.8.2
|
||||
|
||||
tsx@4.19.3:
|
||||
dependencies:
|
||||
esbuild: 0.25.0
|
||||
get-tsconfig: 4.10.0
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
|
||||
tunnel@0.0.6: {}
|
||||
|
||||
turbo-darwin-64@2.4.4:
|
||||
|
|
@ -11586,12 +11613,12 @@ snapshots:
|
|||
|
||||
validator@13.12.0: {}
|
||||
|
||||
vite-plugin-babel@1.3.0(@babel/core@7.26.9)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0)):
|
||||
vite-plugin-babel@1.3.0(@babel/core@7.26.9)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)):
|
||||
dependencies:
|
||||
'@babel/core': 7.26.9
|
||||
vite: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0)
|
||||
vite: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||
|
||||
vite-plugin-dts@3.9.1(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0)):
|
||||
vite-plugin-dts@3.9.1(@types/node@22.13.8)(rollup@4.34.9)(typescript@5.8.2)(vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)):
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.43.0(@types/node@22.13.8)
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.34.9)
|
||||
|
|
@ -11602,13 +11629,13 @@ snapshots:
|
|||
typescript: 5.8.2
|
||||
vue-tsc: 1.8.27(typescript@5.8.2)
|
||||
optionalDependencies:
|
||||
vite: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0)
|
||||
vite: 6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- rollup
|
||||
- supports-color
|
||||
|
||||
vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(yaml@2.7.0):
|
||||
vite@6.2.0(@types/node@22.13.8)(lightningcss@1.26.0)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0):
|
||||
dependencies:
|
||||
esbuild: 0.25.0
|
||||
postcss: 8.5.3
|
||||
|
|
@ -11618,6 +11645,7 @@ snapshots:
|
|||
fsevents: 2.3.3
|
||||
lightningcss: 1.26.0
|
||||
terser: 5.39.0
|
||||
tsx: 4.19.3
|
||||
yaml: 2.7.0
|
||||
|
||||
vscode-json-languageservice@4.2.1:
|
||||
|
|
|
|||
Loading…
Reference in New Issue