Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt authored and jonathan hoffstadt committed May 20, 2024
1 parent 01ab43e commit 0849115
Show file tree
Hide file tree
Showing 50 changed files with 13,218 additions and 3,176 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
if not exist ../out/example_1.dll exit 1
if not exist ../out/example_2.dll exit 1
if not exist ../out/example_3.dll exit 1
if not exist ../out/example_4.dll exit 1
if not exist ../out/pilot_light.exe exit 1
if not exist ../out/pl_graphics_ext.dll exit 1
if not exist ../out/pl_image_ext.dll exit 1
Expand All @@ -65,7 +66,8 @@ jobs:
if not exist ../out/pl_model_loader_ext.dll exit 1
if not exist ../out/pl_ecs_ext.dll exit 1
if not exist ../out/pl_ref_renderer_ext.dll exit 1
if not exist ../out/pl_draw_3d_ext.dll exit 1
if not exist ../out/pl_draw_ext.dll exit 1
if not exist ../out/pl_ui_ext.dll exit 1
if not exist ../out/pilotlight.lib exit 1
- name: Package Pilot Light
Expand Down Expand Up @@ -117,6 +119,7 @@ jobs:
test -f ./out/example_1.dylib || exit 1
test -f ./out/example_2.dylib || exit 1
test -f ./out/example_3.dylib || exit 1
test -f ./out/example_4.dylib || exit 1
test -f ./out/pl_stats_ext.dylib || exit 1
test -f ./out/pl_image_ext.dylib || exit 1
test -f ./out/pl_debug_ext.dylib || exit 1
Expand All @@ -127,7 +130,8 @@ jobs:
test -f ./out/pl_resource_ext.dylib || exit 1
test -f ./out/pl_ecs_ext.dylib || exit 1
test -f ./out/pl_ref_renderer_ext.dylib || exit 1
test -f ./out/pl_draw_3d_ext.dylib || exit 1
test -f ./out/pl_draw_ext.dylib || exit 1
test -f ./out/pl_ui_ext.dylib || exit 1
test -f ./out/pilotlight.a || exit 1
- name: Package Pilot Light
Expand Down Expand Up @@ -192,6 +196,7 @@ jobs:
test -f ./out/example_1.so || exit 1
test -f ./out/example_2.so || exit 1
test -f ./out/example_3.so || exit 1
test -f ./out/example_4.so || exit 1
test -f ./out/pl_graphics_ext.so || exit 1
test -f ./out/pl_image_ext.so || exit 1
test -f ./out/pl_stats_ext.so || exit 1
Expand All @@ -202,7 +207,8 @@ jobs:
test -f ./out/pl_resource_ext.so || exit 1
test -f ./out/pl_ecs_ext.so || exit 1
test -f ./out/pl_ref_renderer_ext.so || exit 1
test -f ./out/pl_draw_3d_ext.so || exit 1
test -f ./out/pl_draw_ext.so || exit 1
test -f ./out/pl_ui_ext.so || exit 1
test -f ./out/pilotlight.a || exit 1
- name: Package Pilot Light
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/deploy-build-tool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Deploy Tools

on:

workflow_dispatch:

inputs:

version:
description: 'pilotlight_tools version'
required: true
default: '0.11.0'

deploy:
description: 'Deploy (true will deploy to pypi)'
required: true
default: 'false'

deploytest:
description: 'Deploy (true will deploy to test pypi)'
required: true
default: 'false'

jobs:

build-package:

runs-on: windows-2019
strategy:
matrix:
python-version: [ 3.9 ]

steps:

- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build package
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
echo ${{ github.event.inputs.version }} > version_number.txt
ren build pilotlight_build
cd pilotlight_build
cd ..
move pilotlight_build\deploy_setup.py deploy_setup.py
del setup.py
move deploy_setup.py setup.py
echo [build-system] >> pyproject.toml
echo requires = ["setuptools", "wheel"] >> pyproject.toml
echo build-backend = "setuptools.build_meta" >> pyproject.toml
python -m build
- uses: actions/upload-artifact@v4
with:
name: pltools wheel
path: |
${{ github.workspace }}/version_number.txt
${{ github.workspace }}/dist/*.whl
${{ github.workspace }}/dist/*.tar.gz
retention-days: 1
if-no-files-found: error

- name: PyPi Deployment
shell: cmd
if: ${{contains(github.event.inputs.deploy, 'true') && github.ref == 'refs/heads/master'}}
run: |
python -m pip install twine
python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing
- name: Test PyPi Deployment
shell: cmd
if: ${{contains(github.event.inputs.deploytest, 'true') && github.ref == 'refs/heads/master'}}
run: |
python -m pip install twine
python -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --skip-existing
Loading

0 comments on commit 0849115

Please sign in to comment.