Skip to content

maint: add .gitattributes files and upgrade 2025R2 (#21) #2

maint: add .gitattributes files and upgrade 2025R2 (#21)

maint: add .gitattributes files and upgrade 2025R2 (#21) #2

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
env:
MAIN_PYTHON_VERSION: '3.10'
DOCUMENTATION_CNAME: 'multi-touch-cockpit.examples.scade.docs.pyansys.com'
LIBRARY_NAME: 'ansys-scade-examples-multi-touch-cockpit'
ARTIFACT_NAME: 'MultitouchCockpitStandaloneExecutable'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-style:
name: "Code style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v10
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
use-python-cache: false
doc-style:
name: "Documentation style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-style@v10
with:
token: ${{ secrets.GITHUB_TOKEN }}
doc-build:
name: "Build documentation"
runs-on: ubuntu-latest
timeout-minutes: 30
needs: doc-style
steps:
- uses: ansys/actions/doc-build@v10
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
skip-install: true
use-python-cache: false
dependencies: "texlive-fonts-extra qpdf"
check-links: false
rules-checker:
name: "Rules Checker "
runs-on: [self-hosted, 'SCADE']
strategy:
matrix:
os: [windows-latest]
scade-version: ['25.2']
fail-fast: false
needs: [code-style]
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4
- name: "Get SCADE installation directory"
uses: ansys/scade-actions/[email protected]
id: get-scade-dir
with:
scade-version: "25.2"
- name: "Check Rules"
uses: ansys/scade-actions/[email protected]
with:
scade-dir: ${{ steps.get-scade-dir.outputs.scade-directory }}
project: 'model/scade-suite/GlassCockpit.etp'
configuration: 'RulesChecker'
standalone-executable:
name: "Standalone Executable "
runs-on: [self-hosted, 'SCADE']
strategy:
matrix:
os: [windows-latest]
scade-version: ['25.2']
fail-fast: false
needs: [rules-checker]
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4
- name: "Get SCADE installation directory"
uses: ansys/scade-actions/[email protected]
id: get-scade-dir
with:
scade-version: "25.2"
- name: "Generate Standalone"
uses: ansys/scade-actions/[email protected]
with:
scade-dir: ${{ steps.get-scade-dir.outputs.scade-directory }}
project: 'model/scade-suite/GlassCockpit.etp'
configuration: 'Standalone'
build: true
- name: "Upload folder to artifacts"
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./model/scade-suite/Standalone/standalone
retention-days: 7
if-no-files-found: error
release:
name: "Release project"
runs-on: ubuntu-latest
needs: [standalone-executable, doc-build]
steps:
- name: "Download HTML documentation"
uses: actions/download-artifact@v4
with:
name: documentation-html
path: documentation-html
- name: "Zip HTML documentation"
uses: vimtor/[email protected]
with:
files: documentation-html
dest: documentation-html.zip
- name: "Download PDF documentation"
uses: actions/download-artifact@v4
with:
name: documentation-pdf
path: documentation-pdf
- name: "Zip PDF documentation"
uses: vimtor/[email protected]
with:
files: documentation-pdf
dest: documentation-pdf.zip
- name: "Download Standalone"
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}
- name: "Zip Standalone"
uses: vimtor/[email protected]
with:
files: ${{ env.ARTIFACT_NAME }}
dest: ${{ env.ARTIFACT_NAME }}.zip
- name: "Display the structure of downloaded files"
shell: bash
run: ls -R
- name: "Release to GitHub"
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
documentation-html.zip
documentation-pdf.zip
${{ env.ARTIFACT_NAME }}.zip
doc-deploy-stable:
name: "Deploy stable documentation"
runs-on: ubuntu-latest
needs: [release]
steps:
- uses: ansys/actions/doc-deploy-stable@v10
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}