Trying to fix action. Try 8/∞. #9
Workflow file for this run
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: Jaba build | |
on: | |
push: | |
paths: | |
- '.github/**.yml' | |
- '**.py' | |
- '**.png' | |
- 'requirements.txt' | |
- '**.omegapog_map_file_type_MLG_1337_228_100500_69_420' | |
pull_request: | |
types: [opened] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] | |
runs-on: ${{matrix.os}} | |
name: ${{matrix.os}} Build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install pygame dependencies | |
run: > | |
sudo apt update && | |
sudo apt install -y | |
libsdl2-dev | |
libsdl2-image-dev | |
libsdl2-mixer-dev | |
libsdl2-ttf-dev | |
libfreetype6-dev | |
libportmidi-dev | |
libjpeg-dev | |
python3-dev | |
if: runner.os == 'Linux' | |
- name: Install installer | |
run: python -m pip install pyinstaller | |
- name: Install compiler | |
run: > | |
Invoke-WebRequest -UseBasicParsing -Uri https://aka.ms/vs/17/release/vs_BuildTools.exe | |
-OutFile .\vs_BuildTools.exe && | |
Start-Process -Wait .\vs_BuildTools.exe -ArgumentList | |
"--quiet", "--nocache", "--wait", "--norestart", "--add", | |
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64" | |
if: runner.os == 'Windows' | |
- name: Build project | |
run: pip install -v . | |
- name: Build | |
run: > | |
pyinstaller -y -w --contents-directory . | |
--add-data "lang:lang" | |
--add-data "map_levels:map_levels" | |
--add-data "fonts:fonts" | |
--add-data "sprites:sprites" | |
--add-data "palettes:palettes" | |
--add-data "jaba_is_logo.png:." | |
--add-data "saves:saves" | |
--add-data "levels:levels" | |
main.py | |
- name: Create tarball # We are creating tar because of .so soft links to pygame.libs | |
if: runner.os == 'Linux' | |
run: tar cf ../../build.tar * | |
working-directory: ./dist/main | |
- name: Send Linux ${{matrix.os}} artifact | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
name: build-${{matrix.os}} | |
path: build.tar | |
- name: Send Windows ${{matrix.os}} artifact | |
uses: actions/upload-artifact@v4 | |
if: runner.os != 'Linux' | |
with: | |
name: build-${{matrix.os}} | |
path: dist/main |