Skip to content

Commit bc25f45

Browse files
committed
CI: exec cargo update when inputs.cargo_update set true
1 parent c2180fa commit bc25f45

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
release_name:
77
description: "release page name"
88
required: true
9+
cargo_update:
10+
description: "update cargo"
11+
required: false
12+
default: "false"
913
push:
1014
tags:
1115
- "[0-9]+.[0-9]+.[0-9]+*"
@@ -46,6 +50,11 @@ jobs:
4650
run: |
4751
git config --global --add safe.directory $(pwd)
4852
53+
- name: Cargo update
54+
if: ${{ github.event.inputs.cargo_update == 'true' }}
55+
run: |
56+
cargo update
57+
4958
- name: Build
5059
run: |
5160
export LIBTORCH=$(pwd)/libtorch
@@ -102,6 +111,11 @@ jobs:
102111
run: |
103112
git config --global --add safe.directory $(pwd)
104113
114+
- name: Cargo update
115+
if: ${{ github.event.inputs.cargo_update == 'true' }}
116+
run: |
117+
cargo update
118+
105119
- name: Build
106120
run: |
107121
export LIBTORCH=$(pwd)/libtorch
@@ -143,6 +157,11 @@ jobs:
143157
wget https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.4.0.zip
144158
unzip libtorch-macos-arm64-2.4.0.zip
145159
160+
- name: Cargo update
161+
if: ${{ github.event.inputs.cargo_update == 'true' }}
162+
run: |
163+
cargo update
164+
146165
- name: Build
147166
run: |
148167
export LIBTORCH=$(pwd)/libtorch

0 commit comments

Comments
 (0)