@@ -58,34 +58,46 @@ runs:
5858
5959 - name : Set version
6060 shell : nix develop ${{ inputs.dev-shell }} -c bash -euo pipefail {0}
61- run : sed -i 's/^version = "0\.0\.0"$/version = "${{ inputs.cargo-version }}"/' Cargo.toml
61+ env :
62+ INPUTS_CARGO_VERSION : ${{ inputs.cargo-version }}
63+ run : sed -i "s/^version = \"0\\.0\\.0\"$/version = \"${INPUTS_CARGO_VERSION}\"/" Cargo.toml
6264
6365 - name : Build ${{ inputs.binary }}
6466 shell : nix develop ${{ inputs.dev-shell }} -c bash -euo pipefail {0}
6567 env :
6668 OPENSHELL_IMAGE_TAG : ${{ inputs.image-tag }}
67- run : GIT_DIR=/nonexistent cargo auditable build --release --package "${{ inputs.package }}" --bin "${{ inputs.binary }}" ${{ inputs.extra-cargo-flags }}
69+ INPUTS_PACKAGE : ${{ inputs.package }}
70+ INPUTS_BINARY : ${{ inputs.binary }}
71+ INPUTS_EXTRA_CARGO_FLAGS : ${{ inputs.extra-cargo-flags }}
72+ run : GIT_DIR=/nonexistent cargo auditable build --release --package "${INPUTS_PACKAGE}" --bin "${INPUTS_BINARY}" ${INPUTS_EXTRA_CARGO_FLAGS}
6873
6974 - name : Verify ${{ inputs.binary }}
7075 shell : nix develop ${{ inputs.dev-shell }} -c bash -euo pipefail {0}
76+ env :
77+ INPUTS_BINARY : ${{ inputs.binary }}
7178 run : |
7279 # Confirm the binary runs and reports the expected name.
73- target/release/${{ inputs.binary }} --version | grep -q ' ^${{ inputs.binary }} '
80+ target/release/${INPUTS_BINARY} --version | grep -q " ^${INPUTS_BINARY} "
7481 # Confirm Syft can decode the embedded cargo-auditable metadata.
75- SYFT_CHECK_FOR_APP_UPDATE=false syft file:target/release/${{ inputs.binary } } -o cyclonedx-json | grep 'pkg:cargo/' > /dev/null
82+ SYFT_CHECK_FOR_APP_UPDATE=false syft file:target/release/${INPUTS_BINARY } -o cyclonedx-json | grep 'pkg:cargo/' > /dev/null
7683
7784 - name : Verify static linkage
7885 if : endsWith(inputs.triple, '-linux-musl')
7986 shell : nix develop ${{ inputs.dev-shell }} -c bash -euo pipefail {0}
80- run : tasks/scripts/verify-static-binary.sh target/release/${{ inputs.binary }}
87+ env :
88+ INPUTS_BINARY : ${{ inputs.binary }}
89+ run : tasks/scripts/verify-static-binary.sh target/release/${INPUTS_BINARY}
8190
8291 - name : Normalize Linux dynamic binary
8392 if : endsWith(inputs.triple, '-linux-gnu')
8493 shell : nix develop ${{ inputs.dev-shell }} -c bash -euo pipefail {0}
94+ env :
95+ INPUTS_BINARY : ${{ inputs.binary }}
96+ INPUTS_INTERPRETER : ${{ inputs.interpreter }}
8597 run : |
86- binary=target/release/${{ inputs.binary } }
98+ binary=target/release/${INPUTS_BINARY }
8799 # Remove Nix store paths so the binary can run on other distributions.
88- patchelf --set-interpreter "${{ inputs.interpreter } }" --remove-rpath "$binary"
100+ patchelf --set-interpreter "${INPUTS_INTERPRETER }" --remove-rpath "$binary"
89101 # Z3 must be embedded instead of loaded from the target system.
90102 test -z "$(patchelf --print-needed "$binary" | grep '^libz3')"
91103 # Reject symbols introduced after glibc 2.28.
0 commit comments