chore(ci): remove legacy AntelopeIO/leap workflows #2
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"cdt":{
|
||||
"target":"4",
|
||||
"prerelease":false
|
||||
},
|
||||
"referencecontracts":{
|
||||
"ref":"main"
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:jammy
|
||||
ENV TZ="America/New_York"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get install -y build-essential \
|
||||
cmake \
|
||||
git \
|
||||
jq \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
llvm-11-dev \
|
||||
lsb-release \
|
||||
ninja-build \
|
||||
python3-numpy \
|
||||
software-properties-common \
|
||||
file \
|
||||
wget \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
||||
RUN yes | bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" llvm.sh 18
|
||||
|
||||
#make sure no confusion on what llvm library leap's cmake should pick up on
|
||||
RUN rm -rf /usr/lib/llvm-18/lib/cmake
|
||||
|
||||
ENV LEAP_PLATFORM_HAS_EXTRAS_CMAKE=1
|
||||
COPY <<-EOF /extras.cmake
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE)
|
||||
|
||||
set(CMAKE_C_COMPILER "clang-18" CACHE STRING "")
|
||||
set(CMAKE_CXX_COMPILER "clang++-18" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "-fsanitize=address -fno-omit-frame-pointer" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer" CACHE STRING "")
|
||||
EOF
|
||||
|
||||
ENV ASAN_OPTIONS=detect_leaks=0
|
||||
@@ -1,29 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
#the exact version of Ubuntu doesn't matter for the purpose of asserton builds. Feel free to upgrade in future
|
||||
FROM ubuntu:jammy
|
||||
ENV TZ="America/New_York"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get install -y build-essential \
|
||||
cmake \
|
||||
git \
|
||||
jq \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
llvm-11-dev \
|
||||
ninja-build \
|
||||
python3-numpy \
|
||||
file \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
||||
ENV LEAP_PLATFORM_HAS_EXTRAS_CMAKE=1
|
||||
COPY <<-EOF /extras.cmake
|
||||
# reset the build type to empty to disable any cmake default flags
|
||||
set(CMAKE_BUILD_TYPE "" CACHE STRING "" FORCE)
|
||||
|
||||
set(CMAKE_C_FLAGS "-O3" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "-O3" CACHE STRING "")
|
||||
|
||||
set(LEAP_ENABLE_RELEASE_BUILD_TEST "Off" CACHE BOOL "")
|
||||
EOF
|
||||
@@ -1,42 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:jammy
|
||||
ENV TZ="America/New_York"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get install -y build-essential \
|
||||
cmake \
|
||||
git \
|
||||
jq \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
llvm-11-dev \
|
||||
lsb-release \
|
||||
ninja-build \
|
||||
python3-numpy \
|
||||
software-properties-common \
|
||||
file \
|
||||
wget \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
||||
RUN yes | bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" llvm.sh 18
|
||||
|
||||
#make sure no confusion on what llvm library leap's cmake should pick up on
|
||||
RUN rm -rf /usr/lib/llvm-18/lib/cmake
|
||||
|
||||
COPY <<-EOF /ubsan.supp
|
||||
vptr:wasm_eosio_validation.hpp
|
||||
vptr:wasm_eosio_injection.hpp
|
||||
EOF
|
||||
|
||||
ENV LEAP_PLATFORM_HAS_EXTRAS_CMAKE=1
|
||||
COPY <<-EOF /extras.cmake
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE)
|
||||
|
||||
set(CMAKE_C_COMPILER "clang-18" CACHE STRING "")
|
||||
set(CMAKE_CXX_COMPILER "clang++-18" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer" CACHE STRING "")
|
||||
EOF
|
||||
|
||||
ENV UBSAN_OPTIONS=print_stacktrace=1,suppressions=/ubsan.supp
|
||||
@@ -1,22 +0,0 @@
|
||||
FROM ubuntu:focal
|
||||
ENV TZ="America/New_York"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get install -y build-essential \
|
||||
g++-10 \
|
||||
cmake \
|
||||
git \
|
||||
jq \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
llvm-11-dev \
|
||||
ninja-build \
|
||||
python3-numpy \
|
||||
file \
|
||||
zlib1g-dev \
|
||||
zstd && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave \
|
||||
/usr/bin/g++ g++ /usr/bin/g++-10 --slave \
|
||||
/usr/bin/gcov gcov /usr/bin/gcov-10
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
FROM ubuntu:jammy
|
||||
ENV TZ="America/New_York"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get install -y build-essential \
|
||||
cmake \
|
||||
git \
|
||||
jq \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
llvm-11-dev \
|
||||
ninja-build \
|
||||
python3-numpy \
|
||||
file \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
@@ -1,16 +0,0 @@
|
||||
name: 'Parallel ctest'
|
||||
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-label:
|
||||
required: true
|
||||
test-timeout:
|
||||
required: true
|
||||
runs:
|
||||
using: 'node20'
|
||||
main: 'dist/index.mjs'
|
||||
File diff suppressed because one or more lines are too long
@@ -1,71 +0,0 @@
|
||||
import child_process from 'node:child_process';
|
||||
import process from 'node:process';
|
||||
import stream from 'node:stream';
|
||||
import fs from 'node:fs';
|
||||
import zlib from 'node:zlib';
|
||||
import tar from 'tar-stream';
|
||||
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_label = core.getInput('tests-label', {required: true});
|
||||
const test_timeout = core.getInput('test-timeout', {required: true});
|
||||
|
||||
const repo_name = process.env.GITHUB_REPOSITORY.split('/')[1];
|
||||
|
||||
try {
|
||||
if(child_process.spawnSync("docker", ["run", "--name", "base", "-v", `${process.cwd()}/build.tar.zst:/build.tar.zst`, "--workdir", `/__w/${repo_name}/${repo_name}`, 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");
|
||||
|
||||
const test_query_result = child_process.spawnSync("docker", ["run", "--rm", "baseimage", "bash", "-e", "-o", "pipefail", "-c", `cd build; ctest -L '${tests_label}' --show-only=json-v1`]);
|
||||
if(test_query_result.status)
|
||||
throw new Error("Failed to discover tests with label")
|
||||
const tests = JSON.parse(test_query_result.stdout).tests;
|
||||
|
||||
let subprocesses = [];
|
||||
tests.forEach(t => {
|
||||
subprocesses.push(new Promise(resolve => {
|
||||
child_process.spawn("docker", ["run", "--security-opt", "seccomp=unconfined", "-e", "GITHUB_ACTIONS=True", "--name", t.name, "--init", "baseimage", "bash", "-c", `cd build; ctest --output-on-failure -R '^${t.name}$' --timeout ${test_timeout}`], {stdio:"inherit"}).on('close', code => resolve(code));
|
||||
}));
|
||||
});
|
||||
|
||||
const results = await Promise.all(subprocesses);
|
||||
|
||||
for(let i = 0; i < results.length; ++i) {
|
||||
if(results[i] === 0)
|
||||
continue;
|
||||
|
||||
//failing test
|
||||
core.setFailed("Some tests failed");
|
||||
|
||||
let extractor = tar.extract();
|
||||
let packer = tar.pack();
|
||||
|
||||
extractor.on('entry', (header, stream, next) => {
|
||||
if(!header.name.startsWith(`__w/${repo_name}/${repo_name}/build`)) {
|
||||
stream.on('end', () => next());
|
||||
stream.resume();
|
||||
return;
|
||||
}
|
||||
|
||||
header.name = header.name.substring(`__w/${repo_name}/${repo_name}/`.length);
|
||||
if(header.name !== "build/" && error_log_paths.filter(p => header.name.startsWith(p)).length === 0) {
|
||||
stream.on('end', () => next());
|
||||
stream.resume();
|
||||
return;
|
||||
}
|
||||
|
||||
stream.pipe(packer.entry(header, next));
|
||||
}).on('finish', () => {packer.finalize()});
|
||||
|
||||
child_process.spawn("docker", ["export", tests[i].name]).stdout.pipe(extractor);
|
||||
stream.promises.pipeline(packer, zlib.createGzip(), fs.createWriteStream(`${log_tarball_prefix}-${tests[i].name}-logs.tar.gz`));
|
||||
}
|
||||
} catch(e) {
|
||||
core.setFailed(`Uncaught exception ${e.message}`);
|
||||
}
|
||||
@@ -1,351 +0,0 @@
|
||||
{
|
||||
"name": "parallel-ctest-containers",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"tar-stream": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
|
||||
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
|
||||
"dependencies": {
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"uuid": "^8.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
|
||||
"integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@vercel/ncc": {
|
||||
"version": "0.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz",
|
||||
"integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==",
|
||||
"bin": {
|
||||
"ncc": "dist/ncc/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/bl": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"dependencies": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^3.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
|
||||
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.1.13"
|
||||
}
|
||||
},
|
||||
"node_modules/end-of-stream": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"dependencies": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"node_modules/ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tar-stream": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
||||
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||
"dependencies": {
|
||||
"bl": "^4.0.3",
|
||||
"end-of-stream": "^1.4.1",
|
||||
"fs-constants": "^1.0.0",
|
||||
"inherits": "^2.0.3",
|
||||
"readable-stream": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
|
||||
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
|
||||
"requires": {
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"uuid": "^8.3.2"
|
||||
}
|
||||
},
|
||||
"@actions/http-client": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
|
||||
"integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
|
||||
"requires": {
|
||||
"tunnel": "^0.0.6"
|
||||
}
|
||||
},
|
||||
"@vercel/ncc": {
|
||||
"version": "0.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz",
|
||||
"integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A=="
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||
},
|
||||
"bl": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"requires": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^3.4.0"
|
||||
}
|
||||
},
|
||||
"buffer": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
|
||||
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
||||
"requires": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.1.13"
|
||||
}
|
||||
},
|
||||
"end-of-stream": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"requires": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"tar-stream": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
||||
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||
"requires": {
|
||||
"bl": "^4.0.3",
|
||||
"end-of-stream": "^1.4.1",
|
||||
"fs-constants": "^1.0.0",
|
||||
"inherits": "^2.0.3",
|
||||
"readable-stream": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"tar-stream": "^2.2.0"
|
||||
}
|
||||
}
|
||||
@@ -1,361 +0,0 @@
|
||||
name: "Build & Test"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "release/*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
override-cdt:
|
||||
description: 'Override cdt target'
|
||||
type: string
|
||||
override-cdt-prerelease:
|
||||
type: choice
|
||||
description: Override cdt prelease
|
||||
options:
|
||||
- default
|
||||
- true
|
||||
- false
|
||||
override-reference-contracts:
|
||||
description: 'Override reference contracts ref'
|
||||
type: string
|
||||
skip-tests:
|
||||
description: 'Skip running tests'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
packages: read
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
platform-cache:
|
||||
name: Platform Cache
|
||||
uses: AntelopeIO/platform-cache-workflow/.github/workflows/platformcache.yaml@v1
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
with:
|
||||
runs-on: '["self-hosted", "enf-x86-beefy"]'
|
||||
platform-files: |
|
||||
.cicd/platforms
|
||||
tools/reproducible.Dockerfile:builder
|
||||
|
||||
build-base:
|
||||
name: Run Build Workflow
|
||||
uses: ./.github/workflows/build_base.yaml
|
||||
needs: [platform-cache]
|
||||
with:
|
||||
platforms: ${{needs.platform-cache.outputs.platforms}}
|
||||
platform-list: ${{needs.platform-cache.outputs.platform-list}}
|
||||
|
||||
v:
|
||||
name: Discover Versions
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
cdt-target: ${{steps.versions.outputs.cdt-target}}
|
||||
cdt-prerelease: ${{steps.versions.outputs.cdt-prerelease}}
|
||||
reference-contracts-ref: ${{steps.versions.outputs.reference-contracts-ref}}
|
||||
steps:
|
||||
- name: Setup cdt and reference-contracts versions
|
||||
id: versions
|
||||
env:
|
||||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
run: |
|
||||
DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url))
|
||||
echo cdt-target=$(echo "$DEFAULTS_JSON" | jq -r '.cdt.target') >> $GITHUB_OUTPUT
|
||||
echo cdt-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '.cdt.prerelease') >> $GITHUB_OUTPUT
|
||||
echo reference-contracts-ref=$(echo "$DEFAULTS_JSON" | jq -r '.referencecontracts.ref') >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ "${{inputs.override-cdt}}" != "" ]]; then
|
||||
echo cdt-target=${{inputs.override-cdt}} >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ "${{inputs.override-cdt-prerelease}}" == +(true|false) ]]; then
|
||||
echo cdt-prerelease=${{inputs.override-cdt-prerelease}} >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ "${{inputs.override-reference-contracts}}" != "" ]]; then
|
||||
echo reference-contracts-ref=${{inputs.override-reference-contracts}} >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
package:
|
||||
name: Build deb packages
|
||||
needs: [platform-cache, build-base]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu20, ubuntu22, reproducible]
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{fromJSON(needs.platform-cache.outputs.platforms)[matrix.platform].image}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Download builddir
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{matrix.platform}}-build
|
||||
- name: Build packages
|
||||
run: |
|
||||
zstdcat build.tar.zst | tar x
|
||||
cd build
|
||||
cpack
|
||||
../tools/tweak-deb.sh leap_*.deb
|
||||
- name: Install dev package
|
||||
if: matrix.platform != 'reproducible'
|
||||
run: |
|
||||
apt-get update && apt-get upgrade -y
|
||||
apt-get install -y ./build/leap_*.deb ./build/leap-dev*.deb
|
||||
- name: Test using TestHarness
|
||||
if: matrix.platform != 'reproducible'
|
||||
run: |
|
||||
python3 -c "from TestHarness import Cluster"
|
||||
- name: Upload dev package
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.platform != 'reproducible'
|
||||
with:
|
||||
name: leap-dev-${{matrix.platform}}-amd64
|
||||
path: build/leap-dev*.deb
|
||||
compression-level: 0
|
||||
- name: Upload leap package
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.platform == 'reproducible'
|
||||
with:
|
||||
name: leap-deb-amd64
|
||||
path: build/leap_*.deb
|
||||
compression-level: 0
|
||||
|
||||
tests:
|
||||
name: Tests (${{matrix.cfg.name}})
|
||||
needs: [platform-cache, build-base]
|
||||
if: ${{ !inputs.skip-tests }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- cfg: {name: 'ubuntu20', base: 'ubuntu20', builddir: 'ubuntu20'}
|
||||
- cfg: {name: 'ubuntu22', base: 'ubuntu22', builddir: 'ubuntu22'}
|
||||
- cfg: {name: 'asserton', base: 'asserton', builddir: 'asserton'}
|
||||
- cfg: {name: 'ubsan', base: 'ubsan', builddir: 'ubsan'}
|
||||
- cfg: {name: 'asan', base: 'asan', builddir: 'asan'}
|
||||
- cfg: {name: 'ubuntu20repro', base: 'ubuntu20', builddir: 'reproducible'}
|
||||
- cfg: {name: 'ubuntu22repro', base: 'ubuntu22', builddir: 'reproducible'}
|
||||
runs-on: ["self-hosted", "enf-x86-hightier"]
|
||||
container:
|
||||
image: ${{fromJSON(needs.platform-cache.outputs.platforms)[matrix.cfg.base].image}}
|
||||
options: --security-opt seccomp=unconfined --mount type=bind,source=/var/lib/systemd/coredump,target=/cores
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download builddir
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{matrix.cfg.builddir}}-build
|
||||
- name: Run Parallel Tests
|
||||
run: |
|
||||
# https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs
|
||||
chown -R $(id -u):$(id -g) $PWD
|
||||
zstdcat build.tar.zst | tar x
|
||||
cd build
|
||||
ctest --output-on-failure -j $(nproc) -LE "(nonparallelizable_tests|long_running_tests)" --timeout 420
|
||||
- name: Upload core files from failed tests
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{matrix.cfg.name}}-tests-logs
|
||||
if-no-files-found: ignore
|
||||
path: /cores
|
||||
compression-level: 0
|
||||
- name: Check CPU Features
|
||||
run: awk 'BEGIN {err = 1} /bmi2/ && /adx/ {err = 0} END {exit err}' /proc/cpuinfo
|
||||
|
||||
np-tests:
|
||||
name: NP Tests (${{matrix.cfg.name}})
|
||||
needs: [platform-cache, build-base]
|
||||
if: ${{ !inputs.skip-tests }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- cfg: {name: 'ubuntu20', base: 'ubuntu20', builddir: 'ubuntu20'}
|
||||
- cfg: {name: 'ubuntu22', base: 'ubuntu22', builddir: 'ubuntu22'}
|
||||
- cfg: {name: 'asserton', base: 'asserton', builddir: 'asserton'}
|
||||
- cfg: {name: 'ubsan', base: 'ubsan', builddir: 'ubsan'}
|
||||
- cfg: {name: 'ubuntu20repro', base: 'ubuntu20', builddir: 'reproducible'}
|
||||
- cfg: {name: 'ubuntu22repro', base: 'ubuntu22', builddir: 'reproducible'}
|
||||
runs-on: ["self-hosted", "enf-x86-midtier"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download builddir
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{matrix.cfg.builddir}}-build
|
||||
- name: Run tests in parallel containers
|
||||
uses: ./.github/actions/parallel-ctest-containers
|
||||
with:
|
||||
container: ${{fromJSON(needs.platform-cache.outputs.platforms)[matrix.cfg.base].image}}
|
||||
error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd", "build/TestLogs"]'
|
||||
log-tarball-prefix: ${{matrix.cfg.name}}
|
||||
tests-label: nonparallelizable_tests
|
||||
test-timeout: 420
|
||||
- name: Export core dumps
|
||||
run: docker run --mount type=bind,source=/var/lib/systemd/coredump,target=/cores alpine sh -c 'tar -C /cores/ -c .' | tar x
|
||||
if: failure()
|
||||
- name: Upload logs from failed tests
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{matrix.cfg.name}}-np-logs
|
||||
path: |
|
||||
*-logs.tar.gz
|
||||
core*.zst
|
||||
compression-level: 0
|
||||
|
||||
lr-tests:
|
||||
name: LR Tests (${{matrix.cfg.name}})
|
||||
needs: [platform-cache, build-base]
|
||||
if: ${{ !inputs.skip-tests }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- cfg: {name: 'ubuntu20', base: 'ubuntu20', builddir: 'ubuntu20'}
|
||||
- cfg: {name: 'ubuntu22', base: 'ubuntu22', builddir: 'ubuntu22'}
|
||||
- cfg: {name: 'asserton', base: 'asserton', builddir: 'asserton'}
|
||||
- cfg: {name: 'ubsan', base: 'ubsan', builddir: 'ubsan'}
|
||||
- cfg: {name: 'ubuntu20repro', base: 'ubuntu20', builddir: 'reproducible'}
|
||||
- cfg: {name: 'ubuntu22repro', base: 'ubuntu22', builddir: 'reproducible'}
|
||||
runs-on: ["self-hosted", "enf-x86-lowtier"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download builddir
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{matrix.cfg.builddir}}-build
|
||||
- name: Run tests in parallel containers
|
||||
uses: ./.github/actions/parallel-ctest-containers
|
||||
with:
|
||||
container: ${{fromJSON(needs.platform-cache.outputs.platforms)[matrix.cfg.base].image}}
|
||||
error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd", "build/TestLogs"]'
|
||||
log-tarball-prefix: ${{matrix.cfg.name}}
|
||||
tests-label: long_running_tests
|
||||
test-timeout: 1800
|
||||
- name: Export core dumps
|
||||
run: docker run --mount type=bind,source=/var/lib/systemd/coredump,target=/cores alpine sh -c 'tar -C /cores/ -c .' | tar x
|
||||
if: failure()
|
||||
- name: Upload logs from failed tests
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{matrix.cfg.name}}-lr-logs
|
||||
path: |
|
||||
*-logs.tar.gz
|
||||
core*.zst
|
||||
compression-level: 0
|
||||
|
||||
libtester-tests:
|
||||
name: libtester tests
|
||||
needs: [platform-cache, build-base, v, package]
|
||||
if: ${{ !inputs.skip-tests }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu22]
|
||||
test: [build-tree, make-dev-install, deb-install]
|
||||
runs-on: ["self-hosted", "enf-x86-midtier"]
|
||||
container: ${{ matrix.test != 'deb-install' && fromJSON(needs.platform-cache.outputs.platforms)[matrix.platform].image || 'ubuntu:jammy' }}
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
TZ: Etc/UTC
|
||||
steps:
|
||||
- name: Update Package Index & Upgrade Packages
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
# LEAP
|
||||
- if: ${{ matrix.test != 'deb-install' }}
|
||||
name: Clone leap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- if: ${{ matrix.test != 'deb-install' }}
|
||||
name: Download leap builddir
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{matrix.platform}}-build
|
||||
- if: ${{ matrix.test != 'deb-install' }}
|
||||
name: Extract leap build
|
||||
run: |
|
||||
zstdcat build.tar.zst | tar x
|
||||
- if: ${{ matrix.test == 'build-tree' }}
|
||||
name: Set leap_DIR env var
|
||||
run: |
|
||||
echo "leap_DIR=$PWD/build/lib/cmake/leap" >> "$GITHUB_ENV"
|
||||
- if: ${{ matrix.test == 'make-dev-install' }}
|
||||
name: leap dev-install
|
||||
run: |
|
||||
cmake --install build
|
||||
cmake --install build --component dev
|
||||
- if: ${{ matrix.test == 'make-dev-install' }}
|
||||
name: Delete leap artifacts
|
||||
run: |
|
||||
rm -r *
|
||||
- if: ${{ matrix.test == 'deb-install' }}
|
||||
name: Download leap-dev
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: leap-dev-${{matrix.platform}}-amd64
|
||||
- if: ${{ matrix.test == 'deb-install' }}
|
||||
name: Install leap-dev Package
|
||||
run: |
|
||||
apt-get install -y ./*.deb
|
||||
rm ./*.deb
|
||||
|
||||
# CDT
|
||||
- name: Download cdt
|
||||
uses: AntelopeIO/asset-artifact-download-action@v3
|
||||
with:
|
||||
owner: AntelopeIO
|
||||
repo: cdt
|
||||
file: 'cdt_.*amd64.deb'
|
||||
target: '${{needs.v.outputs.cdt-target}}'
|
||||
prereleases: ${{fromJSON(needs.v.outputs.cdt-prerelease)}}
|
||||
artifact-name: cdt_ubuntu_package_amd64
|
||||
- name: Install cdt Packages
|
||||
run: |
|
||||
apt-get install -y ./*.deb
|
||||
rm ./*.deb
|
||||
|
||||
# Reference Contracts
|
||||
- name: checkout reference-contracts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: AntelopeIO/reference-contracts
|
||||
path: reference-contracts
|
||||
ref: '${{needs.v.outputs.reference-contracts-ref}}'
|
||||
- if: ${{ matrix.test == 'deb-install' }}
|
||||
name: Install reference-contracts deps
|
||||
run: |
|
||||
apt-get -y install cmake build-essential
|
||||
- name: Build & Test reference-contracts
|
||||
run: |
|
||||
cmake -S reference-contracts -B reference-contracts/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DSYSTEM_ENABLE_LEAP_VERSION_CHECK=Off -DSYSTEM_ENABLE_CDT_VERSION_CHECK=Off
|
||||
cmake --build reference-contracts/build -- -j $(nproc)
|
||||
cd reference-contracts/build/tests
|
||||
ctest --output-on-failure -j $(nproc)
|
||||
|
||||
all-passing:
|
||||
name: All Required Tests Passed
|
||||
needs: [tests, np-tests, libtester-tests, package]
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- if: inputs.skip-tests && needs.package.result != 'success'
|
||||
run: false
|
||||
- if: ${{ !inputs.skip-tests && (needs.tests.result != 'success' || needs.np-tests.result != 'success' || needs.libtester-tests.result != 'success') }}
|
||||
run: false
|
||||
@@ -1,49 +0,0 @@
|
||||
name: "Build leap"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platforms:
|
||||
description: "Platforms definitions"
|
||||
type: string
|
||||
required: true
|
||||
platform-list:
|
||||
description: "Array of platforms"
|
||||
type: string
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
packages: read
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: Build leap
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ${{fromJSON(inputs.platform-list)}}
|
||||
runs-on: ["self-hosted", "enf-x86-beefy"]
|
||||
container: ${{fromJSON(inputs.platforms)[matrix.platform].image}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
id: build
|
||||
run: |
|
||||
# https://github.com/actions/runner/issues/2033
|
||||
chown -R $(id -u):$(id -g) $PWD
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_LEAP_DEV_DEB=On ${LEAP_PLATFORM_HAS_EXTRAS_CMAKE:+-C /extras.cmake} -GNinja
|
||||
cmake --build build
|
||||
tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst
|
||||
- name: Upload builddir
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{matrix.platform}}-build
|
||||
path: build.tar.zst
|
||||
compression-level: 0
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Jira Issue Creator
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
create-jira-issue:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'OCI'
|
||||
steps:
|
||||
- name: Create json issue file
|
||||
run: |
|
||||
cat << EOF > issue.json
|
||||
{
|
||||
"fields": {
|
||||
"project":
|
||||
{
|
||||
"key": "$JIRA_PROJECT_KEY"
|
||||
},
|
||||
"summary": "$JIRA_ISSUE_SUMMARY",
|
||||
"description": "$JIRA_ISSUE_DESCRIPTION",
|
||||
"issuetype": {
|
||||
"name": "$JIRA_ISSUE_TYPE_NAME"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
env:
|
||||
JIRA_PROJECT_KEY: ${{ secrets.JIRA_PROJECT_KEY }}
|
||||
JIRA_ISSUE_SUMMARY: ${{ github.event.issue.title }}
|
||||
JIRA_ISSUE_DESCRIPTION: "${{ github.event.issue.url }}\\n\\n${{ github.event.issue.html_url }}"
|
||||
JIRA_ISSUE_TYPE_NAME: "Story"
|
||||
- name: Check issue json
|
||||
run: |
|
||||
cat issue.json
|
||||
- name: Trigger jira issue creation
|
||||
run: |
|
||||
curl -u $JIRA_AUTH -X POST --data @issue.json -H "Content-Type: application/json" --url $JIRA_PROJECT_URL
|
||||
env:
|
||||
JIRA_AUTH: ${{ secrets.JIRA_USN_AND_TOKEN }}
|
||||
JIRA_PROJECT_URL: ${{ secrets.JIRA_PROJECT_URL }}
|
||||
@@ -1,18 +0,0 @@
|
||||
name: Label New Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: opened
|
||||
|
||||
jobs:
|
||||
label_new_issue:
|
||||
uses: AntelopeIO/issue-project-labeler-workflow/.github/workflows/issue-project-labeler.yaml@v1
|
||||
with:
|
||||
issue-id: ${{github.event.issue.node_id}}
|
||||
label: triage
|
||||
org-project: 'Team Backlog'
|
||||
project-field: Status=Todo
|
||||
skip-if-existing-project: true
|
||||
secrets:
|
||||
token: ${{secrets.ENFCIBOT_REPO_AND_PROJECTS}}
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
name: "Performance Harness Run"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platform-choice:
|
||||
description: 'Select Platform'
|
||||
type: choice
|
||||
options:
|
||||
- ubuntu20
|
||||
- ubuntu22
|
||||
override-test-params:
|
||||
description: 'Override perf harness params'
|
||||
type: string
|
||||
override-leap:
|
||||
description: Override leap target
|
||||
type: string
|
||||
override-leap-prerelease:
|
||||
type: choice
|
||||
description: Override leap prelease
|
||||
options:
|
||||
- default
|
||||
- true
|
||||
- false
|
||||
|
||||
permissions:
|
||||
packages: read
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
|
||||
v:
|
||||
name: Discover Inputs
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
test-params: ${{steps.overrides.outputs.test-params}}
|
||||
leap-target: ${{steps.overrides.outputs.leap-target}}
|
||||
leap-prerelease: ${{steps.overrides.outputs.leap-prerelease}}
|
||||
steps:
|
||||
- name: Setup Input Params
|
||||
id: overrides
|
||||
run: |
|
||||
echo test-params=findMax testBpOpMode >> $GITHUB_OUTPUT
|
||||
echo leap-target="DEFAULT" >> $GITHUB_OUTPUT
|
||||
echo leap-prerelease="false" >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ "${{inputs.override-test-params}}" != "" ]]; then
|
||||
echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ "${{inputs.override-leap}}" != "" ]]; then
|
||||
echo leap-target=${{inputs.override-leap}} >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ "${{inputs.override-leap-prerelease}}" == +(true|false) ]]; then
|
||||
echo leap-prerelease=${{inputs.override-leap-prerelease}} >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
platform-cache:
|
||||
name: Platform Cache
|
||||
uses: AntelopeIO/platform-cache-workflow/.github/workflows/platformcache.yaml@v1
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
with:
|
||||
runs-on: '["self-hosted", "enf-x86-beefy"]'
|
||||
platform-files: .cicd/platforms
|
||||
|
||||
reuse-build:
|
||||
name: Reuse leap build
|
||||
needs: [v]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build-artifact: ${{steps.downloadBuild.outputs.downloaded-file}}
|
||||
steps:
|
||||
- name: Download builddir
|
||||
id: downloadBuild
|
||||
uses: AntelopeIO/asset-artifact-download-action@v3
|
||||
with:
|
||||
owner: AntelopeIO
|
||||
repo: leap
|
||||
file: build.tar.zst
|
||||
target: ${{github.sha}}
|
||||
artifact-name: ${{github.event.inputs.platform-choice}}-build
|
||||
fail-on-missing-target: false
|
||||
|
||||
- name: Upload builddir
|
||||
if: steps.downloadBuild.outputs.downloaded-file != ''
|
||||
uses: AntelopeIO/upload-artifact-large-chunks-action@v1
|
||||
with:
|
||||
name: ${{github.event.inputs.platform-choice}}-build
|
||||
path: build.tar.zst
|
||||
|
||||
build-base:
|
||||
name: Run Build Workflow
|
||||
needs: [platform-cache, reuse-build]
|
||||
if: needs.reuse-build.outputs.build-artifact == ''
|
||||
uses: ./.github/workflows/build_base.yaml
|
||||
with:
|
||||
platforms: ${{needs.platform-cache.outputs.platforms}}
|
||||
platform-list: '["${{github.event.inputs.platform-choice}}"]'
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
needs: [v, platform-cache, reuse-build, build-base]
|
||||
if: always() && (needs.build-base.result == 'success' || needs.reuse-build.result == 'success')
|
||||
runs-on: ["Leap-Perf-Ubuntu-22-16x64x600"]
|
||||
container:
|
||||
image: ${{fromJSON(needs.platform-cache.outputs.platforms)[github.event.inputs.platform-choice].image}}
|
||||
steps:
|
||||
- name: Download builddir
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{github.event.inputs.platform-choice}}-build
|
||||
- name: Extract Build Directory
|
||||
run: |
|
||||
zstdcat build.tar.zst | tar x
|
||||
- if: ${{ needs.v.outputs.leap-target != 'DEFAULT' }}
|
||||
name: Download Prev Leap Version
|
||||
uses: AntelopeIO/asset-artifact-download-action@v3
|
||||
with:
|
||||
owner: AntelopeIO
|
||||
repo: leap
|
||||
target: '${{needs.v.outputs.leap-target}}'
|
||||
prereleases: ${{fromJSON(needs.v.outputs.leap-prerelease)}}
|
||||
file: 'leap.*${{github.event.inputs.platform-choice}}.*(x86_64|amd64).deb'
|
||||
- if: ${{ needs.v.outputs.leap-target != 'DEFAULT' }}
|
||||
name: Install leap & replace binaries for PH use
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y ./leap*.deb
|
||||
rm build/bin/nodeos
|
||||
rm build/bin/cleos
|
||||
cp /usr/bin/nodeos build/bin
|
||||
cp /usr/bin/cleos build/bin
|
||||
./build/bin/nodeos --full-version
|
||||
./build/bin/cleos version full
|
||||
- name: Run Performance Test
|
||||
run: |
|
||||
cd build
|
||||
./tests/PerformanceHarnessScenarioRunner.py ${{needs.v.outputs.test-params}}
|
||||
- name: Prepare results
|
||||
id: prep-results
|
||||
run: |
|
||||
tar -pc build/PHSRLogs | zstd --long -T0 -9 > PHSRLogs.tar.zst
|
||||
- name: Upload results
|
||||
uses: AntelopeIO/upload-artifact-large-chunks-action@v1
|
||||
with:
|
||||
name: performance-test-results
|
||||
path: PHSRLogs.tar.zst
|
||||
- name: Upload report
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: performance-test-report
|
||||
path: ./build/PHSRLogs/**/report.json
|
||||
@@ -1,83 +0,0 @@
|
||||
name: "Performance Harness Backwards Compatibility"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
packages: read
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
platform-cache:
|
||||
name: Platform Cache
|
||||
uses: AntelopeIO/platform-cache-workflow/.github/workflows/platformcache.yaml@v1
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
with:
|
||||
runs-on: '["self-hosted", "enf-x86-beefy"]'
|
||||
platform-files: .cicd/platforms
|
||||
|
||||
build-base:
|
||||
name: Run Build Workflow
|
||||
uses: ./.github/workflows/build_base.yaml
|
||||
needs: [platform-cache]
|
||||
with:
|
||||
platforms: ${{needs.platform-cache.outputs.platforms}}
|
||||
platform-list: ${{needs.platform-cache.outputs.platform-list}}
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
needs: [platform-cache, build-base]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ${{fromJSON(needs.platform-cache.outputs.platform-list)}}
|
||||
release: [3.1, 3.2, 4.0]
|
||||
runs-on: ["self-hosted", "enf-x86-lowtier"]
|
||||
container:
|
||||
image: ${{fromJSON(needs.platform-cache.outputs.platforms)[matrix.platform].image}}
|
||||
options: --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download builddir
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{matrix.platform}}-build
|
||||
- name: Extract Build Directory
|
||||
run: |
|
||||
zstdcat build.tar.zst | tar x
|
||||
- name: Download Prev Leap Version
|
||||
uses: AntelopeIO/asset-artifact-download-action@v3
|
||||
with:
|
||||
owner: AntelopeIO
|
||||
repo: leap
|
||||
file: '(leap).*${{matrix.platform}}.04.*(x86_64|amd64).deb'
|
||||
target: '${{matrix.release}}'
|
||||
- name: Install leap & replace binaries for PH use
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y ./leap*.deb
|
||||
rm build/bin/nodeos
|
||||
rm build/bin/cleos
|
||||
cp /usr/bin/nodeos build/bin
|
||||
cp /usr/bin/cleos build/bin
|
||||
./build/bin/nodeos --full-version
|
||||
./build/bin/cleos version full
|
||||
- if: ${{ matrix.release == '3.1' || matrix.release == '3.2' }}
|
||||
name: Run Performance Tests (<v4.0)
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure -R performance_test -E read_only --timeout 480
|
||||
- if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }}
|
||||
name: Run Performance Tests (>=v4.0)
|
||||
run: |
|
||||
cd build
|
||||
ctest --output-on-failure -R performance_test --timeout 480
|
||||
@@ -1,11 +0,0 @@
|
||||
name: "Pinned Build"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
dummy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dummy
|
||||
run: echo This workflow is a stub on main to allow it to be manually run on 3.x/4.0
|
||||
@@ -1,53 +0,0 @@
|
||||
name: Release Actions
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
eb:
|
||||
name: experimental-binaries
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
actions: read
|
||||
steps:
|
||||
- name: Get ubuntu20 leap-dev.deb
|
||||
uses: AntelopeIO/asset-artifact-download-action@v3
|
||||
with:
|
||||
owner: ${{github.repository_owner}}
|
||||
repo: ${{github.event.repository.name}}
|
||||
file: 'leap-dev.*amd64.deb'
|
||||
target: ${{github.sha}}
|
||||
artifact-name: leap-dev-ubuntu20-amd64
|
||||
wait-for-exact-target: true
|
||||
- name: Get ubuntu22 leap-dev.deb
|
||||
uses: AntelopeIO/asset-artifact-download-action@v3
|
||||
with:
|
||||
owner: ${{github.repository_owner}}
|
||||
repo: ${{github.event.repository.name}}
|
||||
file: 'leap-dev.*amd64.deb'
|
||||
target: ${{github.sha}}
|
||||
artifact-name: leap-dev-ubuntu22-amd64
|
||||
wait-for-exact-target: true
|
||||
- name: Create Dockerfile
|
||||
run: |
|
||||
cat <<EOF > Dockerfile
|
||||
FROM scratch
|
||||
LABEL org.opencontainers.image.description="A collection of experimental Leap binary packages"
|
||||
COPY *.deb /
|
||||
EOF
|
||||
- name: Login to ghcr
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{github.repository_owner}}
|
||||
password: ${{github.token}}
|
||||
- run: echo "REPOSITORY_OWNER_LOWER=${GITHUB_REPOSITORY_OWNER,,}" >> "${GITHUB_ENV}"
|
||||
- name: Build and push experimental-binaries
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
push: true
|
||||
tags: ghcr.io/${{env.REPOSITORY_OWNER_LOWER}}/experimental-binaries:${{github.ref_name}}
|
||||
context: .
|
||||
@@ -1,108 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# debian:buster on Sep 20 2023
|
||||
FROM debian@sha256:d774a984460a74973e6ce4d1f87ab90f2818e41fcdd4802bcbdc4e0b67f9dadf AS builder
|
||||
|
||||
# If enabling the snapshot repo below, this ought to be after the base image time from above.
|
||||
# date -u -d @1695620708 = Mon Sep 25 05:45:08 AM UTC 2023
|
||||
ENV SOURCE_DATE_EPOCH=1695620708
|
||||
|
||||
# The snapshot repo is currently disabled due to poor performance. Re-eval in the future.
|
||||
# When the package repo is signed, a message in the payload indicates the time when the repo becomes stale. This protection
|
||||
# nominally exists to ensure older versions of the package repo which may contain defective packages aren't served in the far
|
||||
# future. But in our case, we want this pinned package repo at any future date. So [check-valid-until=no] to disable this check.
|
||||
##RUN <<EOF
|
||||
##cat <<EOS > /etc/apt/sources.list
|
||||
##deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/$(date -d @${SOURCE_DATE_EPOCH} +%Y%m%dT%H%M%SZ)/ buster main
|
||||
##deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/$(date -d @${SOURCE_DATE_EPOCH} +%Y%m%dT%H%M%SZ)/ buster/updates main
|
||||
##EOS
|
||||
##EOF
|
||||
|
||||
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential \
|
||||
file \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
ninja-build \
|
||||
python3 \
|
||||
zlib1g-dev \
|
||||
zstd \
|
||||
;
|
||||
|
||||
ARG _LEAP_CLANG_VERSION=17.0.2
|
||||
ARG _LEAP_LLVM_VERSION=11.1.0
|
||||
ARG _LEAP_CMAKE_VERSION=3.27.6
|
||||
|
||||
ADD https://github.com/llvm/llvm-project/releases/download/llvmorg-${_LEAP_CLANG_VERSION}/llvm-project-${_LEAP_CLANG_VERSION}.src.tar.xz \
|
||||
https://github.com/llvm/llvm-project/releases/download/llvmorg-${_LEAP_CLANG_VERSION}/llvm-project-${_LEAP_CLANG_VERSION}.src.tar.xz.sig \
|
||||
https://github.com/llvm/llvm-project/releases/download/llvmorg-${_LEAP_LLVM_VERSION}/llvm-project-${_LEAP_LLVM_VERSION}.src.tar.xz \
|
||||
https://github.com/llvm/llvm-project/releases/download/llvmorg-${_LEAP_LLVM_VERSION}/llvm-project-${_LEAP_LLVM_VERSION}.src.tar.xz.sig \
|
||||
https://github.com/Kitware/CMake/releases/download/v${_LEAP_CMAKE_VERSION}/cmake-${_LEAP_CMAKE_VERSION}.tar.gz \
|
||||
https://github.com/Kitware/CMake/releases/download/v${_LEAP_CMAKE_VERSION}/cmake-${_LEAP_CMAKE_VERSION}-SHA-256.txt \
|
||||
https://github.com/Kitware/CMake/releases/download/v${_LEAP_CMAKE_VERSION}/cmake-${_LEAP_CMAKE_VERSION}-SHA-256.txt.asc \
|
||||
/
|
||||
|
||||
# CBA23971357C2E6590D9EFD3EC8FEF3A7BFB4EDA - Brad King <brad.king@kitware.com> (cmake)
|
||||
# 474E22316ABF4785A88C6E8EA2C794A986419D8A - Tom Stellard <tstellar@redhat.com> (llvm)
|
||||
# D574BD5D1D0E98895E3BF90044F2485E45D59042 - Tobias Hieta <tobias@hieta.se> (llvm)
|
||||
|
||||
RUN gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys CBA23971357C2E6590D9EFD3EC8FEF3A7BFB4EDA \
|
||||
474E22316ABF4785A88C6E8EA2C794A986419D8A \
|
||||
D574BD5D1D0E98895E3BF90044F2485E45D59042
|
||||
|
||||
RUN ls *.sig *.asc | xargs -n 1 gpg --verify && \
|
||||
sha256sum -c --ignore-missing cmake-*-SHA-256.txt
|
||||
|
||||
RUN tar xf cmake-*.tar.gz && \
|
||||
cd cmake*[0-9] && \
|
||||
echo 'set(CMAKE_USE_OPENSSL OFF CACHE BOOL "" FORCE)' > leap-init.cmake && \
|
||||
./bootstrap --parallel=$(nproc) --init=leap-init.cmake --generator=Ninja && \
|
||||
ninja install
|
||||
|
||||
RUN tar xf llvm-project-${_LEAP_CLANG_VERSION}.src.tar.xz && \
|
||||
cmake -S llvm-project-${_LEAP_CLANG_VERSION}.src/llvm -B build-toolchain -GNinja -DLLVM_INCLUDE_DOCS=Off -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/pinnedtoolchain \
|
||||
-DCOMPILER_RT_BUILD_SANITIZERS=Off \
|
||||
-DLLVM_ENABLE_PROJECTS='lld;clang;clang-tools-extra' \
|
||||
-DLLVM_ENABLE_RUNTIMES='compiler-rt;libc;libcxx;libcxxabi;libunwind' && \
|
||||
cmake --build build-toolchain -t install
|
||||
|
||||
COPY <<-"EOF" /pinnedtoolchain/pinnedtoolchain.cmake
|
||||
set(CMAKE_C_COMPILER ${CMAKE_CURRENT_LIST_DIR}/bin/clang)
|
||||
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_LIST_DIR}/bin/clang++)
|
||||
|
||||
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/include/c++/v1 ${CMAKE_CURRENT_LIST_DIR}/include/x86_64-unknown-linux-gnu/c++/v1 /usr/local/include /usr/include)
|
||||
|
||||
set(CMAKE_C_FLAGS_INIT "-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie -pthread")
|
||||
set(CMAKE_CXX_FLAGS_INIT "-nostdinc++ -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie -pthread")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++ -pie -pthread -Wl,-z,relro,-z,now")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-stdlib=libc++ -nostdlib++")
|
||||
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/x86_64-unknown-linux-gnu/libc++.a ${CMAKE_CURRENT_LIST_DIR}/lib/x86_64-unknown-linux-gnu/libc++abi.a")
|
||||
|
||||
set(CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/pinllvm")
|
||||
EOF
|
||||
ENV CMAKE_TOOLCHAIN_FILE=/pinnedtoolchain/pinnedtoolchain.cmake
|
||||
|
||||
RUN tar xf llvm-project-${_LEAP_LLVM_VERSION}.src.tar.xz && \
|
||||
cmake -S llvm-project-${_LEAP_LLVM_VERSION}.src/llvm -B build-pinllvm -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=Off \
|
||||
-DLLVM_ENABLE_RTTI=On -DLLVM_ENABLE_TERMINFO=Off -DLLVM_ENABLE_PIC=Off \
|
||||
-DCMAKE_INSTALL_PREFIX=/pinnedtoolchain/pinllvm && \
|
||||
cmake --build build-pinllvm -t install
|
||||
|
||||
RUN rm -rf llvm* build* cmake*
|
||||
|
||||
FROM builder AS build
|
||||
|
||||
ARG LEAP_BUILD_JOBS
|
||||
|
||||
# Yuck: This places the source at the same location as leap's CI (build.yaml, build_base.yaml). Unfortunately this location only matches
|
||||
# when build.yaml etc are being run from a repository named leap.
|
||||
COPY / /__w/leap/leap
|
||||
RUN cmake -S /__w/leap/leap -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -GNinja && \
|
||||
cmake --build build -t package -- ${LEAP_BUILD_JOBS:+-j$LEAP_BUILD_JOBS} && \
|
||||
/__w/leap/leap/tools/tweak-deb.sh build/leap_*.deb
|
||||
|
||||
FROM scratch AS exporter
|
||||
COPY --from=build /build/*.deb /build/*.tar.* /
|
||||
Reference in New Issue
Block a user