Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD with github actions #136

Open
3 of 8 tasks
armoha opened this issue Sep 4, 2024 · 0 comments
Open
3 of 8 tasks

CI/CD with github actions #136

armoha opened this issue Sep 4, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@armoha
Copy link
Owner

armoha commented Sep 4, 2024

Python

See https://github.com/pyca/cryptography/issues/11548

  • eudplib
  • euddraft uses cx_freeze: See https://github.com/marcelotduarte/cx_Freeze/issues/1410#issuecomment-1851323175
name: Build app

on:
  release:
    types: [created]
  workflow_dispatch:

jobs:
  build_exe:
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
    name: Build app on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
    steps:

      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          cache: 'pip'
          python-version: '3.11'

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install --upgrade cx_Freeze
          # if you have a requirements file
          # pip install -r requirements.txt

      - name: Freeze app
        run: |
          if [[ ${{ matrix.os }} == macos-* ]]; then
            python setup.py bdist_mac
          elif [[ ${{ matrix.os }} == windows-* ]]; then
            python setup.py bdist_msi
          else
            # python setup.py bdist_appimage
            python setup.py build
          fi
          

      - name: Upload executable
        if: ${{ always() }}
        uses: actions/upload-artifact@v3
        with:
          name: app-${{ matrix.os }}
          path: build/**
          if-no-files-found: ignore

C/C++: CMake (Linux) or Visual Studio solutions

For MSVC, github manages Windows Server 2022 host: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md

  • StormLib: has binary releases for Windows

C/C++: CMake & pybind11

See https://pybind11.readthedocs.io/en/stable/compiling.html

  • freeze mpqprt
  • libepScript.dll

Rust: pyo3

  • eudplib extensions

Upload and download artifacts

https://github.com/dawidd6/action-download-artifact
공식 액션 actions/download-artifact은 다른 워크플로에서 업로드한 파일을 다운 받는게 안 된다.
dawidd6/action-download-artifact 을 사용해야 build와 publish를 분리할 수 있다.

      - uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
        with:
    # Optional, a directory where to extract artifact(s), defaults to the current directory
          path: dist/
    # Optional, will use specified workflow run
    # use ${{ github.event.workflow_run.id }} when your action runs in a workflow_run event
    # and wants to download from the triggering workflow run
          run_id: ${{ github.event.inputs.run_id || github.event.workflow_run.id }}
@armoha armoha added enhancement New feature or request help wanted Extra attention is needed labels Sep 4, 2024
@armoha armoha pinned this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant