Giter Site home page Giter Site logo

debian-package-build-action's People

Contributors

angusjfw avatar jcapona avatar m-roberts avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

debian-package-build-action's Issues

Rework as shell-based `action.yml`

Example (https://github.com/casperdcl/deploy-pypi/blob/master/action.yml):

name: PyPI Deployment
author: Casper da Costa-Luis
description: Securely build and upload Python distributions to PyPI
inputs:
  user:
    description: PyPI username
    required: false
    default: __token__
  password:
    description: PyPI password or API token
    required: true
  requirements:
    description: Build requirements
    required: false
    default: twine wheel
  build:
    description: '`setup.py` command to run ("true" is a shortcut for "clean sdist -d <dist_dir> bdist_wheel -d <dist_dir>")'
    required: false
    default: false
  pip:
    description: '`pip` command to run ("true" is a shortcut for "wheel -w <dist_dir> --no-deps .")'
    required: false
    default: false
  check:
    description: Whether to run basic checks on the built files
    required: false
    default: true
  upload:
    description: Whether to upload
    required: false
    default: true
  dist_dir:
    description: Directory containing distributions
    required: false
    default: dist
  url:
    description: Destination repository (package index) URL
    required: false
    default: ''
  gpg_key:
    description: GPG key to import for signing
    required: false
    default: ''
  skip_existing:
    description: Continue uploading files if one already exists
    required: false
    default: false
outputs:
  whl:
    description: Basename of *.whl for upload
    value: ${{ steps.upload.outputs.whl }}
  targz:
    description: Basename of *.tar.gz for upload
    value: ${{ steps.upload.outputs.targz }}
  whl_asc:
    description: Basename of *.whl.asc for upload (requires <gpg_key>)
    value: ${{ steps.upload.outputs.whl_asc }}
  targz_asc:
    description: Basename of *.tar.gz.asc for upload (requires <gpg_key>)
    value: ${{ steps.upload.outputs.targz_asc }}
runs:
  using: composite
  steps:
    - name: build
      run: |
        if [[ -n "$INPUT_REQUIREMENTS" && "$INPUT_BUILD$INPUT_PIP" != falsefalse ]]; then
          python -m pip install $INPUT_REQUIREMENTS
        fi
        if [[ "$INPUT_PIP" == wheel* ]]; then
          python -m pip $INPUT_PIP
        elif [[ "$INPUT_PIP" == true ]]; then
          python -m pip wheel -w "$INPUT_DIST_DIR" --no-deps .
        fi
        if [[ "$INPUT_BUILD" == *build* || "$INPUT_BUILD" == *dist* || "$INPUT_BUILD" == *clean* ]]; then
          python setup.py $INPUT_BUILD
        elif [[ "$INPUT_BUILD" == true ]]; then
          python setup.py sdist -d "$INPUT_DIST_DIR" bdist_wheel -d "$INPUT_DIST_DIR"
        fi
      shell: bash
      env:
        INPUT_REQUIREMENTS: ${{ inputs.requirements }}
        INPUT_BUILD: ${{ inputs.build }}
        INPUT_PIP: ${{ inputs.pip }}
        INPUT_DIST_DIR: ${{ inputs.dist_dir }}
    - name: check
      run: |
        if [[ "$INPUT_CHECK" == true ]]; then
          python -m twine check "${INPUT_DIST_DIR%%/}"/*
        fi
      shell: bash
      env:
        INPUT_DIST_DIR: ${{ inputs.dist_dir }}
        INPUT_CHECK: ${{ inputs.check }}
    - id: upload
      name: upload
      run: |
        DIST="${INPUT_DIST_DIR%%/}"
        if [[ "$INPUT_UPLOAD" == true ]]; then
          TWINE_OPTS=""
          if [[ -n "$INPUT_GPG_KEY" ]]; then
            gpg --import <(echo "$INPUT_GPG_KEY")
            TWINE_OPTS="$TWINE_OPTS -s --sign-with gpg"
          fi
          if [[ "$INPUT_SKIP_EXISTING" == true ]]; then
            TWINE_OPTS="$TWINE_OPTS --skip-existing"
          fi
          python -m twine upload $TWINE_OPTS "${DIST}"/*
        fi
        pushd "$DIST"
        echo "::set-output name=whl::$(ls *.whl || :)"
        echo "::set-output name=whl_asc::$(ls *.whl.asc || :)"
        echo "::set-output name=targz::$(ls *.tar.gz || :)"
        echo "::set-output name=targz_asc::$(ls *.tar.gz.asc || :)"
        popd
      shell: bash
      env:
        INPUT_UPLOAD: ${{ inputs.upload }}
        INPUT_DIST_DIR: ${{ inputs.dist_dir }}
        INPUT_GPG_KEY: ${{ inputs.gpg_key }}
        INPUT_SKIP_EXISTING: ${{ inputs.skip_existing }}
        TWINE_REPOSITORY_URL: ${{ inputs.url }}
        TWINE_USERNAME: ${{ inputs.user }}
        TWINE_PASSWORD: ${{ inputs.password }}
branding:
  icon: upload-cloud
  color: blue

Installing dependencies fails with default docker image debian:stable

Using the default settings:

    - name: Build Debian package
      uses: pi-top/debian-package-build-action@master
      with:
        target_architecture: amd64
        docker_image: debian:stable
        build_directory: artifacts

the build process is failing because debian:stable doesn't contain sudo.

Installing dependencies
  /usr/bin/docker exec deb-builder sudo apt-get update
  OCI runtime exec failed: exec failed: unable to start container process: exec: "sudo": executable file not found in $PATH: unknown
  Error: The process '/usr/bin/docker' failed with exit code 126

Speed up builds with lots of dependencies

Currently, we copy all files in src to another directory to work on. This takes a long time if there are a lot of dependencies (such as with node_modules directory).

We should look at if we want to remove it, symlink it, or something else that will enable this to be completed faster.

Review pi-top repository

AFAICT, the pi-top repo is only needed for build dependencies that are not available for Debian or Raspberry Pi.
qtwebengine5-dev is needed for web-renderer and is not available on RPi OS, but IS available for ARM via Debian.
This means that we likely don't need to include ourselves as a source!

Separate Lintian from deb build Docker image

When Bullseye is released, we want to perform all package builds on the same distribution as their target. Currently we are ahead to benefit from improved syntax (thanks to debhelper-compat).

However, lintian can always be run on unstable (i.e. latest releases) to benefit from the latest packaging information.
This can probably be run as a whalebrew image or similar, as it can easily run on its own.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.