Cross compile for ARMv7, Aarch64 and RISC-V 64
Adds CI cross-compilation tests for those architectures. Requires the host to be able to run thos binaries via binfmt. See: https://docs.kernel.org/admin-guide/binfmt-misc.html
This commit is contained in:
parent
391d695144
commit
42feb53c86
@ -55,3 +55,24 @@ build:compilers:
|
||||
- nix
|
||||
script:
|
||||
- nix build -L --no-link .#ovniPackages.compilers
|
||||
|
||||
build:armv7:
|
||||
stage: build
|
||||
tags:
|
||||
- nix
|
||||
script:
|
||||
- nix build -L --no-link .#ovniPackages.armv7
|
||||
|
||||
build:aarch64:
|
||||
stage: build
|
||||
tags:
|
||||
- nix
|
||||
script:
|
||||
- nix build -L --no-link .#ovniPackages.aarch64
|
||||
|
||||
build:riscv64:
|
||||
stage: build
|
||||
tags:
|
||||
- nix
|
||||
script:
|
||||
- nix build -L --no-link .#ovniPackages.riscv64
|
||||
|
27
flake.nix
27
flake.nix
@ -135,6 +135,33 @@
|
||||
export ASAN_OPTIONS=detect_leaks=0
|
||||
'';
|
||||
});
|
||||
|
||||
armv7 = (pkgs.pkgsCross.armv7l-hf-multiplatform.ovniLocal.overrideAttrs (old: {
|
||||
pname = "ovni-armv7";
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [ pkgs.pkgsCross.armv7l-hf-multiplatform.buildPackages.cmake ];
|
||||
cmakeFlags = old.cmakeFlags ++ [ "-DUSE_MPI=OFF" ];
|
||||
})).overrideDerivation (old: {
|
||||
doCheck = true;
|
||||
});
|
||||
|
||||
aarch64 = (pkgs.pkgsCross.aarch64-multiplatform.ovniLocal.overrideAttrs (old: {
|
||||
pname = "ovni-aarch64";
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [ pkgs.pkgsCross.aarch64-multiplatform.buildPackages.cmake ];
|
||||
cmakeFlags = old.cmakeFlags ++ [ "-DUSE_MPI=OFF" ];
|
||||
})).overrideDerivation (old: {
|
||||
doCheck = true;
|
||||
});
|
||||
|
||||
riscv64 = (pkgs.pkgsCross.riscv64.ovniLocal.overrideAttrs (old: {
|
||||
pname = "ovni-riscv64";
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [ pkgs.pkgsCross.riscv64.buildPackages.cmake ];
|
||||
cmakeFlags = old.cmakeFlags ++ [ "-DUSE_MPI=OFF" ];
|
||||
})).overrideDerivation (old: {
|
||||
doCheck = true;
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user