name: Setup E2E CLI description: Download architecture-matched prebuilt OpenShell host CLIs for E2E tests inputs: conformance-artifact-prefix: description: Optional conformance CLI artifact name prefix; linux- is appended automatically required: false default: "" runs: using: composite steps: - name: Download prebuilt CLI uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ runner.arch == 'X64' && 'openshell-x86_64-unknown-linux-musl' || 'openshell-aarch64-unknown-linux-musl' }} path: .e2e/prebuilt-cli - name: Configure prebuilt CLI shell: bash run: | cli="$GITHUB_WORKSPACE/.e2e/prebuilt-cli/openshell" chmod +x "$cli" "$cli" --version echo "OPENSHELL_BIN=$cli" >> "$GITHUB_ENV" - name: Download prebuilt conformance CLI if: inputs.conformance-artifact-prefix != '' uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ format('{0}-{1}', inputs.conformance-artifact-prefix, runner.arch == 'X64' && 'x86_64-unknown-linux-musl' || 'aarch64-unknown-linux-musl') }} path: .e2e/prebuilt-conformance - name: Configure prebuilt conformance CLI if: inputs.conformance-artifact-prefix != '' shell: bash run: | # zizmor: ignore[github-env] validated filename under the trusted workspace path set -euo pipefail conformance="$GITHUB_WORKSPACE/.e2e/prebuilt-conformance/openshell-conformance" if [[ ! -f "$conformance" ]]; then echo "downloaded artifact is missing $conformance" >&2 exit 1 fi # TODO: Remove this temporary mode diagnostic after CI confirms artifact permission handling. echo "conformance binary mode before chmod: $(ls -l "$conformance")" chmod +x "$conformance" echo "conformance binary mode after chmod: $(ls -l "$conformance")" "$conformance" list --output json >/dev/null echo "OPENSHELL_CONFORMANCE_BIN=$conformance" >> "$GITHUB_ENV"