diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19390fa..91eefc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: env: CARGO_TERM_COLOR: always BUILD_PROFILE: debug - WHITAKER_INSTALLER_REV: f768c2e53c47df13658af1168a67851d388750bf + WHITAKER_INSTALLER_VERSION: '0.2.5' steps: - uses: actions/checkout@b9e0990d219a03df7633c93f6f005a8fecbcab22 with: @@ -57,29 +57,29 @@ jobs: uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 with: python-version: '3.x' - - name: Cache Whitaker installation - id: cache-whitaker + - name: Cache Whitaker installer uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 with: path: | ~/.cargo/bin/whitaker-installer - ~/.local/bin/whitaker - ~/.dylint_drivers - ~/.local/share/whitaker - key: whitaker-v2-${{ runner.os }}-${{ env.WHITAKER_INSTALLER_REV }} + ~/.cache/cargo-binstall + key: whitaker-installer-${{ runner.os }}-${{ runner.arch }}-${{ env.WHITAKER_INSTALLER_VERSION }} - name: Install Whitaker env: RUSTFLAGS: "" run: | set -euo pipefail - echo "Whitaker cache hit: ${{ steps.cache-whitaker.outputs.cache-hit }}" - if [ "${{ steps.cache-whitaker.outputs.cache-hit }}" != "true" ]; then - echo "Installing Whitaker installer at ${WHITAKER_INSTALLER_REV}" - cargo install --locked \ - --git https://github.com/leynos/whitaker \ - --rev "${WHITAKER_INSTALLER_REV}" \ - whitaker-installer + if ! command -v whitaker-installer >/dev/null 2>&1; then + if cargo binstall --version >/dev/null 2>&1; then + cargo binstall --no-confirm --locked "whitaker-installer@${WHITAKER_INSTALLER_VERSION}" + else + echo "cargo-binstall unavailable; building whitaker-installer from crates.io" + cargo install --locked whitaker-installer --version "${WHITAKER_INSTALLER_VERSION}" + fi fi + # --cranelift provisions rustc-codegen-cranelift on Whitaker's pinned + # toolchain; this project builds with the Cranelift debug backend. + whitaker-installer --cranelift echo "Whitaker binary: $(command -v whitaker || true)" - name: Audit dependencies diff --git a/Makefile b/Makefile index 5a3a0f5..86d3c82 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ coverage: ## Generate lcov coverage with lld for llvm-tools compatibility LDFLAGS="$(COVERAGE_LINKER_FLAGS)" \ $(CARGO) llvm-cov --lcov --output-path lcov.info $(TEST_FLAGS) -lint: ## Run Clippy with warnings denied +lint: ## Run rustdoc, Clippy, and the Whitaker suite with warnings denied RUSTDOCFLAGS="$(RUSTDOC_FLAGS)" $(CARGO) doc --no-deps $(CARGO) clippy $(CLIPPY_FLAGS) @echo "Whitaker binary: $(WHITAKER)"