mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-30 01:04:13 +01:00
119 lines
3.2 KiB
YAML
119 lines
3.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
release:
|
|
types:
|
|
- created
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# build-fw-hw-sw:
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
# - name: Git checkout
|
|
# uses: actions/checkout@v3
|
|
|
|
# - name: Build script
|
|
# run: ./docker_build.sh release --force-clean
|
|
|
|
# - name: Upload artifact
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: SC64
|
|
# path: SC64.zip
|
|
|
|
# - name: Upload release assets
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# uses: softprops/action-gh-release@v0.1.15
|
|
# with:
|
|
# files: |
|
|
# SC64.zip
|
|
# sc64_firmware.bin
|
|
|
|
build-apps:
|
|
strategy:
|
|
matrix:
|
|
# os: [windows-latest, ubuntu-latest, macos-latest]
|
|
# os: [ubuntu-latest]
|
|
os: [windows-latest]
|
|
include:
|
|
- os: windows-latest
|
|
pyinstaller-options: --console --icon ../../assets/sc64_logo_256_256.png
|
|
package-name: sc64-windows
|
|
package-options: -c -a -f
|
|
package-extension: zip
|
|
|
|
# - os: ubuntu-latest
|
|
# package-name: sc64-linux
|
|
# package-options: -czf
|
|
# package-extension: tgz
|
|
|
|
# - os: macos-latest
|
|
# pyinstaller-options: --console --icon ../../assets/sc64_logo_256_256.png
|
|
# package-name: sc64-macos
|
|
# package-options: -czf
|
|
# package-extension: tgz
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Git checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Download pyinstaller repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'pyinstaller/pyinstaller'
|
|
ref: 'v5.8.0'
|
|
path: pyinstaller
|
|
|
|
- name: Compile and install pyinstaller
|
|
run: |
|
|
pushd bootloader
|
|
python3 ./waf all
|
|
popd
|
|
python3 setup.py install
|
|
working-directory: pyinstaller
|
|
|
|
- name: Install python requirements
|
|
run: pip install -r requirements.txt
|
|
working-directory: sw/pc
|
|
# env:
|
|
# PYINSTALLER_COMPILE_BOOTLOADER: true
|
|
|
|
- name: Create sc64 executable
|
|
run: python3 -m PyInstaller --clean --onefile ${{ matrix.pyinstaller-options }} sc64.py
|
|
working-directory: sw/pc
|
|
|
|
- name: Package executable
|
|
run: |
|
|
mkdir package
|
|
pushd dist
|
|
tar ${{ matrix.package-options }} ../package/${{ matrix.package-name }}.${{ matrix.package-extension }} *
|
|
popd
|
|
working-directory: sw/pc
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.package-name }}
|
|
path: sw/pc/package/${{ matrix.package-name }}.${{ matrix.package-extension }}
|
|
|
|
# - name: Upload release assets
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# uses: softprops/action-gh-release@v0.1.15
|
|
# with:
|
|
# files: sw/pc/package/${{ matrix.package-name }}.${{ matrix.package-extension }}
|