ci: prevent accidental GOOS and GOARCH confusion in host go toolchain (#1632)

Co-authored-by: Malte Poll <1780588+malt3@users.noreply.github.com>
This commit is contained in:
3u13r 2023-04-12 15:01:15 +02:00 committed by GitHub
parent 9f8f320ddc
commit c92ceaab3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -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}")

View file

@ -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"
@ -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}")