Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] enable all tests for Ubuntu 22; NP & LR tests for Ubuntu 18 #173

Merged
merged 4 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/parallel-ctest-containers/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: 'Parallel ctest'
description: 'Runs a set of ctests in parallel via multiple docker containers'
description: 'Runs a set of labeled ctests in parallel via multiple docker containers'
inputs:
container:
required: true
error-log-paths:
required: true
log-tarball-prefix:
required: true
tests:
tests-label:
required: true
runs:
using: 'node16'
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/parallel-ctest-containers/dist/index.mjs

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions .github/actions/parallel-ctest-containers/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ import core from '@actions/core'
const container = core.getInput('container', {required: true});
const error_log_paths = JSON.parse(core.getInput('error-log-paths', {required: true}));
const log_tarball_prefix = core.getInput('log-tarball-prefix', {required: true});
const tests = JSON.parse(core.getInput('tests', {required: true}));
const tests_label = core.getInput('tests-label', {required: true});

try {
if(child_process.spawnSync("docker", ["run", "--name", "base", "-v", `${process.cwd()}/build.tar.zst:/build.tar.zst`, "--workdir", "/__w/leap/leap", container, "tar", "--zstd", "-xf", "/build.tar.zst"], {stdio:"inherit"}).status)
if(child_process.spawnSync("docker", ["run", "--name", "base", "-v", `${process.cwd()}/build.tar.zst:/build.tar.zst`, "--workdir", "/__w/leap/leap", container, "sh", "-c", "zstdcat /build.tar.zst | tar x"], {stdio:"inherit"}).status)
throw new Error("Failed to create base container");
if(child_process.spawnSync("docker", ["commit", "base", "baseimage"], {stdio:"inherit"}).status)
throw new Error("Failed to create base image");
if(child_process.spawnSync("docker", ["rm", "base"], {stdio:"inherit"}).status)
throw new Error("Failed to remove base container");

// the correct approach is by far "--show-only=json-v1" and then pluck out .tests[].name; but that doesn't work on U18's cmake 3.10 since it lacks json-v1 output
const test_query_result = child_process.spawnSync("docker", ["run", "--rm", "baseimage", "bash", "-e", "-o", "pipefail", "-c", `cd build; ctest -L '${tests_label}' --show-only | head -n -1 | cut -d ':' -f 2 -s | jq -cnR '[inputs | select(length>0)[1:]]'`]);
if(test_query_result.status)
throw new Error("Failed to discover tests with label")
const tests = JSON.parse(test_query_result.stdout);

let subprocesses = [];
tests.forEach(t => {
subprocesses.push(new Promise(resolve => {
Expand Down
351 changes: 351 additions & 0 deletions .github/actions/parallel-ctest-containers/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading