This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
[task_06] Add task 06 (#125) #765
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: 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" |