Skip to content

Commit

Permalink
temp: print command
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Mar 26, 2024
1 parent 3fa6837 commit 9b86386
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ jobs:
if: ${{ !matrix.cli-only && !matrix.use-cross && inputs.run_test && steps.cache.outputs.cache-hit != 'true' }} # See comment for the "Build wasm library" step
run: script/generate-fixtures-wasm

- if: matrix.platform != 'windows-arm64'
run: $BUILD_CMD run --release --target=${{ matrix.target }} build test/fixtures/grammars/bash
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"

- name: Run main tests
if: ${{ !matrix.cli-only && inputs.run_test }} # Can't natively run CLI on Github runner's host
run: $BUILD_CMD test --target=${{ matrix.target }} --features=${{ matrix.cli_features }}
Expand Down
3 changes: 3 additions & 0 deletions cli/loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ impl Loader {
command.args(cc_config.get_files());
command.arg("-o").arg(output_path);
}
if env::var("PRINT_COMMAND").is_ok() {
println!("::notice title=Command ({BUILD_TARGET})::{command:?}");
}

let output = command.output().with_context(|| {
format!("Failed to execute the C compiler with the following command:\n{command:?}")
Expand Down
2 changes: 2 additions & 0 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ fn run() -> Result<()> {

loader.use_debug_build(build_options.debug);

env::set_var("PRINT_COMMAND", "1");

let config = Config::load(None)?;
let loader_config = config.get()?;
loader.find_all_languages(&loader_config).unwrap();
Expand Down

0 comments on commit 9b86386

Please sign in to comment.