Skip to content

Commit a7292da

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents d9d77e1 + 66ba7a7 commit a7292da

File tree

5 files changed

+43
-36
lines changed

5 files changed

+43
-36
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ jobs:
249249

250250

251251
build-doc:
252-
runs-on: ubuntu-20.04
252+
runs-on: ubuntu-22.04
253253
needs: test
254254
if: ${{ needs.test.outputs.build-doc == 'True' }}
255255
env:
@@ -324,7 +324,7 @@ jobs:
324324
325325
326326
build-aarch:
327-
runs-on: ubuntu-20.04
327+
runs-on: ubuntu-22.04
328328
needs: test
329329
if: ${{ needs.test.outputs.boards-aarch != '[]' }}
330330
env:
@@ -406,7 +406,7 @@ jobs:
406406

407407

408408
build-arm:
409-
runs-on: ubuntu-20.04
409+
runs-on: ubuntu-22.04
410410
needs: test
411411
if: ${{ needs.test.outputs.boards-arm != '[]' }}
412412
env:
@@ -476,7 +476,7 @@ jobs:
476476

477477

478478
build-espressif:
479-
runs-on: ubuntu-20.04
479+
runs-on: ubuntu-22.04
480480
needs: test
481481
if: ${{ needs.test.outputs.boards-espressif != '[]' }}
482482
env:
@@ -581,7 +581,7 @@ jobs:
581581

582582

583583
build-riscv:
584-
runs-on: ubuntu-20.04
584+
runs-on: ubuntu-22.04
585585
needs: test
586586
if: ${{ needs.test.outputs.boards-riscv != '[]' }}
587587
env:

.github/workflows/create_website_pr.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,47 @@ name: Update CircuitPython.org
66

77
on:
88
release:
9-
types: [published]
9+
types: [published, rerequested]
1010

1111
jobs:
1212
website:
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-22.04
1414
steps:
1515
- name: Dump GitHub context
16+
run: echo "$GITHUB_CONTEXT"
1617
env:
1718
GITHUB_CONTEXT: ${{ toJson(github) }}
18-
run: echo "$GITHUB_CONTEXT"
19-
- uses: actions/checkout@v3
19+
- name: Set up repository
20+
uses: actions/checkout@v3
2021
with:
2122
submodules: false
2223
fetch-depth: 1
23-
- name: Set up Python 3
24+
- name: Set up python
2425
uses: actions/setup-python@v4
2526
with:
2627
python-version: "3.x"
27-
- name: Get CP deps
28-
run: python tools/ci_fetch_deps.py website ${{ github.sha }}
29-
- name: Install deps
28+
- name: CircuitPython dependencies
29+
run: |
30+
python tools/ci_fetch_deps.py ${{ github.job }}
31+
echo "::group::Fetch history and tags"
32+
git fetch --no-recurse-submodules --shallow-since="2021-07-01" --tags https://github.com/adafruit/circuitpython HEAD
33+
git fetch --no-recurse-submodules --shallow-since="2021-07-01" origin $GITHUB_SHA
34+
git repack -d
35+
echo "::endgroup::"
36+
- name: CircuitPython version
3037
run: |
31-
pip install -r requirements-dev.txt
38+
CP_VERSION=$(tools/describe)
39+
echo "$CP_VERSION"
40+
echo "CP_VERSION=$CP_VERSION" >> $GITHUB_ENV
41+
- name: Install dependencies
42+
run: pip install -r requirements-dev.txt
3243
- name: Versions
3344
run: |
3445
gcc --version
3546
python3 --version
36-
- name: CircuitPython version
37-
run: |
38-
tools/describe || git log --parents HEAD~4..
39-
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
4047
- name: Website
4148
run: python3 build_board_info.py
4249
working-directory: tools
4350
env:
4451
RELEASE_TAG: ${{ github.event.release.tag_name }}
4552
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.ADABOT_GITHUB_ACCESS_TOKEN }}
46-
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

.github/workflows/ports_windows.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020

2121
jobs:
2222
build:
23-
runs-on: windows-2019
23+
runs-on: windows-2022
2424
defaults:
2525
run:
2626
# We define a custom shell script here, although `msys2.cmd` does neither exist nor is it available in the PATH yet
@@ -32,8 +32,7 @@ jobs:
3232
shell: bash
3333

3434
- name: Check python coding (cmd)
35-
run: |
36-
python -c "import sys, locale; print(sys.getdefaultencoding(), locale.getpreferredencoding(False))"
35+
run: python -c "import sys, locale; print(sys.getdefaultencoding(), locale.getpreferredencoding(False))"
3736
shell: cmd
3837

3938
# We use a JS Action, which calls the system terminal or other custom terminals directly, if required
@@ -98,8 +97,9 @@ jobs:
9897
echo "::endgroup::"
9998
- name: CircuitPython version
10099
run: |
101-
tools/describe || git log --parents HEAD~4..
102-
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
100+
CP_VERSION=$(tools/describe)
101+
echo "$CP_VERSION"
102+
echo "CP_VERSION=$CP_VERSION" >> $GITHUB_ENV
103103
104104
- name: build mpy-cross
105105
run: make -j2 -C mpy-cross

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,23 @@ jobs:
1616
pre-commit:
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/checkout@v3
20-
- name: Set up Python 3
19+
- name: Set up repository
20+
uses: actions/checkout@v3
21+
with:
22+
submodules: false
23+
fetch-depth: 1
24+
- name: Set up python
2125
uses: actions/setup-python@v4
2226
with:
2327
python-version: "3.x"
24-
- name: Install deps
28+
- name: CircuitPython dependencies
29+
run: python tools/ci_fetch_deps.py ${{ github.job }}
30+
- name: Install dependencies
2531
run: |
2632
sudo apt-get install -y gettext uncrustify
2733
pip3 install black polib pyyaml
28-
- name: Populate selected submodules
29-
run: git submodule update --init extmod/ulab
30-
- name: Set PY
31-
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
32-
- uses: actions/cache@v3
33-
with:
34-
path: ~/.cache/pre-commit
35-
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
36-
- uses: pre-commit/[email protected]
34+
- name: Run pre-commit
35+
uses: pre-commit/[email protected]
3736
- name: Make patch
3837
if: failure()
3938
run: git diff > ~/pre-commit.patch

tools/ci_fetch_deps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def main():
8585
submodules = ["extmod/ulab", "lib/", "tools/", "ports/", "data/nvm.toml"]
8686
elif TARGET == "website":
8787
submodules = ["tools/adabot/", "frozen/"]
88+
elif TARGET == "pre-commit":
89+
submodules = ["extmod/ulab"]
8890
else:
8991
p = list(pathlib.Path(".").glob(f"ports/*/boards/{TARGET}/mpconfigboard.mk"))
9092
if not p:

0 commit comments

Comments
 (0)