-
Notifications
You must be signed in to change notification settings - Fork 183
Add github actions compile test #131
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9ae1962
Add build & test workflow
will-v-pi b93d016
Fix libusb package, pico-sdk path, and wget on windows
will-v-pi e010257
Install ninja on linux, and fix cmake build paths
will-v-pi 15babc8
Fix install
will-v-pi 9f4b7ed
No sudo on windows
will-v-pi 3a14140
Fix sudo ternary
will-v-pi 5a2224a
Fix inconsistent indent
will-v-pi 9c0071d
Use curl instead of wget, and preinstalled 7zip on windows
will-v-pi c4b8630
Ensure no picotool needed for xip_ram_perms and flash_id compilation
will-v-pi c3df0b0
Improve job names
will-v-pi 22ac8e3
Debug curl 7z issue
will-v-pi c3f222c
Follow redirects with curl
will-v-pi 9274b8c
Fix sense of libusb, and fix mbedtls
will-v-pi dd54102
Merge branch 'develop' into actions-test
will-v-pi 26bcf6b
Still check LIBUSB_ROOT if pkgconfig libusb not found
will-v-pi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <packages> | ||
| <package id="gcc-arm-embedded" version="10.2.1" /> | ||
| <package id="cmake" version="3.25.2" installArguments="ADD_CMAKE_TO_PATH=System" /> | ||
| <package id="mingw" version="12.2.0" /> | ||
| <package id="ninja" version="1.11.1" /> | ||
| <package id="7zip.install" version="24.8.0" /> | ||
| <package id="wget" version="1.21.4" /> | ||
| </packages> | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| on: | ||
| push: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build & Test | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| generator: ["Ninja", "Unix Makefiles"] | ||
| mbedtls: [true, false] | ||
| libusb: [true, false] | ||
| compile: [true, false] | ||
| exclude: | ||
| - os: 'windows-latest' | ||
| generator: "Unix Makefiles" | ||
| - libusb: false | ||
| compile: false | ||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Install dependencies (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| choco install -y .github/workflows/choco_packages.config | ||
| wget https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.7z -O libusb.7z | ||
| 7z x libusb.7z -olibusb | ||
| - name: Set LIBUSB_ROOT (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: bash | ||
| run: echo "LIBUSB_ROOT=$(pwd)/libusb" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Install dependencies (macOS) | ||
| if: runner.os == 'macOS' | ||
| run: | | ||
| brew install cmake libusb pkg-config ninja wget | ||
| brew install --cask gcc-arm-embedded | ||
|
|
||
| - name: Install dependencies (Linux) | ||
| if: runner.os == 'Linux' | ||
| run: sudo apt install cmake ninja-build python3 build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib libusb-1.0-0-dev | ||
| - name: Checkout Pico SDK | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: raspberrypi/pico-sdk | ||
| ref: develop | ||
| path: pico-sdk | ||
| submodules: ${{ matrix.mbedtls }} | ||
|
|
||
| - name: Build and Install | ||
| run: | | ||
| cmake -S . -B build -G "${{ matrix.generator }}" -D PICO_SDK_PATH="${{ github.workspace }}/pico-sdk" ${{ matrix.libusb && '-D PICOTOOL_NO_LIBUSB=1' || '' }} ${{ matrix.compile && '-D USE_PRECOMPILED=false' || '' }} | ||
| cmake --build build | ||
| ${{ runner.os != 'Windows' && 'sudo' || '' }} cmake --install build | ||
| - name: Add to path (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: echo "C:\Program Files (x86)\picotool\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
|
|
||
| - name: Test | ||
| run: | | ||
| picotool help | ||
| wget https://datasheets.raspberrypi.com/soft/blink.uf2 -O blink.uf2 | ||
| wget https://datasheets.raspberrypi.com/soft/hello_world.uf2 -O hello_world.uf2 | ||
| wget https://datasheets.raspberrypi.com/soft/flash_nuke.uf2 -O flash_nuke.uf2 | ||
| picotool info -a blink.uf2 | ||
| picotool info -a hello_world.uf2 | ||
| picotool info -a flash_nuke.uf2 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.