Skip to content

EMBArk default installation on Ubuntu #1002

EMBArk default installation on Ubuntu

EMBArk default installation on Ubuntu #1002

name: EMBArk default installation on Ubuntu
on:
schedule:
- cron: '0 0 * * *' # do it every day
# push:
# branches:
# - '**' # matches every branch
# pull_request:
# branches:
# - '**'
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
jobs:
default-install:
if: github.repository_owner == 'e-m-b-a'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: true
- name: Restore cached Docker images
id: docker-cache-restore
uses: actions/cache@v3
with:
path: docker-cache/images.tar
key: embark-docker-images-${{ hashFiles('docker-compose.yml') }}
- name: Load Docker images from cache
if: steps.docker-cache-restore.outputs.cache-hit == 'true'
run: |
docker load -i docker-cache/images.tar
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Set env for .venv in project
run: echo "PIPENV_VENV_IN_PROJECT=1" >> $GITHUB_ENV
- name: Install Pipenv
run: pip install --upgrade pipenv
- name: Restore Pipenv cache
id: pipenv-cache
uses: actions/cache@v3
with:
path: .venv
key: pipenv-${{ hashFiles('Pipfile.lock') }}
# Note: This has to be executed with retries, as network errors might occur (e.g. the github runner being rate limited)
- name: Install cacheable dependencies
if: steps.pipenv-cache.outputs.cache-hit != 'true'
uses: Wandalen/wretry.action@master
with:
command: pipenv install --deploy --ignore-pipfile --dev
attempt_limit: 3
# Note: Needed for e.g. secret generation
- name: Install non-cacheable dependencies
run: pip install django
# Note: Needed as otherwise sudo might use a different python version (new tty -> fresh PATH variable)
- name: Point sudo python/pip to installed version
run: |
sudo ln -sf $(which python) /usr/local/bin/python
sudo ln -sf $(which python) /usr/local/bin/python3
sudo ln -sf $(which pip) /usr/local/bin/pip
sudo ln -sf $(which pipenv) /usr/local/bin/pipenv
- name: EMBArk default install
run: sudo ./installer.sh -sd
- name: Save Docker images to cache
if: steps.docker-cache-restore.outputs.cache-hit != 'true'
run: |
images=$(grep 'image:' docker-compose.yml | awk '{ print $2 }')
mkdir -p docker-cache
docker save $images -o docker-cache/images.tar
- name: Download example binary
run: |
sudo apt-get update
sudo apt-get install wget
wget https://ftp.dlink.de/dir/dir-300/archive/driver_software/DIR-300_fw_revb_214b01_ALL_de_20130206.zip
- name: EMBArk default tests
run: echo "TODO" #