Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@900f2210b1d28bbbd0bd22d17926b9e224e8f231
with:
Expand Down Expand Up @@ -60,19 +60,18 @@ jobs:
~/.local/bin/whitaker
~/.dylint_drivers
~/.local/share/whitaker
key: whitaker-v2-${{ runner.os }}-${{ env.WHITAKER_INSTALLER_REV }}
key: whitaker-v3-${{ runner.os }}-${{ env.WHITAKER_INSTALLER_VERSION }}
- name: Install Whitaker
env:
RUSTFLAGS: ""
WHITAKER_CACHE_HIT: ${{ steps.cache-whitaker.outputs.cache-hit }}
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
echo "Whitaker cache hit: ${WHITAKER_CACHE_HIT}"
if [ "${WHITAKER_CACHE_HIT}" != "true" ]; then
echo "Installing whitaker-installer ${WHITAKER_INSTALLER_VERSION}"
cargo binstall --no-confirm --locked \
whitaker-installer@"${WHITAKER_INSTALLER_VERSION}"
fi
whitaker-installer --cranelift
echo "Whitaker binary: $(command -v whitaker || true)"
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/tooling_contracts/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _assert_ci_workflow_contracts(
assert "Whitaker cache hit:" in ci_workflow, (
"expected generated CI workflow to log Whitaker cache status"
)
assert "Installing Whitaker installer at" in ci_workflow, (
assert "Installing whitaker-installer" in ci_workflow, (
"expected generated CI workflow to log Whitaker installation"
)
assert "Whitaker binary:" in ci_workflow, (
Expand Down
17 changes: 8 additions & 9 deletions tests/test_template/__snapshots__/test_snapshots.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
'env': dict({
'BUILD_PROFILE': 'debug',
'CARGO_TERM_COLOR': 'always',
'WHITAKER_INSTALLER_REV': 'f768c2e53c47df13658af1168a67851d388750bf',
'WHITAKER_INSTALLER_VERSION': '0.2.5',
}),
'permissions': dict({
'contents': 'read',
Expand Down Expand Up @@ -147,7 +147,7 @@
'name': 'Cache Whitaker installation',
'uses': 'actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae',
'with': dict({
'key': 'whitaker-v2-${{ runner.os }}-${{ env.WHITAKER_INSTALLER_REV }}',
'key': 'whitaker-v3-${{ runner.os }}-${{ env.WHITAKER_INSTALLER_VERSION }}',
'path': '''
~/.cargo/bin/whitaker-installer
~/.local/bin/whitaker
Expand All @@ -160,17 +160,16 @@
dict({
'env': dict({
'RUSTFLAGS': '',
'WHITAKER_CACHE_HIT': '${{ steps.cache-whitaker.outputs.cache-hit }}',
}),
'name': 'Install Whitaker',
'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
echo "Whitaker cache hit: ${WHITAKER_CACHE_HIT}"
if [ "${WHITAKER_CACHE_HIT}" != "true" ]; then
echo "Installing whitaker-installer ${WHITAKER_INSTALLER_VERSION}"
cargo binstall --no-confirm --locked \
whitaker-installer@"${WHITAKER_INSTALLER_VERSION}"
fi
whitaker-installer --cranelift
echo "Whitaker binary: $(command -v whitaker || true)"
Expand Down
Loading