Skip to content

Commit

Permalink
Merge pull request #402 from adafruit/fix-ci-release
Browse files Browse the repository at this point in the history
Fix ci release
  • Loading branch information
hathach committed Aug 9, 2024
2 parents e25c48e + b612ce0 commit db61519
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 68 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
- created

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand All @@ -54,6 +54,7 @@ jobs:
# Build ARM
# ---------------------------------------
arm:
#if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
Expand Down Expand Up @@ -91,6 +92,7 @@ jobs:
# Build RISC-V
# ---------------------------------------
riscv:
if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
Expand All @@ -114,3 +116,41 @@ jobs:
uses: ./.github/workflows/build_ghostfat.yml
with:
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['test_ghostfat'].board) }}

# ---------------------------------------
# Build ARM with CMake
# ---------------------------------------
arm-cmake:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
# Alphabetical order by family
- 'metro_m7_1011'
# - 'stm32f303disco' # overflows flash
- 'stm32f411ve_discovery'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Fetch tags
run: git fetch --tags

- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '11.2-2022.02'

- name: Get Dependencies
run: |
sudo apt install -y ninja-build
python tools/get_deps.py --board ${{ matrix.board }}
- name: Build
run: |
cmake . -B _build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBOARD=${{ matrix.board }}
cmake --build _build
63 changes: 0 additions & 63 deletions .github/workflows/build_cmake.yml

This file was deleted.

15 changes: 11 additions & 4 deletions .github/workflows/build_util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true

- name: Fetch tags
run: git fetch --tags

- name: Setup Toolchain
id: setup-toolchain
Expand Down Expand Up @@ -66,8 +68,13 @@ jobs:
- name: Prepare Release Asset
if: github.event_name == 'release'
run: |
for f in ${{ env.BIN_PATH }}/*; do mv $f ${f%.*}-${{ github.event.release.tag_name }}."${f#*.}"; done
zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
if [ ${{ inputs.toolchain }} == 'esp-idf' ]; then
zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
cp ${{ env.BIN_PATH }}/update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
else
for f in ${{ env.BIN_PATH }}/*; do mv $f ${f%.*}-${{ github.event.release.tag_name }}."${f#*.}"; done
zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
fi
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
Expand All @@ -84,4 +91,4 @@ jobs:
if: github.event_name == 'release' && inputs.port == 'espressif'
run: |
[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip s3://adafruit-circuit-python/bootloaders/esp32/tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip --no-progress --region us-east-1
[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp ${{ env.BIN_PATH }}/update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 s3://adafruit-circuit-python/bootloaders/esp32/update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 --no-progress --region us-east-1
[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 s3://adafruit-circuit-python/bootloaders/esp32/update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 --no-progress --region us-east-1
3 changes: 3 additions & 0 deletions .github/workflows/ci_set_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def set_matrix_json():
for b in sorted(boards_dir.iterdir()):
if b.is_dir():
matrix[p.name]['board'].append(b.name)
# For quick testing by only build 1 espressif board
#if p.name == 'espressif':
# break
print(json.dumps(matrix))


Expand Down

0 comments on commit db61519

Please sign in to comment.