Skip to content

Commit

Permalink
CI: Build all micro:bit projects & ensure it runs in main branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Dec 8, 2021
1 parent 01afe53 commit 27e0200
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Deploy master & test builds
name: Deploy main tag & test it

on:
push:
branches: [master, ci]
branches: [main, ci]

jobs:
deploy:
name: Deploy master tag image
name: Deploy main tag image
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip') && !contains(github.event.head_commit.message, 'skip-ci')"
steps:
Expand All @@ -23,10 +23,23 @@ jobs:
run: docker push ghcr.io/microbit-foundation/daplink:main

build-daplink:
name: Test build of DAPLink develop branch
name: Build ${{ matrix.project }} ${{ matrix.build-system }} DAPLink, develop branch
needs: deploy
runs-on: ubuntu-latest
container: ghcr.io/microbit-foundation/daplink:main
strategy:
fail-fast: false
matrix:
project:
- kl26z_bl
- kl26z_microbit_if
- kl27z_microbit_bl
- kl27z_microbit_if
- nrf52820_microbit_bl
- nrf52820_microbit_if
build-system:
- make_gcc_arm
- cmake_gcc_arm -g ninja
steps:
- name: Check Versions
run: |
Expand All @@ -40,5 +53,6 @@ jobs:
git clone https://github.com/mbedmicro/DAPLink
cd DAPLink
git checkout -b develop origin/develop
- name: Build DAPLink for kl27z_microbit_if
run: python tools/progen_compile.py -t make_gcc_arm kl27z_microbit_if
- name: Build DAPLink for ${{ matrix.project }}
working-directory: DAPLink
run: python tools/progen_compile.py -t ${{ matrix.build-system }} ${{ matrix.project }}
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# DAPLink Docker Image

🐳 A Docker image to create repeatable DAPLink builds.
🐳 A Docker image to create repeatable
[DAPLink](https://github.com/ARMmbed/DAPLink) builds.


## Building DAPLink with this image

Pull the image version you want to use to build DAPLink:
(Optional) You can first pull the image version you want to use:

```
docker pull ghcr.io/microbit-foundation/daplink:v1.0.0
docker pull ghcr.io/microbit-foundation/daplink:2021.12.1
```

Clone and navigate to the desire branch of the DAPLink project:
Expand All @@ -28,9 +29,9 @@ git checkout -b develop origin/develop
Build the required DAPLink project, for example for the `kl27z_microbit_if`:

```
docker run -v $(pwd):/home --rm ghcr.io/microbit-foundation/daplink:v1.0.0 python tools/progen_compile.py -t make_gcc_arm kl27z_microbit_if
docker run -v $(pwd):/home --rm ghcr.io/microbit-foundation/daplink:2021.12.1 python tools/progen_compile.py -t make_gcc_arm kl27z_microbit_if
```
docker run -v $(pwd):/home --rm daplink-toolchain python tools/progen_compile.py -t make_gcc_arm kl27z_microbit_if


## Building and running this image locally

Expand All @@ -45,7 +46,7 @@ docker run --name daplink-toolchain-container -it --entrypoint /bin/bash daplink
## DAPLink Python dependencies used

These Docker images contain the DAPLink Python dependencies pre-installed as
specified in the requirements.txt file.
specified in the [requirements.txt](requirements.txt) file.

This file is generated by pip installing a DAPLink requirements.txt file and
then pip freezing. This is done because the DAPLink file generally only pins a
Expand All @@ -54,6 +55,11 @@ few versions and does not include subdependencies.
More info included at the top of the [requirements.txt](requirements.txt) file.


## Versioning

These images use a [CalVer](https://calver.org/) variant: YYYY.MM.MINOR


## License

This project is under the MIT open source license. It was forked from
Expand Down

0 comments on commit 27e0200

Please sign in to comment.