mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-20 10:55:37 -05:00
refactor(ci): cleanup Build ${{ matrix.bin.name }} in release mode ste
This commit is contained in:
parent
b40ef1918d
commit
12bded63f4
1 changed files with 14 additions and 7 deletions
21
.github/workflows/build-release-binaries.yml
vendored
21
.github/workflows/build-release-binaries.yml
vendored
|
|
@ -66,13 +66,20 @@ jobs:
|
|||
- name: Build ${{ matrix.bin.name }} in release mode
|
||||
run: |
|
||||
set -euo pipefail
|
||||
BIN_PATH="$(
|
||||
cargo build --bin "${{ matrix.bin.name }}" --target "${{ matrix.target.target }}" --release -q --message-format=json \
|
||||
| jq -re 'select(.reason=="compiler-artifact" and .executable!=null) | .executable' \
|
||||
| tail -n1
|
||||
)"
|
||||
# Ensure we actually found a path (nice error if not)
|
||||
[[ -n "$BIN_PATH" ]] || { echo "Failed to extract executable path from cargo output"; exit 1; }
|
||||
json="$(mktemp)"
|
||||
|
||||
cargo build \
|
||||
--bin "${{ matrix.bin.name }}" \
|
||||
--target "${{ matrix.target.target }}" \
|
||||
--release \
|
||||
--message-format=json > "$json"
|
||||
|
||||
BIN_PATH="$(jq -re '
|
||||
select(.reason=="compiler-artifact")
|
||||
| select(.target.kind[]=="bin")
|
||||
| .executable
|
||||
' "$json" | tail -n1)"
|
||||
|
||||
echo "BIN_PATH=$BIN_PATH" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Smoke test the binary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue