diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 3ebcbde..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build - -on: - push: - branches: - - 'develop' - -jobs: - build: - name: Build packages - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: macos-latest - TARGET: macos - CMD_BUILD: > - pyinstaller -F -w -n ledeffect-simulator -p .. app.py && - cd dist/ && - zip -r9 ledeffect-simulator ledeffect-simulator.app - OUT_FILE_NAME: ledeffect-simulator.zip - ASSET_MIME: application/zip - POETRY_FOLDER: ~/.local - - os: windows-latest - TARGET: windows - CMD_BUILD: pyinstaller -F -w -n ledeffect-simulator -p .. app.py - OUT_FILE_NAME: ledeffect-simulator.exe - ASSET_MIME: application/vnd.microsoft.portable-executable - POETRY_FOLDER: C:\Users\runneradmin\.local - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: 3.9 - #- name: cache poetry install - # uses: actions/cache@v3 - # with: - # path: ${{matrix.POETRY_FOLDER}} - # key: poetry-1.3.3-0 - - uses: snok/install-poetry@v1.3.3 - with: - virtualenvs-create: true - virtualenvs-in-project: true - - name: cache deps - id: cache-deps - uses: actions/cache@v3 - with: - path: simulator/.venv - key: pydeps-${{ hashFiles('**/poetry.lock') }} - - - name: Install environment - working-directory: ./simulator - run: ${{matrix.POETRY_FOLDER}}/bin/poetry install --no-interaction --no-root - if: steps.cache-deps.outputs.cache-hit != 'true' - - name: Install root environment - working-directory: ./simulator - run: ${{matrix.POETRY_FOLDER}}/bin/poetry install --no-interaction - - name: Build with pyinstaller for ${{matrix.TARGET}} - working-directory: ./simulator - run: ${{matrix.POETRY_FOLDER}}/bin/poetry run ${{matrix.CMD_BUILD}} - - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 - with: - name: ledeffect-simulator_${{matrix.TARGET}} - path: simulator/dist/${{matrix.OUT_FILE_NAME}} - diff --git a/.github/workflows/build_pages.yaml b/.github/workflows/build_pages.yaml new file mode 100644 index 0000000..1cf4250 --- /dev/null +++ b/.github/workflows/build_pages.yaml @@ -0,0 +1,62 @@ +name: pages +on: + push: + +env: + PYTHON_VERSION: 3.x + NODE_VERSION: latest + +permissions: + contents: write + id-token: write + pages: write + +jobs: + pages: + name: Build pages + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Node runtime + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: packages/web_simulator/package-lock.json + + - name: Install poetry + run: pip install poetry + + - name: Set up Python runtime + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: poetry + + - name: Install python dependencies + run: | + cd ${{ github.workspace }}/packages/led_effect + poetry install + cd ${{ github.workspace }}/packages/klippermock + poetry install + + - name: Install node dependencies + working-directory: packages/web_simulator + run: npm ci + + - name: Build web_simulator + working-directory: packages/web_simulator + run: npm run build + + - name: Upload to GitHub Pages + uses: actions/upload-pages-artifact@v3 + with: + path: packages/web_simulator/dist/ + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 8a136f6..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,104 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*' - -jobs: - createrelease: - name: Create Release - runs-on: [ubuntu-latest] - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: true - prerelease: true - - name: Output Release URL File - run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt - - name: Save Release URL File for publish - uses: actions/upload-artifact@v1 - with: - name: release_url - path: release_url.txt - - build: - name: Build packages - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: macos-latest - TARGET: macos - CMD_BUILD: > - pyinstaller -F -w -n ledeffect-simulator-macos -p .. app.py && - cd dist/ && - zip -r9 ledeffect-simulator-macos ledeffect-simulator-macos.app - OUT_FILE_NAME: ledeffect-simulator-macos.zip - ASSET_MIME: application/zip - POETRY_FOLDER: ~/.local - - os: windows-latest - TARGET: windows - CMD_BUILD: pyinstaller -F -w -n ledeffect-simulator-win -p .. app.py - OUT_FILE_NAME: ledeffect-simulator-win.exe - ASSET_MIME: application/vnd.microsoft.portable-executable - POETRY_FOLDER: C:\Users\runneradmin\.local - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: 3.9 - #- name: cache poetry install - # uses: actions/cache@v3 - # with: - # path: ${{matrix.POETRY_FOLDER}} - # key: poetry-1.3.3-0 - - uses: snok/install-poetry@v1.3.3 - with: - virtualenvs-create: true - virtualenvs-in-project: true - - name: cache deps - id: cache-deps - uses: actions/cache@v3 - with: - path: simulator/.venv - key: pydeps-${{ hashFiles('**/poetry.lock') }} - - - name: Install environment - working-directory: ./simulator - run: ${{matrix.POETRY_FOLDER}}/bin/poetry install --no-interaction --no-root - if: steps.cache-deps.outputs.cache-hit != 'true' - - name: Install root environment - working-directory: ./simulator - run: ${{matrix.POETRY_FOLDER}}/bin/poetry install --no-interaction - - name: Build with pyinstaller for ${{matrix.TARGET}} - working-directory: ./simulator - run: ${{matrix.POETRY_FOLDER}}/bin/poetry run ${{matrix.CMD_BUILD}} - - name: Load Release URL File from release job - uses: actions/download-artifact@v1 - with: - name: release_url - - name: Get Release File Name & Upload URL - id: get_release_info - shell: bash - run: | - value=`cat release_url/release_url.txt` - echo ::set-output name=upload_url::$value - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: simulator/dist/${{matrix.OUT_FILE_NAME}} - asset_name: ${{ matrix.OUT_FILE_NAME}} - asset_content_type: ${{ matrix.ASSET_MIME}} - diff --git a/packages/klippermock/poetry.lock b/packages/klippermock/poetry.lock index 98ac214..0371d7e 100644 --- a/packages/klippermock/poetry.lock +++ b/packages/klippermock/poetry.lock @@ -1,7 +1,19 @@ # This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. -package = [] + +[[package]] +name = "led-effect" +version = "0.1.0" +description = "" +optional = false +python-versions = "<3.12,>=3.8" +files = [] +develop = true + +[package.source] +type = "directory" +url = "../led_effect" [metadata] lock-version = "2.0" python-versions = "<3.12,>=3.8" -content-hash = "5c2950c6a263c4c1566a5a6677f7a252eda96ec3f8e6208076f6ed7e4938535a" +content-hash = "a6d0b8e0a4d404ebaf726d03da83a034e4d1ea4430ec41e45050c419b5552060"