mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-14 20:22:19 +00:00
Make execution of tests in Nix builds optional (#873)
This commit is contained in:
parent
2e231ec2ff
commit
9f1b370f2c
9 changed files with 69 additions and 19 deletions
2
.github/workflows/ton-x86-64-linux.yml
vendored
2
.github/workflows/ton-x86-64-linux.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp assembly/nix/build-linux-x86-64-nix.sh .
|
cp assembly/nix/build-linux-x86-64-nix.sh .
|
||||||
chmod +x build-linux-x86-64-nix.sh
|
chmod +x build-linux-x86-64-nix.sh
|
||||||
./build-linux-x86-64-nix.sh
|
./build-linux-x86-64-nix.sh -t
|
||||||
|
|
||||||
- name: Simple binaries test
|
- name: Simple binaries test
|
||||||
run: |
|
run: |
|
||||||
|
|
2
.github/workflows/ton-x86-64-macos.yml
vendored
2
.github/workflows/ton-x86-64-macos.yml
vendored
|
@ -20,7 +20,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp assembly/nix/build-macos-nix.sh .
|
cp assembly/nix/build-macos-nix.sh .
|
||||||
chmod +x build-macos-nix.sh
|
chmod +x build-macos-nix.sh
|
||||||
./build-macos-nix.sh
|
./build-macos-nix.sh -t
|
||||||
|
|
||||||
- name: Simple binaries test
|
- name: Simple binaries test
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -31,7 +31,7 @@ pipeline {
|
||||||
sh '''
|
sh '''
|
||||||
cp assembly/nix/build-linux-x86-64-nix.sh .
|
cp assembly/nix/build-linux-x86-64-nix.sh .
|
||||||
chmod +x build-linux-x86-64-nix.sh
|
chmod +x build-linux-x86-64-nix.sh
|
||||||
./build-linux-x86-64-nix.sh
|
./build-linux-x86-64-nix.sh -t
|
||||||
'''
|
'''
|
||||||
sh '''
|
sh '''
|
||||||
cd artifacts
|
cd artifacts
|
||||||
|
@ -69,7 +69,7 @@ pipeline {
|
||||||
sh '''
|
sh '''
|
||||||
cp assembly/nix/build-linux-arm64-nix.sh .
|
cp assembly/nix/build-linux-arm64-nix.sh .
|
||||||
chmod +x build-linux-arm64-nix.sh
|
chmod +x build-linux-arm64-nix.sh
|
||||||
./build-linux-arm64-nix.sh
|
./build-linux-arm64-nix.sh -t
|
||||||
'''
|
'''
|
||||||
sh '''
|
sh '''
|
||||||
cd artifacts
|
cd artifacts
|
||||||
|
@ -107,7 +107,7 @@ pipeline {
|
||||||
sh '''
|
sh '''
|
||||||
cp assembly/nix/build-macos-nix.sh .
|
cp assembly/nix/build-macos-nix.sh .
|
||||||
chmod +x build-macos-nix.sh
|
chmod +x build-macos-nix.sh
|
||||||
./build-macos-nix.sh
|
./build-macos-nix.sh -t
|
||||||
'''
|
'''
|
||||||
sh '''
|
sh '''
|
||||||
cd artifacts
|
cd artifacts
|
||||||
|
@ -145,7 +145,7 @@ pipeline {
|
||||||
sh '''
|
sh '''
|
||||||
cp assembly/nix/build-macos-nix.sh .
|
cp assembly/nix/build-macos-nix.sh .
|
||||||
chmod +x build-macos-nix.sh
|
chmod +x build-macos-nix.sh
|
||||||
./build-macos-nix.sh
|
./build-macos-nix.sh -t
|
||||||
'''
|
'''
|
||||||
sh '''
|
sh '''
|
||||||
cd artifacts
|
cd artifacts
|
||||||
|
|
|
@ -3,12 +3,27 @@
|
||||||
nix-build --version
|
nix-build --version
|
||||||
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
|
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
|
||||||
|
|
||||||
|
with_tests=false
|
||||||
|
|
||||||
|
|
||||||
|
while getopts 't' flag; do
|
||||||
|
case "${flag}" in
|
||||||
|
t) with_tests=true ;;
|
||||||
|
*) break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
cp assembly/nix/linux-arm64* .
|
cp assembly/nix/linux-arm64* .
|
||||||
cp assembly/nix/microhttpd.nix .
|
cp assembly/nix/microhttpd.nix .
|
||||||
cp assembly/nix/openssl.nix .
|
cp assembly/nix/openssl.nix .
|
||||||
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
|
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
|
||||||
|
|
||||||
nix-build linux-arm64-static.nix
|
if [ "$with_tests" = true ]; then
|
||||||
|
nix-build linux-arm64-static.nix --arg testing true
|
||||||
|
else
|
||||||
|
nix-build linux-arm64-static.nix
|
||||||
|
fi
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
cp ./result/bin/* artifacts/
|
cp ./result/bin/* artifacts/
|
||||||
chmod +x artifacts/*
|
chmod +x artifacts/*
|
||||||
|
|
|
@ -3,12 +3,28 @@
|
||||||
nix-build --version
|
nix-build --version
|
||||||
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
|
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
|
||||||
|
|
||||||
|
with_tests=false
|
||||||
|
|
||||||
|
|
||||||
|
while getopts 't' flag; do
|
||||||
|
case "${flag}" in
|
||||||
|
t) with_tests=true ;;
|
||||||
|
*) break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
cp assembly/nix/linux-x86-64* .
|
cp assembly/nix/linux-x86-64* .
|
||||||
cp assembly/nix/microhttpd.nix .
|
cp assembly/nix/microhttpd.nix .
|
||||||
cp assembly/nix/openssl.nix .
|
cp assembly/nix/openssl.nix .
|
||||||
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
|
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
|
||||||
|
|
||||||
nix-build linux-x86-64-static.nix
|
if [ "$with_tests" = true ]; then
|
||||||
|
nix-build linux-x86-64-static.nix --arg testing true
|
||||||
|
else
|
||||||
|
nix-build linux-x86-64-static.nix
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
cp ./result/bin/* artifacts/
|
cp ./result/bin/* artifacts/
|
||||||
chmod +x artifacts/*
|
chmod +x artifacts/*
|
||||||
|
|
|
@ -3,9 +3,25 @@
|
||||||
nix-build --version
|
nix-build --version
|
||||||
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
|
test $? -eq 0 || { echo "Nix is not installed!"; exit 1; }
|
||||||
|
|
||||||
|
with_tests=false
|
||||||
|
|
||||||
|
|
||||||
|
while getopts 't' flag; do
|
||||||
|
case "${flag}" in
|
||||||
|
t) with_tests=true ;;
|
||||||
|
*) break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
cp assembly/nix/macos-* .
|
cp assembly/nix/macos-* .
|
||||||
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
|
export NIX_PATH=nixpkgs=https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz
|
||||||
nix-build macos-static.nix
|
|
||||||
|
if [ "$with_tests" = true ]; then
|
||||||
|
nix-build macos-static.nix --arg testing true
|
||||||
|
else
|
||||||
|
nix-build macos-static.nix
|
||||||
|
fi
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
cp ./result-bin/bin/* artifacts/
|
cp ./result-bin/bin/* artifacts/
|
||||||
chmod +x artifacts/*
|
chmod +x artifacts/*
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
|
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
|
||||||
, lib ? pkgs.lib
|
, lib ? pkgs.lib
|
||||||
, stdenv ? pkgs.stdenv
|
, stdenv ? pkgs.stdenv
|
||||||
|
, testing ? false
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
microhttpdmy = (import ./microhttpd.nix) {};
|
microhttpdmy = (import ./microhttpd.nix) {};
|
||||||
|
@ -25,7 +26,7 @@ stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
makeStatic = true;
|
makeStatic = true;
|
||||||
doCheck = true;
|
doCheck = testing;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DTON_USE_ABSEIL=OFF"
|
"-DTON_USE_ABSEIL=OFF"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
|
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
|
||||||
, lib ? pkgs.lib
|
, lib ? pkgs.lib
|
||||||
, stdenv ? pkgs.stdenv
|
, stdenv ? pkgs.stdenv
|
||||||
|
, testing ? false
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
microhttpdmy = (import ./microhttpd.nix) {};
|
microhttpdmy = (import ./microhttpd.nix) {};
|
||||||
|
@ -25,7 +26,7 @@ stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
makeStatic = true;
|
makeStatic = true;
|
||||||
doCheck = true;
|
doCheck = testing;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DTON_USE_ABSEIL=OFF"
|
"-DTON_USE_ABSEIL=OFF"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
|
{ pkgs ? import <nixpkgs> { system = builtins.currentSystem; }
|
||||||
, lib ? pkgs.lib
|
, lib ? pkgs.lib
|
||||||
, stdenv ? pkgs.stdenv
|
, stdenv ? pkgs.stdenv
|
||||||
|
, testing ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
pkgs.llvmPackages_14.stdenv.mkDerivation {
|
pkgs.llvmPackages_14.stdenv.mkDerivation {
|
||||||
|
@ -29,7 +30,7 @@ pkgs.llvmPackages_14.stdenv.mkDerivation {
|
||||||
|
|
||||||
dontAddStaticConfigureFlags = true;
|
dontAddStaticConfigureFlags = true;
|
||||||
makeStatic = true;
|
makeStatic = true;
|
||||||
doCheck = true;
|
doCheck = testing;
|
||||||
|
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue