-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devcontainer-ci-build' into fixs-f7
- Loading branch information
Showing
29 changed files
with
815 additions
and
373 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Build for a ChibiOS target | ||
|
||
on: | ||
push: | ||
pull_request: | ||
release: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-target: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup config | ||
run: | | ||
# Apply config templates | ||
pushd config | ||
mv user-prefs.TEMPLATE.json user-prefs.json | ||
mv user-tools-repos.TEMPLATE.json user-tools-repos.json | ||
sed -i -- 's|"name": "user-tools-repos-container"|"name": "user-tools-repos"|g' user-tools-repos.json | ||
popd | ||
# required fixes for current devcontainer | ||
pushd .devcontainer | ||
# target the chibios container for a quicker build | ||
sed -i -- 's|"dockerFile": "Dockerfile.All"|"dockerFile": "Dockerfile.ChibiOS"|g' devcontainer.json | ||
# remove unsupported commands | ||
sed -i -- 's|"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",|//"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",|g' devcontainer.json | ||
sed -i -- 's|"source=${env:HOME}${env:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind"|//"source=${env:HOME}${env:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind",|g' devcontainer.json | ||
popd | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Device MinSizeRel Firmware | ||
uses: devcontainers/[email protected] | ||
with: | ||
# The ChibiOS container | ||
# imageName: ghcr.io/nanoframework/dev-container-chibios | ||
cacheFrom: ghcr.io/nanoframework/dev-container-chibios | ||
push: never | ||
runCmd: | | ||
# TODO: if we want to improve: https://code.visualstudio.com/remote/advancedcontainers/environment-variables | ||
cmake --preset=ST_STM32F769I_DISCOVERY -DCMAKE_BUILD_TYPE=MinSizeRel | ||
cmake --build build -j4 | ||
- name: Upload MinSizeRel artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Firmware MinSizeRel | ||
path: | | ||
./build/*.map | ||
./build/*.elf | ||
./build/*.hex | ||
./build/*.bin | ||
./build/*.dfu | ||
- name: Build Device Debug Firmware | ||
uses: devcontainers/[email protected] | ||
with: | ||
# The ChibiOS container | ||
cacheFrom: ghcr.io/nanoframework/dev-container-chibios | ||
push: never | ||
runCmd: | | ||
# TODO: if we want to improve: https://code.visualstudio.com/remote/advancedcontainers/environment-variables | ||
cmake --preset=ST_STM32F769I_DISCOVERY -DCMAKE_BUILD_TYPE=Debug | ||
cmake --build build -j4 # -v | ||
- name: Upload Debug artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Firmware Debug | ||
path: | | ||
./build/*.map | ||
./build/*.elf | ||
./build/*.hex | ||
./build/*.bin | ||
./build/*.dfu |
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
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
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
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
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
Oops, something went wrong.