Skip to content

Commit

Permalink
Merge pull request #35 from tekktrik/dev/update
Browse files Browse the repository at this point in the history
Add ignore argument, update actions
  • Loading branch information
dhalbert authored Feb 13, 2024
2 parents a2d4368 + 169a377 commit 04ef714
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set up Python 3.x (Latest)
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Checkout current repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
show-progress: false
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
Expand Down
31 changes: 27 additions & 4 deletions build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ inputs:
for GitHub releases
required: true
default: ""
ignore-bundles:
description: |
A comma and space separated list of bundles to be skipped when building.
Valid options are py, mpy, example, and json. For example, to skip
building the MPY and example bundles, this field would be: mpy, example
required: true
default: ""
runs:
using: "composite"
steps:
Expand All @@ -28,20 +35,22 @@ runs:
tr '_' '-'
) >> $GITHUB_OUTPUT
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Versions
shell: bash
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
show-progress: false
- name: Checkout tools repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false
repository: adafruit/actions-ci-circuitpython-libs
path: actions-ci
- name: Install dependencies
Expand Down Expand Up @@ -82,9 +91,23 @@ runs:
else
echo prefix-arg="--package_folder_prefix ${{ inputs.package-prefix }}" >> $GITHUB_OUTPUT
fi
- name: Add the given bundle ignores
id: ignore-bundles-arg
shell: bash
run: |
if [ "${{ inputs.ignore-bundles }}" == "" ]; then
echo ignore-bundles="" >> $GITHUB_OUTPUT
else
echo ignore-bundles='--ignore "${{ inputs.ignore-bundles }}"' >> $GITHUB_OUTPUT
fi
- name: Build assets
shell: bash
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . ${{ steps.package-prefix-arg.outputs.prefix-arg }}
run: |
circuitpython-build-bundles \
--filename_prefix ${{ steps.repo-name.outputs.repo-name }} \
--library_location . \
${{ steps.package-prefix-arg.outputs.prefix-arg }} \
${{ steps.ignore-bundles-arg.outputs.prefix-arg }}
- name: Archive bundles
uses: actions/upload-artifact@v3
with:
Expand Down
8 changes: 5 additions & 3 deletions release-gh/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,22 @@ runs:
tr '_' '-'
) >> $GITHUB_OUTPUT
- name: Set up requested Python version
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Versions
shell: bash
run: |
python3 --version
- name: Checkout Current Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
show-progress: false
- name: Checkout tools repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false
repository: adafruit/actions-ci-circuitpython-libs
path: actions-ci
- name: Install deps
Expand Down
6 changes: 4 additions & 2 deletions release-pypi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
show-progress: false
- name: Check For pyproject.toml
id: need-pypi
shell: bash
run: |
echo pyproject-toml=$( find . -wholename './pyproject.toml' ) >> $GITHUB_OUTPUT
- name: Set up Python
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
Expand Down

0 comments on commit 04ef714

Please sign in to comment.