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

Add ignore argument, update actions #35

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ 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
tekktrik marked this conversation as resolved.
Show resolved Hide resolved
- name: Install pre-commit
Expand Down
29 changes: 25 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,19 +35,19 @@ 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
tekktrik marked this conversation as resolved.
Show resolved Hide resolved
- name: Checkout tools repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: adafruit/actions-ci-circuitpython-libs
tekktrik marked this conversation as resolved.
Show resolved Hide resolved
path: actions-ci
Expand Down Expand Up @@ -82,9 +89,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
6 changes: 3 additions & 3 deletions release-gh/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ 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
tekktrik marked this conversation as resolved.
Show resolved Hide resolved
- name: Checkout tools repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: adafruit/actions-ci-circuitpython-libs
tekktrik marked this conversation as resolved.
Show resolved Hide resolved
path: actions-ci
Expand Down
4 changes: 2 additions & 2 deletions release-pypi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
tekktrik marked this conversation as resolved.
Show resolved Hide resolved
- 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