Skip to content

MicroPython: Update overclock patch. #497

MicroPython: Update overclock patch.

MicroPython: Update overclock patch. #497

Workflow file for this run

name: CMake
on:
push:
pull_request:
release:
types: [created]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
name: ${{matrix.name}}
strategy:
matrix:
include:
- os: ubuntu-20.04
pico-sdk: true
name: PicoSystem Build (Linux)
cache-key: picosystem
release-suffix: PicoSystem
cmake-args: -DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk -DPICO_BOARD=pimoroni_picosystem -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
apt-packages: ccache gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib python3-setuptools
runs-on: ${{matrix.os}}
env:
RELEASE_FILE: ${{github.event.repository.name}}-${{github.event.release.tag_name}}-${{matrix.release-suffix}}
steps:
- name: Checkout PicoSystem SDK
uses: actions/checkout@v2
# Pico SDK
- name: Checkout Pico SDK
if: matrix.pico-sdk
uses: actions/checkout@v2
with:
repository: raspberrypi/pico-sdk
path: pico-sdk
submodules: true
- name: Cache
uses: actions/cache@v2
with:
path: /home/runner/.ccache
key: ccache-${{matrix.cache-key}}-${{github.ref}}-${{github.sha}}
restore-keys: |
ccache-${{matrix.cache-key}}-${{github.ref}}
ccache-${{matrix.cache-key}}-
# Linux deps
- name: Install deps
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install ${{matrix.apt-packages}}
pip3 install requests
- name: Create Build Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build
cmake -E make_directory ${{runner.workspace}}/build-template
- name: Configure CMake (Examples)
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCPACK_PACKAGE_FILE_NAME=${{env.RELEASE_FILE}} ${{matrix.cmake-args}}
- name: Configure CMake (Template)
shell: bash
working-directory: ${{runner.workspace}}/build-template
run: cmake $GITHUB_WORKSPACE/template -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCPACK_PACKAGE_FILE_NAME=${{env.RELEASE_FILE}} ${{matrix.cmake-args}}
- name: Build (Examples)
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
ccache --zero-stats || true
cmake --build . --config $BUILD_TYPE -j 2
ccache --show-stats || true
- name: Build (Template)
working-directory: ${{runner.workspace}}/build-template
shell: bash
run: |
ccache --zero-stats || true
cmake --build . --config $BUILD_TYPE -j 2
ccache --show-stats || true
- name: Package (Examples)
if: github.event_name == 'release' && matrix.release-suffix != ''
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config $BUILD_TYPE --target package
- name: Upload .tar (Examples)
if: github.event_name == 'release' && matrix.release-suffix != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
asset_path: ${{runner.workspace}}/build/${{env.RELEASE_FILE}}.tar.gz
upload_url: ${{github.event.release.upload_url}}
asset_name: ${{env.RELEASE_FILE}}.tar.gz
asset_content_type: application/octet-stream #??
- name: Upload .zip (Examples)
if: github.event_name == 'release' && matrix.release-suffix != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
asset_path: ${{runner.workspace}}/build/${{env.RELEASE_FILE}}.zip
upload_url: ${{github.event.release.upload_url}}
asset_name: ${{env.RELEASE_FILE}}.zip
asset_content_type: application/zip