Skip to content

Commit

Permalink
Update Ubuntu CI
Browse files Browse the repository at this point in the history
Runs on latest ubuntu
Tests various python versions
Uses dependency caching
  • Loading branch information
jaagut committed May 17, 2022
1 parent 483a7e8 commit 4e22ec6
Showing 1 changed file with 35 additions and 26 deletions.
61 changes: 35 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,51 @@ on: [push, pull_request, workflow_dispatch]

jobs:
main:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
outputs:
output_python_version: ${{ steps.setup_python.outputs.python-version }}
output_cache_hit: ${{ steps.setup_python.outputs.cache-hit }}
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Upgrade pip
run: python3 -m pip install --upgrade pip

- name: Install Poetry
run: pip3 install poetry --user

- name: Install Dependencies
run: poetry install
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
id: setup_python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: poetry install

# Prints the help pages of all scripts to see if the imports etc. work
- name: Test the help pages
run: |
poetry run yolo-train -h
poetry run yolo-test -h
poetry run yolo-detect -h
poetry run yoeo-train -h
poetry run yoeo-test -h
poetry run yoeo-detect -h
# - name: Demo Training
# run: poetry run yoeo-train --data config/custom.data --model config/yolov3.cfg --epochs 30

- name: Demo Training
run: poetry run yolo-train --data config/custom.data --model config/yolov3.cfg --epochs 30
# - name: Demo Evaluate
# run: poetry run yoeo-test --data config/custom.data --model config/yolov3.cfg --weights checkpoints/yolov3_ckpt_29.pth

- name: Demo Evaluate
run: poetry run yolo-test --data config/custom.data --model config/yolov3.cfg --weights checkpoints/yolov3_ckpt_29.pth
# - name: Demo Detect
# run: poetry run yoeo-detect --batch_size 2 --weights checkpoints/yolov3_ckpt_29.pth

echo-results:
runs-on: ubuntu-latest
needs: main
steps:
- run: echo ${{needs.main.outputs.output_python_version}} ${{needs.main.outputs.output_cache_hit}}

- name: Demo Detect
run: poetry run yolo-detect --batch_size 2 --weights checkpoints/yolov3_ckpt_29.pth

linter:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Expand Down

0 comments on commit 4e22ec6

Please sign in to comment.