@ -26,6 +26,15 @@ const FAST_MATRIX = [
} ,
] ;
// Returns whether the given package supports a 32-bit architecture, used when
// testing on i686 and armv7 below.
function supports32Bit ( pkg ) {
if ( pkg . indexOf ( "pulley" ) !== - 1 )
return true ;
return pkg == 'wasmtime-fiber' ;
}
// This is the full, unsharded, and unfiltered matrix of what we test on
// CI. This includes a number of platforms and a number of cross-compiled
// targets that are emulated with QEMU. This must be kept tightly in sync with
@ -123,16 +132,15 @@ const FULL_MATRIX = [
"isa" : "riscv64" ,
} ,
{
"name" : "Test Pulley on i686-unknown-linux-gnu" ,
"name" : "Tests on i686-unknown-linux-gnu" ,
"32-bit" : true ,
"os" : "ubuntu-latest" ,
"target" : "i686-unknown-linux-gnu" ,
"gcc_package" : "gcc-i686-linux-gnu" ,
"gcc" : "i686-linux-gnu-gcc" ,
"filter" : "pulley" ,
} ,
{
"name" : "Test Pulley on armv7-unknown-linux-gnueabihf" ,
"name" : "Tests on armv7-unknown-linux-gnueabihf" ,
"32-bit" : true ,
"os" : "ubuntu-latest" ,
"target" : "armv7-unknown-linux-gnueabihf" ,
@ -140,7 +148,6 @@ const FULL_MATRIX = [
"gcc" : "arm-linux-gnueabihf-gcc" ,
"qemu" : "qemu-arm -L /usr/arm-linux-gnueabihf -E LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib" ,
"qemu_target" : "arm-linux-user" ,
"filter" : "pulley" ,
} ,
] ;
@ -218,14 +225,16 @@ async function shard(configs) {
// created above.
const sharded = [ ] ;
for ( const config of configs ) {
// Special case 32-bit configs. Only Pulley runs on 32-bit targets.
// Special case 32-bit configs. Only some crates, according to
// `supports32Bit`, run on this target. At this time the set of supported
// crates is small enough that they're not sharded.
if ( config [ "32-bit" ] === true ) {
sharded . push ( Object . assign (
{ } ,
config ,
{
bucket : members
. map ( c => c . indexOf ( "pulley" ) !== - 1 ? ` --package ${ c } ` : ` --exclude ${ c } ` )
. map ( c => supports32Bit ( c ) ? ` --package ${ c } ` : ` --exclude ${ c } ` )
. join ( " " ) ,
}
) ) ;
@ -290,9 +299,14 @@ async function main() {
return true ;
}
// If any Pulley source file was modified, then run Pulley-specific configs.
if ( names . includes ( "pulley" ) && config . filter == "pulley" ) {
return true ;
// For matrix entries that represent 32-bit only some crates support that,
// so whenever the crates are changed be sure to run 32-bit tests on PRs
// too.
if ( config [ "32-bit" ] === true ) {
if ( names . includes ( "pulley" ) )
return true ;
if ( names . includes ( "fiber" ) )
return true ;
}
// If the commit explicitly asks for this test config, then include it.