Skip to content

Commit

Permalink
build in container
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Aug 31, 2024
1 parent 2439dda commit e0f0286
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ jobs:
- pre-commit
with:
kind: "${{ inputs.kind }}"
cmd: "${{ inputs.package_command }}"
cmd: python -m build
#cmd: "${{ inputs.package_command }}"

test:
name: Test
Expand Down
55 changes: 37 additions & 18 deletions .github/workflows/package-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,57 @@ jobs:
build:
name: Build Python Wheel
runs-on: ubuntu-latest
container:
image: debian:11
# volumes:
# - ${{ github.workspace }}:/src
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Install pypa/pkginffo
# - name: Set up Python 3.10
# uses: actions/setup-python@v4
# with:
# python-version: "3.10"

- name: Update Apt
run: >-
python -m
pip install
pkginfo
--user
apt-get update
- name: Install dependencies
run: >-
sudo apt-get install -y gcc python3
apt-get install -y gcc python3
python3-pip python3-venv flex make
texinfo unzip help2man gawk libtool-bin libncurses5-dev
bison wget rsync
bison wget rsync git
# - name: Change dir to source directory
# run: |
# cd /src

- name: Create virtualenv
run: >-
python3 -m venv venv
- name: Activate virtualenv
run: |
. venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Install python deps to venv
run: >-
pip install build wheel setuptools
- name: List directory
run: |
ls -lah .
- name: Echo Build Wheel Command
run: echo "${{ inputs.cmd }}"

- name: Build Wheel
run: "${{ inputs.cmd }}"
run: |
${{ inputs.cmd }}
- name: Python Build Artifact
uses: actions/upload-artifact@v3
Expand All @@ -67,6 +85,7 @@ jobs:
name: dist
path: dist/*
retention-days: 5

- name: Read Version
run: >-
python3
Expand Down

0 comments on commit e0f0286

Please sign in to comment.