Skip to content

Commit

Permalink
ci(ci-fix): setup windows build requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanzyTHEbar authored Jul 30, 2023
1 parent 5af4fed commit e4fa6d1
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ permissions:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -39,20 +42,33 @@ jobs:
virtualenvs-in-project: true
installer-parallel: true

- name: Install python dependencies (Linux)
if: ${{ matrix.os == 'ubuntu-latest'}}
run: poetry install
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install python dependencies (Windows)
if: ${{ matrix.os == 'windows-latest'}}
run: |
cd C:\Users\runneradmin\.local\bin
poetry install
- name: Install python dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install

- name: Install Linux dependencies
if: ${{ matrix.os == 'ubuntu-latest'}}
run: sudo apt install build-essential curl wget libssl-dev

- run: source $VENV

- name: Build Backend
run: poetry run pyinstaller --noconfirm ETVR.spec TrackingBackend/main.py

Expand Down

0 comments on commit e4fa6d1

Please sign in to comment.