From b07c21bf31da327f6492204ab4ef4ad129699c82 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Wed, 21 Dec 2022 17:21:35 +0100 Subject: [PATCH] CI: Move native-dispatcher tests to Linux --- .circleci/config.yml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 88c13e00db..92a98bfb93 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,6 +83,34 @@ commands: glean_parser coverage --allow-reserved -c glean_coverage.txt -f codecovio -o codecov.json glean-core/metrics.yaml bin/codecov.sh -X yaml -f codecov.json + test-rust-native-dispatcher: + steps: + - run: + name: Install required dependencies + command: | + sudo apt update + sudo apt install -y cmake ninja-build clang + - run: + name: Install libdispatch + command: | + cd ~ + git clone https://github.com/apple/swift-corelibs-libdispatch + cd swift-corelibs-libdispatch + mkdir build && cd build + cmake -G Ninja \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=On \ + .. + ninja + sudo ninja install + + - run: + name: Run Rust tests with native dispatcher + command: | + export LD_LIBRARY_PATH=/usr/local/lib + cargo test --verbose --jobs 6 --features native-dispatcher -- --nocapture + install-rustup: steps: - run: @@ -324,6 +352,7 @@ jobs: resource_class: "medium+" steps: - test-rust + - test-rust-native-dispatcher Rust tests - beta: docker: @@ -529,12 +558,6 @@ jobs: keys: - v2-cargo-cache-{{arch}}-{{checksum "buildtype.txt"}}-{{checksum "Cargo.lock"}} - # Experimental - we might move this to Linux with an appropriate libdispatch later - - run: - name: Run Rust tests with native dispatcher - command: | - cargo test --verbose --jobs 6 --features native-dispatcher -- --nocapture - - run: name: Run iOS build command: bash bin/run-ios-build.sh