Skip to content

xlxs4 is running πŸš€ #33

xlxs4 is running πŸš€

xlxs4 is running πŸš€ #33

Workflow file for this run

name: CI
run-name: ${{ github.actor }} is running πŸš€
on: [push] # Triggered by push.
jobs:
ci:
strategy:
fail-fast: false # Don't fail all jobs if a single job fails.
matrix:
python-version: ["3.11"]
poetry-version: ["1.2.2"] # Poetry is used for project/dependency management.
os: [ubuntu-latest, macos-latest, windows-latest]
include: # Where pip stores its cache is OS-dependent.
- pip-cache-path: ~/.cache
os: ubuntu-latest
- pip-cache-path: ~/.cache
os: macos-latest
- pip-cache-path: ~\appdata\local\pip\cache
os: windows-latest
defaults:
run:
shell: bash # For sane consistent scripting throughout.
working-directory: ./hotbed-enclosure/temperature-control
runs-on: ${{ matrix.os }} # For each OS:
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: true
virtualenvs-in-project: true # Otherwise the venv will be the same across all OSes.
installer-parallel: true
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ${{ matrix.pip-cache-path }}
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root -E build -E format # https://github.com/python-poetry/poetry/issues/1227
- name: Check formatting
run: |
source $VENV
yapf -drp --no-local-style --style "facebook" temperature_control/
- name: Build for ${{ matrix.os }}
run: | # https://stackoverflow.com/questions/19456518/error-when-using-sed-with-find-command-on-os-x-invalid-command-code
source $VENV
pyi-makespec temperature_control/main.py
if [ "$RUNNER_OS" == "macOS" ]; then
sed -i '' -e '2 r add-files-to-spec' main.spec
sed -i '' -e 's/datas=\[]/datas=added_files/' main.spec
else
sed -i '2 r add-files-to-spec' main.spec
sed -i 's/datas=\[]/datas=added_files/' main.spec
fi
pyinstaller main.spec
- name: Archive binary artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-bundle
path: ./hotbed-enclosure/temperature-control/dist