mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Save CAPI extensions cache not-cached master only
This commit is contained in:
parent
214ba4074d
commit
c4ac3e987b
17
.github/actions/capiext/action.yml
vendored
17
.github/actions/capiext/action.yml
vendored
@ -35,8 +35,8 @@ runs:
|
||||
echo DLEXT=$DLEXT >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ inputs.builddir }}
|
||||
|
||||
- name: CAPI extensions cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
- name: Restore previous CAPI extensions
|
||||
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
id: cache
|
||||
with:
|
||||
path: ${{ inputs.builddir }}/spec/ruby/optional/capi/ext/
|
||||
@ -50,11 +50,24 @@ runs:
|
||||
touch spec/ruby/optional/capi/ext/*.$DLEXT
|
||||
[ ! -f spec/ruby/optional/capi/ext/\*.$DLEXT ]
|
||||
${{ inputs.make }} SPECOPTS=optional/capi test-spec
|
||||
rm -f spec/ruby/optional/capi/ext/*.c
|
||||
env:
|
||||
DLEXT: ${{ steps.config.outputs.DLEXT }}
|
||||
working-directory: ${{ inputs.builddir }}
|
||||
if: ${{ steps.cache.outputs.cache-hit }}
|
||||
|
||||
- name: Save CAPI extensions
|
||||
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ${{ inputs.builddir }}/spec/ruby/optional/capi/ext/
|
||||
key: ${{ steps.config.outputs.key }}
|
||||
if: >-
|
||||
${{true
|
||||
&& steps.cache.outcome == 'success'
|
||||
&& ! steps.cache.outputs.cache-hit
|
||||
&& github.ref_name == 'master'
|
||||
}}
|
||||
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "::error::Change from ${prev} detected; bump up ABI version"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user