Merge main into sweep/add-authentication-system #4459
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: Builds | |
on: | |
push: | |
paths: | |
- '.github/workflows/builds.yml' | |
- 'naruno/**' | |
- 'requirements/**' | |
- 'API.spec' | |
- 'CLI.spec' | |
- 'GUI-win32.spec' | |
- 'buildozer.spec' | |
- 'recipes/**' | |
pull_request: | |
paths: | |
- '.github/workflows/builds.yml' | |
- 'naruno/**' | |
- 'requirements/**' | |
- 'API.spec' | |
- 'CLI.spec' | |
- 'GUI-win32.spec' | |
- 'buildozer.spec' | |
- 'recipes/**' | |
release: | |
types: [published] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event }} | |
cancel-in-progress: true | |
jobs: | |
build-cli-linux: | |
runs-on: ubuntu-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('CLI.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
- name: PyInstaller | |
run: | | |
pyinstaller CLI.spec | |
- name: Zip | |
run: | | |
cd dist | |
zip -r cli_linux_naruno Naruno-CLI/ | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: cli_linux_naruno | |
path: dist/cli_linux_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/cli_linux_naruno.zip' | |
build-cli-macos: | |
runs-on: macos-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('CLI.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
- name: PyInstaller | |
run: | | |
pyinstaller CLI.spec | |
- name: Zip | |
run: | | |
cd dist | |
zip -r cli_macos_naruno Naruno-CLI/ | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: cli_macos_naruno | |
path: dist/cli_macos_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/cli_macos_naruno.zip' | |
build-cli-windows: | |
runs-on: windows-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('CLI.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
- name: PyInstaller | |
run: | | |
pyinstaller CLI.spec | |
- name: Zip | |
run: | | |
cd dist | |
Compress-Archive Naruno-CLI/ cli_win32_naruno.zip | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: cli_win32_naruno | |
path: dist/cli_win32_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/cli_win32_naruno.zip' | |
build-api-linux: | |
runs-on: ubuntu-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('API.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
python3 -m venv venv | |
source venv/bin/activate | |
pip3 install -r requirements/api.txt | |
- name: PyInstaller | |
run: | | |
pyinstaller API.spec | |
- name: Zip | |
run: | | |
cd dist | |
zip -r api_linux_naruno Naruno-API/ | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: api_linux_naruno | |
path: dist/api_linux_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/api_linux_naruno.zip' | |
build-api-macos: | |
runs-on: macos-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('API.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
python3 -m venv venv | |
source venv/bin/activate | |
pip3 install -r requirements/api.txt | |
- name: PyInstaller | |
run: | | |
pyinstaller API.spec | |
- name: Zip | |
run: | | |
cd dist | |
zip -r api_macos_naruno Naruno-API/ | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: api_macos_naruno | |
path: dist/api_macos_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/api_macos_naruno.zip' | |
build-api-windows: | |
runs-on: windows-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('API.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
python -m venv venv | |
venv\Scripts\activate.bat | |
pip3 install -r requirements/api.txt | |
- name: PyInstaller | |
run: | | |
pyinstaller API.spec | |
- name: Zip | |
run: | | |
cd dist | |
Compress-Archive Naruno-API/ api_win32_naruno.zip | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: api_win32_naruno | |
path: dist/api_win32_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/api_win32_naruno.zip' | |
build-gui-windows: | |
runs-on: windows-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('GUI-win32.spec') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip3 install pyinstaller==4.10 | |
pip3 install pyinstaller-hooks-contrib==2022.3 | |
python -m venv venv | |
venv\Scripts\activate.bat | |
pip3 install -r requirements/gui.txt | |
- name: PyInstaller | |
run: | | |
$env:KIVY_GL_BACKEND="angle_sdl2" | |
pyinstaller GUI-win32.spec | |
- name: Zip | |
run: | | |
cd dist | |
Compress-Archive Naruno-GUI/ gui_win32_naruno.zip | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: gui_win32_naruno | |
path: dist/gui_win32_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'dist/gui_win32_naruno.zip' | |
build-api-android: | |
runs-on: ubuntu-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/buildozer.txt') }}-${{ hashFiles('buildozer.spec') }}-"api_android" | |
- name: Setup environment | |
run: | | |
pip install -r requirements/buildozer.txt | |
- run: buildozer --help | |
- name: SDK, NDK and p4a download | |
run: | | |
sed -i.bak "s/# android.accept_sdk_license = False/android.accept_sdk_license = True/" buildozer.spec | |
sed -i.bak "s/#p4a.branch = master/p4a.branch = develop/" buildozer.spec | |
buildozer android p4a -- --help | |
- name: Install Linux dependencies | |
run: sudo apt -y install automake | |
- name: buildozer android debug | |
run: | | |
buildozer --profile api android debug | |
- name: Zip | |
run: sudo zip -r api_android_naruno bin | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: api_android_naruno | |
path: api_android_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'api_android_naruno.zip' | |
build-gui-android: | |
runs-on: ubuntu-latest | |
environment: Builds | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/buildozer.txt') }}-${{ hashFiles('buildozer.spec') }}-"gui_android" | |
- name: Setup environment | |
run: | | |
pip install -r requirements/buildozer.txt | |
- run: buildozer --help | |
- name: SDK, NDK and p4a download | |
run: | | |
sed -i.bak "s/# android.accept_sdk_license = False/android.accept_sdk_license = True/" buildozer.spec | |
sed -i.bak "s/#p4a.branch = master/p4a.branch = develop/" buildozer.spec | |
buildozer android p4a -- --help | |
- name: Install Linux dependencies | |
run: sudo apt -y install automake | |
- name: buildozer android debug | |
run: | | |
buildozer --profile gui android debug | |
- name: Zip | |
run: sudo zip -r gui_android_naruno bin | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gui_android_naruno | |
path: gui_android_naruno.zip | |
- uses: AButler/upload-release-assets@v2.0 | |
if: github.event_name == 'release' | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'gui_android_naruno.zip' |