Skip to content

Nightly

Nightly #279

Workflow file for this run

name: Nightly
on:
schedule:
- cron: '0 0 * * *'
jobs:
check_nightly:
runs-on: ubuntu-latest
name: Check nightly is needed
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
f3d_sha: ${{ steps.should_run.outputs.f3d_sha }}
steps:
- name: Checkout F3D
uses: actions/checkout@v3
with:
repository: f3d-app/f3d
fetch-depth: 0
lfs: false
- name: check latest commit is not tagged already
id: should_run
continue-on-error: true
run: |
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
build_and_package:
needs: check_nightly
if: ${{ needs.check_nightly.outputs.should_run == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
raytracing_label: [raytracing, no-raytracing]
build_type: [standard]
include:
- egl_label: no-egl
- build_type: headless
os: ubuntu
raytracing_label: raytracing
egl_label: egl
runs-on: ${{matrix.os}}-latest
container: ${{ matrix.os == 'ubuntu' && 'ghcr.io/f3d-app/f3d-superbuild-ci' || null }}
env:
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: 'source'
submodules: true
lfs: true
- name: Build and package F3D
uses: ./source/.github/actions/f3d-superbuild/
with:
f3d_version: ${{ needs.check_nightly.outputs.f3d_sha}}
raytracing_label: ${{matrix.raytracing_label}}
egl_label: ${{matrix.egl_label}}
- name: Delete previous nightly release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ secrets.SECRET_TOKEN }}
repository: f3d-app/f3d
tag: nightly
assets: "F3D-*-${{runner.os}}-*${{ matrix.egl_label == 'egl' && '-headless' || null }}${{ matrix.raytracing_label == 'raytracing' && '-raytracing' || null }}"
fail-if-no-assets: false
- name: Publish nightly release
uses: ncipollo/release-action@v1
with:
owner: f3d-app
repo: f3d
token: ${{ secrets.SECRET_TOKEN }}
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
tag: nightly
name: "Nightly"
body: "Automatically generated nightly binary release"
artifacts: './build/F3D-*'
advance_nightly:
needs: [check_nightly, build_and_package]
if: ${{ needs.check_nightly.outputs.should_run == 'true' }}
runs-on: ubuntu-latest
name: Advance nightly tag
steps:
- name: Checkout F3D
uses: actions/checkout@v3
with:
repository: f3d-app/f3d
fetch-depth: 0
lfs: false
token: ${{ secrets.SECRET_TOKEN }}
- name: Advance nightly tag
run: |
git checkout ${{ needs.check_nightly.outputs.f3d_sha}}
git tag nightly -f
git push origin nightly -f