Skip to content

Commit

Permalink
CI: Nightly: Fix LFS action usage (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Sep 6, 2024
1 parent 0af9634 commit 0c0ddcb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .github/actions/f3d-superbuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ inputs:
default: 'x86_64'
lfs_sha:
description: 'Cache LFS sha'
required: true
required: false

runs:
using: "composite"
steps:

- name: Check required inputs
shell: bash
run: |
[[ "${{ inputs.lfs_sha }}" ]] || { echo "lfs_sha input is empty" ; exit 1; }
- name: Recover LFS Data
uses: f3d-app/lfs-data-cache-action@v1
with:
Expand Down
30 changes: 27 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,29 @@ jobs:
test -z "$(git tag --points-at HEAD)" && echo "should_run=true" >> $GITHUB_OUTPUT || echo "should_run=false" >> $GITHUB_OUTPUT
echo "f3d_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
windows:
cache_lfs:
needs: check_nightly
runs-on: ubuntu-latest
name: Update LFS data cache
outputs:
lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }}
steps:

- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 1
lfs: false

- name: Cache LFS Data
id: lfs_sha_recover
uses: f3d-app/lfs-data-cache-action@v1
with:
cache_postfix: cache-0

windows:
needs: cache_lfs
if: ${{ needs.check_nightly.outputs.should_run == 'true' }}
strategy:
fail-fast: false
Expand All @@ -53,6 +74,7 @@ jobs:
with:
f3d_version: ${{ needs.check_nightly.outputs.f3d_sha}}
raytracing_label: ${{matrix.raytracing_label}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}

- name: Delete previous nightly release assets
uses: mknejp/delete-release-assets@v1
Expand All @@ -78,7 +100,7 @@ jobs:
artifacts: './build/F3D-*'

linux:
needs: check_nightly
needs: cache_lfs
if: ${{ needs.check_nightly.outputs.should_run == 'true' }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -107,6 +129,7 @@ jobs:
f3d_version: ${{ needs.check_nightly.outputs.f3d_sha}}
raytracing_label: ${{matrix.raytracing_label}}
egl_label: ${{matrix.egl_label}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}

- name: Delete previous nightly release assets
uses: mknejp/delete-release-assets@v1
Expand All @@ -132,7 +155,7 @@ jobs:
artifacts: './build/F3D-*'

macos:
needs: check_nightly
needs: cache_lfs
if: ${{ needs.check_nightly.outputs.should_run == 'true' }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -162,6 +185,7 @@ jobs:
f3d_version: ${{ needs.check_nightly.outputs.f3d_sha}}
raytracing_label: ${{matrix.raytracing_label}}
cpu: ${{matrix.cpu}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}

- name: Delete previous nightly release assets
uses: mknejp/delete-release-assets@v1
Expand Down

0 comments on commit 0c0ddcb

Please sign in to comment.