Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build Test Targets

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
build-py-script:
strategy:
matrix:
os: [ubuntu-20.04, macos-13, windows-2019]
gcc: ['6-2016-q4', 'latest']
cmake: ['3.6.0', ''] # Empty string installs the latest CMake release
target: ['-t'] # Build all test targets
# Some targets don't compile with some dependency versions, so they're excluded from
# the test targets, but specific environments can be set up to build them successfully
include:
# Affected by the issue described in this PR for a different target:
# https://github.com/lancaster-university/codal-core/pull/165
- os: ubuntu-20.04
gcc: '10-2020-q4'
cmake: '3.24.3'
target: 'codal-jacdac-feather'
# Not all arm-none-eabi-gcc versions define u_int8_t, u_int16_t, u_int32_t
- os: ubuntu-20.04
gcc: '10-2020-q4'
cmake: '3.24.3'
target: 'codal-stm32-iot-node'
# Affected by these issues:
# https://github.com/lancaster-university/codal-circuit-playground/issues/11
# https://github.com/lancaster-university/codal-circuit-playground/issues/12
- os: ubuntu-20.04
gcc: '10-2020-q4'
cmake: '3.24.3'
target: 'codal-circuit-playground'
# Affected by this issue reported for another target:
# https://github.com/lancaster-university/codal-circuit-playground/issues/11
- os: ubuntu-20.04
gcc: '10-2020-q4'
cmake: '3.24.3'
target: 'codal-makeable'
# Affected by this issue reported for another target:
# https://github.com/lancaster-university/codal-circuit-playground/issues/11
- os: ubuntu-20.04
gcc: '10-2020-q4'
cmake: '3.24.3'
target: 'codal-big-brainpad'
# Requires CMake 3.13 or higher
- os: ubuntu-20.04
gcc: '10-2020-q4'
cmake: '3.24.3'
target: 'codal-pi-pico'
fail-fast: false
runs-on: ${{ matrix.os }}
name: "T ${{ matrix.target }}: ${{ matrix.os }}, gcc ${{ matrix.gcc }}, cmake ${{ matrix.cmake || 'latest'}}"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: Setup arm-none-eabi-gcc ${{ matrix.gcc }}
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: ${{ matrix.gcc }}
- name: Setup CMake ${{ matrix.cmake }}
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake }}
- name: Install Ninja via PyPI
run: python -m pip install ninja
- name: Check Versions
run: |
arm-none-eabi-gcc --version
cmake --version
ninja --version
python --version
- name: Build all test platforms
run: python build.py ${{ matrix.target }}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

14 changes: 9 additions & 5 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# DEALINGS IN THE SOFTWARE.

import os
import sys
import stat
import optparse
import platform
import json
Expand Down Expand Up @@ -138,9 +138,9 @@
exit(0)

for json_obj in test_json:

# some platforms aren't supported by travis, ignore them when testing.
if "test_ignore" in json_obj:
print("\n{}\nBuilding Target: {}\n{}".format("#" * 80, json_obj["name"], "#" * 80), flush=True)
# some platforms aren't supported in CI, ignore them when testing.
if "test_ignore" in json_obj and json_obj["test_ignore"] == True:
print("ignoring: " + json_obj["name"])
continue

Expand All @@ -149,7 +149,11 @@

# clean libs
if os.path.exists("../libraries"):
shutil.rmtree('../libraries')
# On Windows git creates read only files inside .git folder which can fail rmtree
def set_writable(function, path, excinfo):
os.chmod(path, stat.S_IWRITE)
function(path)
shutil.rmtree("../libraries", onerror=set_writable)

# configure the target and tests...
config = {
Expand Down
29 changes: 19 additions & 10 deletions utils/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
"info":"This target specifies the circuit playground which is driven by a SAMD21.",
"device_url":"https://www.adafruit.com/product/3333",
"url":"https://github.com/lancaster-university/codal-circuit-playground",
"branch":"master",
"type":"git"
"branch":"v2.0.4",
"type":"git",
"test_ignore":true
},
{
"name":"codal-microbit",
"info":"This target specifies the microbit, which uses the nordic NRF51822.",
"info":"This target specifies the BBC micro:bit V1, which uses the nordic NRF51822.",
"device_url":"https://microbit.org",
"url":"https://github.com/lancaster-university/codal-microbit",
"test_ignore":true,
Expand Down Expand Up @@ -74,8 +75,7 @@
"device_url":"",
"url":"https://github.com/ElectronicCats/codal-mkr1300",
"branch":"master",
"type":"git",
"test_ignore":true
"type":"git"
},
{
"name":"codal-jacdac-feather",
Expand All @@ -96,19 +96,28 @@
},
{
"name":"codal-microbit-v2",
"info":"This target specifies the micro:bit V2, based on the nordic NRF52833",
"device_url":"",
"info":"This target specifies the BBC micro:bit V2, based on the nordic NRF52833",
"device_url":"https://microbit.org",
"url":"https://github.com/lancaster-university/codal-microbit-v2",
"branch":"master",
"type":"git"
}
,
},
{
"name":"codal-makeable",
"info":"This target specifies the makeable board, based on the nordic NRF52833",
"device_url":"",
"url":"https://github.com/jamesadevine/codal-makeable",
"branch":"main",
"type":"git"
"type":"git",
"test_ignore":true
},
{
"name":"codal-pi-pico",
"info":"This target specifies the Raspberry Pi Pico board.",
"device_url":"",
"url":"https://github.com/lancaster-university/codal-pi-pico",
"branch":"master",
"type":"git",
"test_ignore":true
}
]