Fix pre packet #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout pico-sdk | |
run: | | |
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk | |
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk | |
# checkout tinyusb in pico-sdk and switch to PR branch | |
git -C ~/pico-sdk submodule update --init | |
git -C ~/pico-sdk/lib/tinyusb fetch | |
git -C ~/pico-sdk/lib/tinyusb checkout master | |
- name: Set Toolchain URL | |
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz | |
- name: Cache Toolchain | |
uses: actions/cache@v3 | |
id: cache-toolchain | |
with: | |
path: ~/cache/ | |
key: ${{ runner.os }}-22-05-05-${{ env.TOOLCHAIN_URL }} | |
- name: Install Toolchain | |
if: steps.cache-toolchain.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p ~/cache/toolchain | |
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz | |
tar -C ~/cache/toolchain -xaf toolchain.tar.gz | |
- name: Set Toolchain Path | |
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` | |
- name: Build | |
run: | | |
cd examples | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: example_binaries | |
path: | | |
examples/build/usb_device/usb_device.uf2 | |
examples/build/usb_device/usb_device.hex | |
examples/build/capture_hid_report/capture_hid_report.uf2 | |
examples/build/capture_hid_report/capture_hid_report.hex | |
examples/build/host_hid_to_device_cdc/host_hid_to_device_cdc.uf2 | |
examples/build/host_hid_to_device_cdc/host_hid_to_device_cdc.hex |