Skip to content

Commit 0112b3d

Browse files
committed
cache cross
1 parent 749f8d9 commit 0112b3d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/actions/build_cli_target/action.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ runs:
2929
# Install gcc-mingw-w64-x86-64 for Windows target cross-compilation
3030
sudo apt-get install -y build-essential gcc-mingw-w64-x86-64
3131
32+
- name: Cache cross binary
33+
uses: actions/cache@v4
34+
id: cache-cross
35+
with:
36+
path: ~/.cargo/bin/cross
37+
key: cross-git-latest
38+
3239
- name: Install cross
3340
shell: bash
41+
if: steps.cache-cross.outputs.cache-hit != 'true'
3442
run: cargo install cross --git https://github.com/cross-rs/cross --force
3543

3644
- name: Build CLI ${{ inputs.target }} target (Windows GNU native)

.github/workflows/pull_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ jobs:
191191
if: ${{ !contains(matrix.platform.target, 'illumos') && !contains(matrix.platform.os-name, 'windows') }}
192192
run: |
193193
if [[ "${{steps.tests.outcome}}" == "failure" ]]; then
194-
test-step-outcome=1
194+
$TEST_STEP_OUTCOME=1
195195
else
196-
test-step-outcome=0
196+
$TEST_STEP_OUTCOME=0
197197
fi
198198
target/${{ matrix.platform.target }}/release/trunk-analytics-cli upload \
199199
--junit-paths ${{ github.workspace }}/target/**/*junit.xml \
200200
--org-url-slug trunk-staging-org \
201201
--token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \
202-
--test-process-exit-code $test-step-outcome
202+
--test-process-exit-code $TEST_STEP_OUTCOME
203203
204204
- name: Upload results to prod using built CLI
205205
shell: bash

0 commit comments

Comments
 (0)