Fixup Rust CI

This commit is contained in:
lazymio 2021-11-09 00:58:13 +01:00
parent 87ece24160
commit ec02eccb85
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873
2 changed files with 8 additions and 3 deletions

View File

@ -70,7 +70,7 @@ jobs:
- name: '🚧 Cargo test'
if: "!startsWith(github.ref, 'refs/tags')"
env:
UNICORN_VERSION: dev
CI: ci
run: |
cd bindings/rust && cargo test
@ -78,6 +78,6 @@ jobs:
if: startsWith(github.ref, 'refs/tags') && contains(matrix.config.os, 'ubuntu')
env:
TOKEN: ${{ secrets.cratesio_token }}
UNICORN_VERSION: dev
CI: ci
run: |
cd bindings/rust && cargo login $TOKEN && cargo test && cargo publish

View File

@ -52,7 +52,12 @@ fn download_unicorn() -> Option<String> {
fn main() {
let profile = env::var("PROFILE").unwrap();
let unicorn_dir = download_unicorn().unwrap();
let unicorn_dir;
if let Result::Ok(_) = env::var("CI") {
unicorn_dir = format!("../..");
} else {
unicorn_dir = download_unicorn().unwrap();
}
println!("cargo:rerun-if-changed={}", &unicorn_dir);