mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-20 19:06:43 -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
|
- name: Build ${{ matrix.bin.name }} in release mode
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
BIN_PATH="$(
|
json="$(mktemp)"
|
||||||
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' \
|
cargo build \
|
||||||
| tail -n1
|
--bin "${{ matrix.bin.name }}" \
|
||||||
)"
|
--target "${{ matrix.target.target }}" \
|
||||||
# Ensure we actually found a path (nice error if not)
|
--release \
|
||||||
[[ -n "$BIN_PATH" ]] || { echo "Failed to extract executable path from cargo output"; exit 1; }
|
--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"
|
echo "BIN_PATH=$BIN_PATH" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Smoke test the binary
|
- name: Smoke test the binary
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue