From 2f0009751b3b15825c9bc49653146fa9eda45cbb Mon Sep 17 00:00:00 2001 From: ko1N Date: Fri, 1 Jan 2021 02:54:07 +0100 Subject: [PATCH] Added manual llvm installation on windows --- .github/workflows/build.yml | 31 +++---------------------------- leechcore-sys/build.rs | 4 ++-- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a93bdf..e3aeba0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,9 +14,9 @@ jobs: with: submodules: 'true' - name: install libclang - uses: crazy-max/ghaction-chocolatey@v1 - with: - args: install llvm + run: | + curl -Ls -o "LLVM-10.0.0-win64.exe" "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe" + LLVM-10.0.0-win64.exe /S - name: build run: cargo build --workspace --verbose - name: run tests @@ -68,28 +68,3 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-targets - - build-coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: 'true' - - name: install libusb-1.0 - run: sudo apt-get install libusb-1.0-0-dev - - name: setup rust nightly - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - - run: cargo install grcov - - name: run tests with coverage - run: | - export CARGO_INCREMENTAL=0 - export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" - export RUSTDOCFLAGS="-Cpanic=abort" - cargo build --workspace --exclude memflow-derive - cargo test --workspace --exclude memflow-derive - grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing -o ./target/debug/coverage - bash <(curl -s https://codecov.io/bash) -f ./target/debug/coverage -t ${{ secrets.CODECOV_TOKEN }}; diff --git a/leechcore-sys/build.rs b/leechcore-sys/build.rs index 8465fe2..3ee2e5b 100644 --- a/leechcore-sys/build.rs +++ b/leechcore-sys/build.rs @@ -64,7 +64,7 @@ fn build_leechcore(target: &str) { for flag in String::from_utf8_lossy(&libusb_flags.stdout) .trim() - .split(" ") + .split(' ') { cfg.flag(flag); } @@ -91,7 +91,7 @@ fn build_leechcore(target: &str) { println!("cargo:rustc-link-lib=static=leechcore"); } -fn main() -> () { +fn main() { let target = env::var("TARGET").unwrap(); let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());