Skip to content

Commit

Permalink
ci: Upgrade to newer actions
Browse files Browse the repository at this point in the history
* Upgrade upload-artifact action, old one is being deprecated.
* Update checkout and cache actions to latest.
* Fix workflow warning: save-always is not really an input to
  actions/cache.

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Dec 25, 2024
1 parent 8839acc commit 571c122
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ jobs:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
# - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# # Note: can't upgrade to actions/checkout 4.0 because it needs newer
# # glibc than these containers have.
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- name: Prepare ccache timestamp
Expand All @@ -107,14 +104,11 @@ jobs:
run: echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT
- name: ccache
id: ccache
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
# Note: can't upgrade to actions/cache 4.0 because it needs newer
# glibc than these containers have.
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ./ccache
key: ${{github.job}}-${{inputs.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
restore-keys: ${{github.job}}-
save-always: true
- name: Setup Nuget.exe (Windows only)
if: runner.os == 'Windows'
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
Expand Down Expand Up @@ -163,7 +157,7 @@ jobs:
# Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options
- name: Check out ABI standard
if: inputs.abi_check != ''
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{inputs.abi_check}}
path: abi_standard
Expand All @@ -187,9 +181,7 @@ jobs:
cd src/doc
time make doxygen
time make sphinx
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
# Note: versions of upload-artifact >= 4.0 can't run on the ASWF
# containers because they need a newer glibc than they have.
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ failure() || inputs.build_docs == '1'}}
with:
name: oiio-${{github.job}}-${{inputs.nametag}}
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,15 @@ jobs:
# uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
# with:
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# Note: can't upgrade to actions/checkout 4.0 because it needs newer
# glibc than these containers have.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- name: Prepare ccache timestamp
id: ccache_cache_keys
run: echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT
- name: ccache
id: ccache
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
# Note: can't upgrade to actions/cache 4.0 because it needs newer
# glibc than these containers have.
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: /tmp/ccache
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
Expand All @@ -200,7 +198,7 @@ jobs:
run: src/build-scripts/ci-test.bash
- name: Check out ABI standard
if: matrix.abi_check != ''
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{matrix.abi_check}}
path: abi_standard
Expand All @@ -221,9 +219,7 @@ jobs:
cd src/doc
time make doxygen
time make sphinx
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
# Note: versions of upload-artifact >= 4.0 can't run on the ASWF
# containers because they need a newer glibc than they have.
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ failure() || matrix.build_docs == '1'}}
with:
name: oiio-${{github.job}}-${{matrix.nametag}}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: '0'

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
Expand Down

0 comments on commit 571c122

Please sign in to comment.