Update actions cache #80
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: Build | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
Build-PC: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022, ubuntu-22.04, ubuntu-20.04, macos-12] | |
steps: | |
- name: Obtain latest version of the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install requirements with PIP | |
run: pip install --break-system-packages -r requirements.txt | |
- name: Install pyinstaller | |
run: pip install --break-system-packages pyinstaller | |
- name: Build RiiTag RPC | |
run: pyinstaller riitag-rpc.spec | |
- name: Mark as executable | |
if: ${{ matrix.os != 'windows-2022' }} | |
run: chmod -R +x dist/ | |
- name: Publish Build Artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{ matrix.os }}-x64 | |
path: dist | |
Build-RPI: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
target: [rpi_4b_aarch64] | |
include: | |
- target: rpi_4b_aarch64 | |
cpu: cortex-a53 | |
cpu_info: cpuinfo/raspberrypi_4b | |
base_image: raspios_lite_arm64:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Raspberry pi release | |
uses: pguyot/arm-runner-action@v2 | |
with: | |
base_image: ${{ matrix.base_image }} | |
cpu: ${{ matrix.cpu }} | |
cpu_info: ${{ matrix.cpu_info }} | |
bind_mount_repository: true | |
commands: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip | |
pip3 install --break-system-packages -r requirements.txt | |
pip3 install --break-system-packages pyinstaller | |
pyinstaller riitag-rpc.spec | |
chmod +x -R dist/ | |
- name: Publish Build Artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: rpi-4b-aarch64 | |
path: dist |