From ab2bb4184adbd77628a38de6dccf01a1fde029cb Mon Sep 17 00:00:00 2001 From: Amaury <1293565+amaury1729@users.noreply.github.com> Date: Sun, 10 Dec 2023 18:57:57 +0100 Subject: [PATCH] fix(ci): Fix Windows build (#1397) * fix(ci): Fix Windows build * fix? * fix? --- ci/build.ps1 | 9 ++++++--- ci/test.bash | 7 +++++-- worker/src/main.rs | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index 304e4063d..cce1d7770 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -2,9 +2,12 @@ $cross = $args[0] $target_triple = $args[1] $release_build = $args[2] +# reacher_worker doesn't compile on windows because of this bug: +# https://github.com/amqp-rs/reactor-trait/issues/1 +# So we only build the check_if_email_exists binary for Windows. if ( $release_build -ne "RELEASE" ) { - Invoke-Expression "$cross build --target $target_triple" - Invoke-Expression "$cross build --target $target_triple --all-features" + Invoke-Expression "$cross build --bin check_if_email_exists --target $target_triple" + Invoke-Expression "$cross build --bin check_if_email_exists --target $target_triple --all-features" } else { - Invoke-Expression "$cross build --target $target_triple --all-features --release" + Invoke-Expression "$cross build --bin check_if_email_exists --target $target_triple --all-features --release" } \ No newline at end of file diff --git a/ci/test.bash b/ci/test.bash index f85e24833..779dac55d 100755 --- a/ci/test.bash +++ b/ci/test.bash @@ -12,5 +12,8 @@ TARGET_TRIPLE=$2 required_arg $CROSS 'CROSS' required_arg $TARGET_TRIPLE '' -$CROSS test --target $TARGET_TRIPLE -$CROSS test --target $TARGET_TRIPLE --all-features +# reacher_worker doesn't compile on windows because of this bug: +# https://github.com/amqp-rs/reactor-trait/issues/1 +# So we only build the check_if_email_exists binary for Windows. +$CROSS test --bin check_if_email_exists --target $TARGET_TRIPLE +$CROSS test --bin check_if_email_exists --target $TARGET_TRIPLE --all-features diff --git a/worker/src/main.rs b/worker/src/main.rs index 9bf241d5e..133b12393 100644 --- a/worker/src/main.rs +++ b/worker/src/main.rs @@ -43,7 +43,7 @@ async fn main() -> Result<(), Box> { let options = ConnectionProperties::default() // Use tokio executor and reactor. - // At the moment the reactor is only available for unix. + // At the moment the reactor is only available for unix (ref: https://github.com/amqp-rs/reactor-trait/issues/1) .with_executor(tokio_executor_trait::Tokio::current()) .with_reactor(tokio_reactor_trait::Tokio) .with_connection_name(backend_name.clone().into());