File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,12 @@ runs:
125
125
SAFE_ADDITIONAL_STD_FEATURES="no-std-features"
126
126
fi
127
127
128
+ # Sanitize additional-rustc-args string to be filesystem safe
129
+ SAFE_ADDITIONAL_RUSTC_ARGS=$(echo "${{ inputs.additional-rustc-args }}" | tr -dc '[:alnum:],_-' | tr ',' '-')
130
+ if [ -z "$SAFE_ADDITIONAL_RUSTC_ARGS" ]; then
131
+ SAFE_ADDITIONAL_RUSTC_ARGS="no-rustc-args"
132
+ fi
133
+
128
134
# Sanitize workspace path - convert '.' to empty string
129
135
WORKSPACE_PATH=$(echo "${{ env.WORKSPACE_PATH }}" | sed 's/^\.$//')
130
136
@@ -142,12 +148,13 @@ runs:
142
148
echo "ARTIFACT_OUT_DIR=${ARTIFACT_OUT_DIR}" >> $GITHUB_ENV
143
149
echo "SAFE_FEATURES=${SAFE_FEATURES}" >> $GITHUB_ENV
144
150
echo "SAFE_ADDITIONAL_STD_FEATURES=${SAFE_ADDITIONAL_STD_FEATURES}" >> $GITHUB_ENV
151
+ echo "SAFE_ADDITIONAL_RUSTC_ARGS=${SAFE_ADDITIONAL_RUSTC_ARGS}" >> $GITHUB_ENV
145
152
146
153
- name : Setup Rust Caching
147
154
if : inputs.use-cache == 'true'
148
155
uses : Swatinem/rust-cache@v2
149
156
with :
150
- key : build-${{ env.WORKSPACE_PATH }}-${{ inputs.crate-name }}-${{ inputs.target }}-${{ env.SAFE_FEATURES }}-${{ env.SAFE_ADDITIONAL_STD_FEATURES }}-${{ inputs.no-default-features }}-${{ inputs.build-library }}-${{ inputs.crate-types }}-${{ inputs.use-cross }}
157
+ key : build-${{ env.WORKSPACE_PATH }}-${{ inputs.crate-name }}-${{ inputs.target }}-${{ env.SAFE_FEATURES }}-${{ env.SAFE_ADDITIONAL_STD_FEATURES }}-${{ env.SAFE_ADDITIONAL_RUSTC_ARGS }}-${{ inputs.no-default-features }}-${{ inputs.build-library }}-${{ inputs.crate-types }}-${{ inputs.use-cross }}
151
158
cache-on-failure : true
152
159
cache-all-crates : true
153
160
workspaces : |
You can’t perform that action at this time.
0 commit comments