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 37b350c commit ee05e82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ 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:
PRINT_COMMAND: "1"
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 @@ -604,6 +604,9 @@ impl Loader {
command.args(cc_config.get_files());
command.arg("-o").arg(output_path);
}
if option_env!("PRINT_COMMAND").is_some() {
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

0 comments on commit ee05e82

Please sign in to comment.