Skip to content

Commit 480e1d2

Browse files
committed
add caching
1 parent f9d9931 commit 480e1d2

File tree

1 file changed

+8
-30
lines changed

1 file changed

+8
-30
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,14 @@ jobs:
362362
steps:
363363
- name: Checkout source code
364364
uses: actions/checkout@v2
365+
- name: Cache
366+
uses: actions/cache@v2
367+
with:
368+
path: |
369+
~/.cargo/registry
370+
~/.cargo/git
371+
target
372+
key: ${{ matrix.job.target }}-${{ matrix.job.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
365373

366374
- name: Install prerequisites
367375
shell: bash
@@ -419,31 +427,6 @@ jobs:
419427
*-pc-windows-*) EXE_suffix=".exe" ;;
420428
esac;
421429
422-
# Figure out what strip tool to use if any
423-
# STRIP="strip"
424-
# case ${{ matrix.job.target }} in
425-
# arm-unknown-linux-*) STRIP="arm-linux-gnueabihf-strip" ;;
426-
# aarch64-pc-*) STRIP="" ;;
427-
# aarch64-unknown-*) STRIP="" ;;
428-
# armv7-unknown-*) STRIP="" ;;
429-
# mips-unknown-*) STRIP="" ;;
430-
# mips64-unknown-*) STRIP="" ;;
431-
# mips64el-unknown-*) STRIP="" ;;
432-
# mipsel-unknown-*) STRIP="" ;;
433-
# powerpc-unknown-*) STRIP="" ;;
434-
# powerpc64-unknown-*) STRIP="" ;;
435-
# powerpc64le-unknown-*) STRIP="" ;;
436-
# riscv64gc-unknown-*) STRIP="" ;;
437-
# s390x-unknown-*) STRIP="" ;;
438-
# x86_64-unknown-freebsd) STRIP="" ;;
439-
# x86_64-unknown-illumos) STRIP="" ;;
440-
# aarch64-linux-android) STRIP="" ;;
441-
# arm-linux-androideabi) STRIP="" ;;
442-
# armv5te-unknown-linux-gnueabi) STRIP="" ;;
443-
# armv5te-unknown-linux-musleabi) STRIP="" ;;
444-
# armv7-linux-androideabi) STRIP="" ;;
445-
# esac;
446-
447430
# Setup paths
448431
BIN_DIR="${{ env.CICD_INTERMEDIATES_DIR }}/stripped-release-bin/"
449432
mkdir -p "${BIN_DIR}"
@@ -454,11 +437,6 @@ jobs:
454437
# Copy the release build binary to the result location
455438
cp "target/$TRIPLET_NAME/release/${BIN_NAME}" "${BIN_DIR}"
456439
457-
# Also strip if possible
458-
# if [ -n "${STRIP}" ]; then
459-
# "${STRIP}" "${BIN_PATH}"
460-
# fi
461-
462440
# Let subsequent steps know where to find the (stripped) bin
463441
echo ::set-output name=BIN_PATH::${BIN_PATH}
464442
echo ::set-output name=BIN_NAME::${BIN_NAME}

0 commit comments

Comments
 (0)