mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-04-24 13:25:11 +02:00
print the compiler version in CI, for help with debugging
This commit is contained in:
parent
86c3174d5b
commit
370ba3644a
|
@ -33,8 +33,14 @@ jobs:
|
|||
toolchain: ${{ format('{0}-{1}', matrix.channel, matrix.target.toolchain) }}
|
||||
profile: minimal
|
||||
override: true
|
||||
# Print the compiler version, for debugging.
|
||||
- name: print compiler version
|
||||
run: cargo run --quiet
|
||||
working-directory: ./tools/compiler_version
|
||||
# Print out instruction set support, for debugging.
|
||||
- run: cargo run --quiet --bin instruction_set_support
|
||||
- name: print instruction set support
|
||||
run: cargo run --quiet
|
||||
working-directory: ./tools/instruction_set_support
|
||||
# Default tests plus Rayon.
|
||||
- run: cargo test --features=rayon
|
||||
# no_std tests.
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[package]
|
||||
name = "compiler_version"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0.50"
|
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
let build = cc::Build::new();
|
||||
let compiler = build.get_compiler();
|
||||
let compiler_path = compiler.path().to_string_lossy();
|
||||
println!("cargo:rustc-env=COMPILER_PATH={}", compiler_path);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
fn main() {
|
||||
// Set in build.rs.
|
||||
let compiler_path = env!("COMPILER_PATH");
|
||||
|
||||
let mut compiler_command = std::process::Command::new(compiler_path);
|
||||
// Use the --version flag on everything other than MSVC.
|
||||
if !cfg!(target_env = "msvc") {
|
||||
compiler_command.arg("--version");
|
||||
}
|
||||
// Run the compiler to print its version. Ignore the exit status.
|
||||
let _ = compiler_command.status().unwrap();
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "instruction_set_support"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
Loading…
Reference in New Issue