Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

[task_02] Add task 02 (#127) #766

[task_02] Add task 02 (#127)

[task_02] Add task 02 (#127) #766

Workflow file for this run

name: run python
on:
push:
branches:
- main
pull_request_target:
types: [opened, synchronize, reopened, labeled]
jobs:
py_build:
runs-on: ubuntu-latest
if: ${{ (github.repository == 'brstu/GIIS-2024') && ((github.event_name == 'push') || ((github.event_name == 'pull_request_target') && ((contains( github.event.pull_request.labels.*.name, 'python'))))) }}
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- name: install python packages
run: |
python -m pip install --upgrade pip
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.15.x'
- name: write paths in file
run: |
cmake -DPY_LANGUAGE=ON . -B build
- name: install dependecies
run: |
while read -r path
do
pip install -r "$path"/requirements.txt
done < "python_path.txt"
- name: execute python script
run: |
while read -r path
do
python "$path"/main.py
done < "python_path.txt"