mirror of
https://github.com/italicsjenga/ash-molten.git
synced 2024-12-23 13:21:30 +11:00
Faster CI by running pre-built test separately (#34)
This commit is contained in:
parent
ba18db6a82
commit
2ba14801cd
22
.github/workflows/ci.yaml
vendored
22
.github/workflows/ci.yaml
vendored
|
@ -12,20 +12,14 @@ jobs:
|
|||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# make sure all code has been formatted with rustfmt
|
||||
- run: rustup component add rustfmt
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check --color always
|
||||
|
||||
# run clippy to verify we have no warnings
|
||||
- run: rustup component add clippy
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: -- -D warnings
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
|
@ -37,8 +31,8 @@ jobs:
|
|||
- uses: actions/checkout@v1
|
||||
- uses: EmbarkStudios/cargo-deny-action@v1
|
||||
|
||||
test:
|
||||
name: Test
|
||||
test-source:
|
||||
name: Test (source build)
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_12.1.app
|
||||
|
@ -51,6 +45,18 @@ jobs:
|
|||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
|
||||
test:
|
||||
name: Test (pre-built)
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_12.1.app
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
|
|
5
build.rs
5
build.rs
|
@ -116,6 +116,8 @@ mod mac {
|
|||
|
||||
std::fs::create_dir_all(&target_dir).expect("Couldn't create directory");
|
||||
|
||||
let previous_path = std::env::current_dir().expect("Couldn't get current directory");
|
||||
|
||||
std::env::set_current_dir(&target_dir).expect("Couldn't change current directory");
|
||||
|
||||
let curl = Command::new("curl")
|
||||
|
@ -184,6 +186,8 @@ mod mac {
|
|||
assert!(status.success());
|
||||
}
|
||||
}
|
||||
|
||||
std::env::set_current_dir(&previous_path).expect("Couldn't change current directory");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +244,6 @@ fn main() {
|
|||
|
||||
pb
|
||||
};
|
||||
|
||||
println!("cargo:rustc-link-search=native={}", project_dir.display());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue