Skip to content

Commit

Permalink
ci: prevent accidental GOOS and GOARCH confusion in host go toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed Apr 12, 2023
1 parent af9e03f commit 62cc3c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build_cdbg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ runs:
- name: Build cdbg
shell: bash
env:
GOOS: ${{ inputs.targetOS }}
GOARCH: ${{ inputs.targetArch }}
TARGET_GOOS: ${{ inputs.targetOS }}
TARGET_GOARCH: ${{ inputs.targetArch }}
OUTPUT_PATH: ${{ inputs.outputPath }}
run: |
echo "::group::Build cdbg"
mkdir -p "$(dirname "${OUTPUT_PATH}")"
label="//debugd/cmd/cdbg:cdbg_${GOOS}_${GOARCH}"
label="//debugd/cmd/cdbg:cdbg_${TARGET_GOOS}_${TARGET_GOARCH}"
bazel build "${label}"
repository_root=$(git rev-parse --show-toplevel)
out_rel=$(bazel cquery --output=files "${label}")
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/build_cli/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ runs:
- name: Build CLI
shell: bash
env:
GOOS: ${{ inputs.targetOS }}
GOARCH: ${{ inputs.targetArch }}
TARGET_GOOS: ${{ inputs.targetOS }}
TARGET_GOARCH: ${{ inputs.targetArch }}
OUTPUT_PATH: ${{ inputs.outputPath || format('./build/constellation-{0}-{1}', inputs.targetOS, inputs.targetArch) }}
run: |
echo "::group::Build CLI"
Expand All @@ -55,7 +55,7 @@ runs:
else
cli_variant=oss
fi
label="//cli:cli_${cli_variant}_${GOOS}_${GOARCH}"
label="//cli:cli_${cli_variant}_${TARGET_GOOS}_${TARGET_GOARCH}"
bazel build "${label}"
repository_root=$(git rev-parse --show-toplevel)
out_rel=$(bazel cquery --output=files "${label}")
Expand Down

0 comments on commit 62cc3c4

Please sign in to comment.