From f479d7316ea71fdbd084bf6d1cee15e0006d6b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Tue, 30 Jun 2020 15:01:51 +0200 Subject: [PATCH] Try fixing LLVM issues on OSX (Also, get a decent grep) --- .travis.yml | 5 +++-- .travis/osx_script.sh | 5 +++-- tcod_sys/lib.rs | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 612fdf915..9570f4d46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,11 @@ install: - 'if [[ -f ".travis/${TRAVIS_OS_NAME}_install.sh" ]]; then . .travis/${TRAVIS_OS_NAME}_install.sh; fi' script: - 'if [[ -f ".travis/${TRAVIS_OS_NAME}_script.sh" ]]; then . .travis/${TRAVIS_OS_NAME}_script.sh; fi' -- export DEFAULT_TARGET=$(rustup show | grep default | grep -Po "^[^-]+-\K\S+") +- [ "$TRAVIS_OS_NAME" = linux ] && export GREP=grep || export GREP=ggrep +- export DEFAULT_TARGET=$(rustup show | grep default | $GREP -Po "^[^-]+-\K\S+") - pushd tcod_sys; cargo build --features generate_bindings; popd - 'export BINDINGS_FILE=${DEFAULT_TARGET}_bindings.rs; echo "$BINDINGS_FILE download:"' -- curl -F "file=@./tcod_sys/${BINDINGS_FILE}" https://file.io/ | grep -Po '"link":"\K[^"]+' +- curl -F "file=@./tcod_sys/${BINDINGS_FILE}" https://file.io/ | $GREP -Po '"link":"\K[^"]+' - cargo build --verbose - cargo test --verbose - cargo test --features "rustc-serialize serde" --verbose diff --git a/.travis/osx_script.sh b/.travis/osx_script.sh index 6e4b441f8..640af7448 100644 --- a/.travis/osx_script.sh +++ b/.travis/osx_script.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash -export PATH="/usr/local/opt/llvm/bin:$PATH" -export LIBCLANG_PATH="/usr/local/opt/llvm/bin" +export PATH="$(brew --prefix llvm)/bin:$PATH" +export LIBCLANG_PATH="$(brew --prefix llvm)/lib" + diff --git a/tcod_sys/lib.rs b/tcod_sys/lib.rs index 3adf19e3e..3a67723bf 100644 --- a/tcod_sys/lib.rs +++ b/tcod_sys/lib.rs @@ -1,4 +1,5 @@ #![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] #![allow(clippy::missing_safety_doc, clippy::redundant_static_lifetimes)] +#![allow(improper_ctypes)] include!(concat!("./", env!("BINDINGS_TARGET"), "_bindings.rs"));