Skip to content

Commit 64429ae

Browse files
committed
ci: build full regression prerequisites
1 parent c38c74d commit 64429ae

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/build-ssdb.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
type: boolean
1717
default: false
1818
regression_suites:
19-
description: 'space-separated test.py regression suites to run after building'
19+
description: 'space-separated test.py regression selectors to run after building'
2020
type: string
2121
default: ''
2222
outputs:
@@ -75,6 +75,11 @@ jobs:
7575
nix develop .#cpp -c ./configure.py --mode ${{ inputs.build_mode }} "${artifacts[@]}" --no-seastar-unused-result-error
7676
- run: |
7777
nix develop .#cpp -c ninja build/${{ inputs.build_mode }}/scylla
78+
- name: Prepare regression build artifacts
79+
if: ${{ inputs.regression_suites != '' }}
80+
run: |
81+
nix develop .#cpp -c ninja wasm
82+
nix develop .#cpp -c patchelf --add-rpath "$PWD/build/${{ inputs.build_mode }}/seastar" build/${{ inputs.build_mode }}/scylla
7883
- name: Build inherited smoke tests
7984
if: ${{ inputs.run_smoke_tests }}
8085
run: |

configure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,11 +1976,11 @@ def write_build_file(f,
19761976
rule cxxbridge_header
19771977
command = cxxbridge --header > $out
19781978
rule c2wasm
1979-
command = clang --target=wasm32 --no-standard-libraries -Wl,--export-all -Wl,--no-entry $in -o $out
1979+
command = clang-wasm --target=wasm32 --no-standard-libraries -Wl,--export-all -Wl,--no-entry $in -o $out
19801980
description = C2WASM $out
19811981
rule rust2wasm
1982-
command = cargo build --target=wasm32-wasi --example=$example --locked --manifest-path=test/resource/wasm/rust/Cargo.toml --target-dir=$builddir/wasm/ $
1983-
&& wasm-opt -Oz $builddir/wasm/wasm32-wasi/debug/examples/$example.wasm -o $builddir/wasm/$example.wasm $
1982+
command = cargo build --target=wasm32-unknown-unknown --example=$example --locked --manifest-path=test/resource/wasm/rust/Cargo.toml --target-dir=$builddir/wasm/ $
1983+
&& wasm-opt -Oz $builddir/wasm/wasm32-unknown-unknown/debug/examples/$example.wasm -o $builddir/wasm/$example.wasm $
19841984
&& wasm-strip $builddir/wasm/$example.wasm
19851985
description = RUST2WASM $out
19861986
rule wasm2wat

default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ let
5151
boost = pkgs.boost175;
5252

5353
llvm = pkgs.llvmPackages_15;
54+
clangWasm = pkgs.writeShellScriptBin "clang-wasm" ''
55+
exec ${llvm.clang-unwrapped}/bin/clang "$@"
56+
'';
5457

5558
stdenvUnwrapped = llvm.stdenv;
5659

@@ -86,8 +89,10 @@ in derive ({
8689
antlr3Package
8790
] ++ (with pkgs; [
8891
ant
92+
binaryen
8993
boost
9094
cargo
95+
clangWasm
9196
cmake
9297
cxx-rs
9398
file
@@ -104,6 +109,7 @@ in derive ({
104109
ragel
105110
rustc
106111
stow
112+
wabt
107113
]) ++ (devInputs { inherit pkgs llvm; });
108114

109115
buildInputs = [

flake.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838

3939
lib = pkgs.lib;
4040
llvm = pkgs.llvmPackages;
41+
clangWasm = pkgs.writeShellScriptBin "clang-wasm" ''
42+
exec ${llvm.clang-unwrapped}/bin/clang "$@"
43+
'';
4144

4245
antlr3Cpp = pkgs.runCommand "antlr-3.5.2-ssdb" { } ''
4346
mkdir -p "$out"
@@ -89,6 +92,8 @@
8992
++ pythonTools
9093
++ (with pkgs; [
9194
antlr3_4
95+
binaryen
96+
clangWasm
9297
file
9398
git
9499
jdk11_headless
@@ -139,6 +144,9 @@
139144
doxygen
140145
rapidxml
141146
colordiff
147+
binaryen
148+
clangWasm
149+
patchelf
142150
wabt
143151
];
144152
}

0 commit comments

Comments
 (0)