2022-08-23 17:13:16 +03:00
|
|
|
name: Linux Workflow
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
vmImage:
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-08-23 17:20:01 +03:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
vmImage:
|
|
|
|
description: VM Image to use
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
default: ubuntu-latest
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
LinuxPython:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-10-03 16:20:43 +03:00
|
|
|
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
|
2022-08-23 17:13:16 +03:00
|
|
|
|
2022-08-23 17:22:55 +03:00
|
|
|
runs-on: ${{inputs.vmImage}}
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
steps:
|
2022-08-24 12:32:00 +03:00
|
|
|
- name: Checkout
|
2024-10-03 16:20:43 +03:00
|
|
|
uses: actions/checkout@v4
|
2022-08-24 12:32:00 +03:00
|
|
|
|
|
|
|
- name: Use Python ${{matrix.python_version}}
|
2024-10-03 16:20:43 +03:00
|
|
|
uses: actions/setup-python@v5
|
2022-08-23 17:13:16 +03:00
|
|
|
with:
|
2022-08-24 12:32:00 +03:00
|
|
|
python-version: ${{matrix.python_version}}
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
sudo apt-get install doxygen
|
|
|
|
|
|
|
|
- name: NPM steps
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
- name: Python build
|
|
|
|
run: |
|
2024-10-03 16:20:43 +03:00
|
|
|
pip install -e .[dev] -v
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
- name: Python test
|
|
|
|
uses: pavelzw/pytest-action@v1
|
|
|
|
with:
|
|
|
|
verbose: true
|
2022-08-24 12:32:00 +03:00
|
|
|
job_summary: true
|
|
|
|
emoji: true
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
LinuxCPP:
|
2022-08-23 17:22:55 +03:00
|
|
|
runs-on: ${{inputs.vmImage}}
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
steps:
|
2022-08-24 12:32:00 +03:00
|
|
|
- name: Checkout
|
2024-10-03 16:20:43 +03:00
|
|
|
uses: actions/checkout@v4
|
2022-08-24 12:32:00 +03:00
|
|
|
|
2024-10-03 16:20:43 +03:00
|
|
|
- name: Use Python 3.11
|
|
|
|
uses: actions/setup-python@v5
|
2022-08-23 17:13:16 +03:00
|
|
|
with:
|
2024-10-03 16:20:43 +03:00
|
|
|
python-version: "3.11"
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
sudo apt-get install doxygen
|
|
|
|
|
|
|
|
- name: NPM steps
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
- name: CMake config
|
2022-08-24 12:32:00 +03:00
|
|
|
run: cmake -B ${{github.workspace}}/build -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSCENEPIC_BUILD_TESTS=1 -DSCENEPIC_BUILD_DOCUMENTATION=1
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
- name: CMake build
|
2022-08-24 12:32:00 +03:00
|
|
|
run: cmake --build ${{github.workspace}}/build --config Release --target cpp
|
2022-08-23 17:13:16 +03:00
|
|
|
|
|
|
|
- name: CMake test
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2022-08-24 12:32:00 +03:00
|
|
|
run: ctest -V --build-config Release --timeout 120 --output-on-failure -T Test
|