Release #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
f3d_version: | |
description: 'F3D version to build' | |
required: true | |
default: 'v2.0.0' | |
sb_branch: | |
description: 'Superbuild branch/tag to use' | |
required: true | |
default: 'main' | |
publish_assets: | |
description: 'Publish assets to a prerelease' | |
required: true | |
default: 'false' | |
jobs: | |
windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
raytracing_label: [raytracing, no-raytracing] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: 'source' | |
submodules: true | |
lfs: true | |
ref: ${{ github.event.inputs.sb_branch}} | |
- name: Build and package F3D | |
uses: ./source/.github/actions/f3d-superbuild/ | |
with: | |
f3d_version: ${{github.event.inputs.f3d_version}} | |
raytracing_label: ${{matrix.raytracing_label}} | |
- name: Publish assets | |
if: ${{ github.event.inputs.publish_assets == 'true' }} | |
uses: ncipollo/release-action@v1 | |
with: | |
owner: f3d-app | |
repo: f3d | |
token: ${{ secrets.SECRET_TOKEN }} | |
prerelease: true | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
replacesArtifacts: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
tag: ${{github.event.inputs.f3d_version}} | |
artifacts: './build/F3D-*' | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
raytracing_label: [raytracing, no-raytracing] | |
egl_label: [egl, no-egl] | |
runs-on: ubuntu-latest | |
container: ghcr.io/f3d-app/f3d-superbuild-ci | |
env: | |
DISPLAY: :0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: 'source' | |
submodules: true | |
lfs: true | |
ref: ${{ github.event.inputs.sb_branch}} | |
- name: Build and package F3D | |
uses: ./source/.github/actions/f3d-superbuild/ | |
with: | |
f3d_version: ${{github.event.inputs.f3d_version}} | |
raytracing_label: ${{matrix.raytracing_label}} | |
egl_label: ${{matrix.egl_label}} | |
- name: Publish assets | |
if: ${{ github.event.inputs.publish_assets == 'true' }} | |
uses: ncipollo/release-action@v1 | |
with: | |
owner: f3d-app | |
repo: f3d | |
token: ${{ secrets.SECRET_TOKEN }} | |
prerelease: true | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
replacesArtifacts: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
tag: ${{github.event.inputs.f3d_version}} | |
artifacts: './build/F3D-*' | |
macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
raytracing_label: [raytracing, no-raytracing] | |
cpu: [x86_64] | |
include: | |
- cpu: arm64 | |
raytracing_label: no-raytracing | |
runs-on: macos-latest | |
env: | |
CMAKE_OSX_ARCHITECTURES: ${{matrix.cpu}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: 'source' | |
submodules: true | |
lfs: true | |
ref: ${{ github.event.inputs.sb_branch}} | |
- name: Build and package F3D | |
uses: ./source/.github/actions/f3d-superbuild/ | |
with: | |
f3d_version: ${{github.event.inputs.f3d_version}} | |
raytracing_label: ${{matrix.raytracing_label}} | |
- name: Publish assets | |
if: ${{ github.event.inputs.publish_assets == 'true' }} | |
uses: ncipollo/release-action@v1 | |
with: | |
owner: f3d-app | |
repo: f3d | |
token: ${{ secrets.SECRET_TOKEN }} | |
prerelease: true | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
replacesArtifacts: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
tag: ${{github.event.inputs.f3d_version}} | |
artifacts: './build/F3D-*' | |
python_wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, windows, macos] | |
runs-on: ${{matrix.os}}-latest | |
env: | |
DISPLAY: :0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: 'source' | |
submodules: true | |
lfs: true | |
ref: ${{ github.event.inputs.sb_branch}} | |
- name: Build and package F3D python wheels | |
uses: ./source/.github/actions/wheels/ | |
with: | |
f3d_version: ${{github.event.inputs.f3d_version}} | |
use_cache: false | |
- name: Publish assets | |
if: ${{ github.event.inputs.publish_assets == 'true' }} | |
uses: ncipollo/release-action@v1 | |
with: | |
owner: f3d-app | |
repo: f3d | |
token: ${{ secrets.SECRET_TOKEN }} | |
prerelease: true | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
replacesArtifacts: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
tag: ${{github.event.inputs.f3d_version}} | |
artifacts: './wheelhouse/f3d-*.whl' | |
pypi-publish: | |
needs: python_wheels | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/f3d | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: wheels-* | |
merge-multiple: true | |
path: dist | |
- name: Publish package distributions to PyPi | |
uses: pypa/gh-action-pypi-publish@release/v1 |