mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-17 12:53:07 +00:00
Merge branch 'master' into chore/remove-unused-modules
This commit is contained in:
commit
7c6cc5aa93
51
ci/linux.Jenkinsfile
Normal file
51
ci/linux.Jenkinsfile
Normal file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.37'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
label 'linuxcontainer'
|
||||
image 'harbor.status.im/infra/ci-build-containers:linux-base-1.0.0'
|
||||
args '--volume=/nix:/nix ' +
|
||||
'--volume=/etc/nix:/etc/nix '
|
||||
}
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
disableConcurrentBuilds()
|
||||
disableRestartFromStage()
|
||||
/* manage how many builds we keep */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
daysToKeepStr: '30',
|
||||
))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
nix.flake("default")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Check') {
|
||||
steps {
|
||||
script {
|
||||
sh './result/bin/storage --version'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
cleanup {
|
||||
cleanWs()
|
||||
dir(env.WORKSPACE_TMP) { deleteDir() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.37'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.24' }
|
||||
agent { label 'macos && aarch64 && nix' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
ansiColor('xterm')
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
disableConcurrentBuilds()
|
||||
disableRestartFromStage()
|
||||
/* manage how many builds we keep */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
@ -32,6 +36,9 @@ pipeline {
|
||||
}
|
||||
|
||||
post {
|
||||
cleanup { cleanWs() }
|
||||
cleanup {
|
||||
cleanWs()
|
||||
dir(env.WORKSPACE_TMP) { deleteDir() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -21,13 +21,16 @@ assert pkgs.lib.assertMsg ((src.submodules or true) == true)
|
||||
"Unable to build without submodules. Append '?submodules=1#' to the URI.";
|
||||
|
||||
let
|
||||
inherit (pkgs) stdenv lib writeScriptBin callPackage;
|
||||
inherit (pkgs) lib writeScriptBin callPackage;
|
||||
|
||||
revision = lib.substring 0 8 (src.rev or "dirty");
|
||||
|
||||
tools = callPackage ./tools.nix {};
|
||||
in pkgs.gcc13Stdenv.mkDerivation rec {
|
||||
|
||||
# Pin GCC/CLang versions
|
||||
stdenv = if pkgs.stdenv.isLinux then pkgs.gcc13Stdenv else pkgs.clang16Stdenv;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "storage";
|
||||
|
||||
version = "${tools.findKeyValue "version = \"([0-9]+\.[0-9]+\.[0-9]+)\"" ../codex.nimble}-${revision}";
|
||||
@ -46,14 +49,16 @@ in pkgs.gcc13Stdenv.mkDerivation rec {
|
||||
fakeGit = writeScriptBin "git" "echo ${version}";
|
||||
# Fix for the nim-circom-compat-ffi package that is built with cargo.
|
||||
fakeCargo = writeScriptBin "cargo" "echo ${version}";
|
||||
in
|
||||
with pkgs; [
|
||||
cmake
|
||||
which
|
||||
lsb-release
|
||||
circomCompatPkg
|
||||
fakeGit
|
||||
fakeCargo
|
||||
in with pkgs; [
|
||||
cmake
|
||||
which
|
||||
circomCompatPkg
|
||||
fakeGit
|
||||
fakeCargo
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
lsb-release
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.cctools
|
||||
];
|
||||
|
||||
# Disable CPU optimizations that make binary not portable.
|
||||
@ -67,6 +72,12 @@ in pkgs.gcc13Stdenv.mkDerivation rec {
|
||||
"QUICK_AND_DIRTY_NIMBLE=${if quickAndDirty then "1" else "0"}"
|
||||
];
|
||||
|
||||
# FIXME: Remove once permanent fix is applied to NBS:
|
||||
patchPhase = ''
|
||||
substituteInPlace vendor/nimbus-build-system/scripts/build_nim.sh \
|
||||
--replace-fail '"''${NIX_BUILD_TOP}" != "/build"' '-z $${NIX_BUILD_TOP}'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
patchShebangs . vendor/nimbus-build-system > /dev/null
|
||||
make nimbus-build-system-paths
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user