summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-11-29 18:05:45 +1100
committerDamien George <damien@micropython.org>2020-11-29 22:21:28 +1100
commita598ae5b4dc4054f90156480454689c79f7c41a8 (patch)
treeaf9ae19a765de51e73546db375353fa28f8ac5ef
parent547e8a9fe70dee4de92a35b7a98a10bf26a20321 (diff)
downloadmicropython-a598ae5b4dc4054f90156480454689c79f7c41a8.tar.gz
micropython-a598ae5b4dc4054f90156480454689c79f7c41a8.zip
github/workflows: Add workflows for all CI tasks, builds and tests.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--.github/workflows/code_formatting.yml16
-rw-r--r--.github/workflows/code_size.yml25
-rw-r--r--.github/workflows/ports_cc3200.yml23
-rw-r--r--.github/workflows/ports_esp32.yml36
-rw-r--r--.github/workflows/ports_esp8266.yml23
-rw-r--r--.github/workflows/ports_nrf.yml23
-rw-r--r--.github/workflows/ports_powerpc.yml23
-rw-r--r--.github/workflows/ports_qemu-arm.yml26
-rw-r--r--.github/workflows/ports_samd.yml23
-rw-r--r--.github/workflows/ports_stm32.yml32
-rw-r--r--.github/workflows/ports_teensy.yml23
-rw-r--r--.github/workflows/ports_unix.yml176
-rw-r--r--.github/workflows/ports_windows.yml23
-rw-r--r--.github/workflows/ports_zephyr.yml24
14 files changed, 496 insertions, 0 deletions
diff --git a/.github/workflows/code_formatting.yml b/.github/workflows/code_formatting.yml
new file mode 100644
index 0000000000..aab347d78e
--- /dev/null
+++ b/.github/workflows/code_formatting.yml
@@ -0,0 +1,16 @@
+name: Check code formatting
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v1
+ - name: Install packages
+ run: source tools/ci.sh && ci_code_formatting_setup
+ - name: Run code formatting
+ run: source tools/ci.sh && ci_code_formatting_run
+ - name: Check code formatting
+ run: git diff --exit-code
diff --git a/.github/workflows/code_size.yml b/.github/workflows/code_size.yml
new file mode 100644
index 0000000000..dd759a4f3f
--- /dev/null
+++ b/.github/workflows/code_size.yml
@@ -0,0 +1,25 @@
+name: Check code size
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'ports/bare-arm/**'
+ - 'ports/minimal/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_code_size_setup
+ - name: Build
+ run: source tools/ci.sh && ci_code_size_build
+ - name: Compute code size difference
+ run: tools/metrics.py diff --error-threshold 0 ~/size0 ~/size1
diff --git a/.github/workflows/ports_cc3200.yml b/.github/workflows/ports_cc3200.yml
new file mode 100644
index 0000000000..0eaa36da37
--- /dev/null
+++ b/.github/workflows/ports_cc3200.yml
@@ -0,0 +1,23 @@
+name: cc3200 port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/cc3200/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_cc3200_setup
+ - name: Build
+ run: source tools/ci.sh && ci_cc3200_build
diff --git a/.github/workflows/ports_esp32.yml b/.github/workflows/ports_esp32.yml
new file mode 100644
index 0000000000..b89e462e04
--- /dev/null
+++ b/.github/workflows/ports_esp32.yml
@@ -0,0 +1,36 @@
+name: esp32 port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/esp32/**'
+
+jobs:
+ idf3_build:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_esp32_idf3_setup >> $GITHUB_PATH
+ - name: Build
+ env:
+ IDF_PATH: ${{ github.workspace }}/esp-idf
+ run: source tools/ci.sh && ci_esp32_idf3_build
+
+ idf4_build:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_esp32_idf4_setup >> $GITHUB_PATH
+ - name: Build
+ env:
+ IDF_PATH: ${{ github.workspace }}/esp-idf
+ run: source tools/ci.sh && ci_esp32_idf4_build
diff --git a/.github/workflows/ports_esp8266.yml b/.github/workflows/ports_esp8266.yml
new file mode 100644
index 0000000000..f6f2fcaf4a
--- /dev/null
+++ b/.github/workflows/ports_esp8266.yml
@@ -0,0 +1,23 @@
+name: esp8266 port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/esp8266/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_esp8266_setup >> $GITHUB_PATH
+ - name: Build
+ run: source tools/ci.sh && ci_esp8266_build
diff --git a/.github/workflows/ports_nrf.yml b/.github/workflows/ports_nrf.yml
new file mode 100644
index 0000000000..1ba3b0ce61
--- /dev/null
+++ b/.github/workflows/ports_nrf.yml
@@ -0,0 +1,23 @@
+name: nrf port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/nrf/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_nrf_setup
+ - name: Build
+ run: source tools/ci.sh && ci_nrf_build
diff --git a/.github/workflows/ports_powerpc.yml b/.github/workflows/ports_powerpc.yml
new file mode 100644
index 0000000000..88fa59767b
--- /dev/null
+++ b/.github/workflows/ports_powerpc.yml
@@ -0,0 +1,23 @@
+name: powerpc port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/powerpc/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_powerpc_setup
+ - name: Build
+ run: source tools/ci.sh && ci_powerpc_build
diff --git a/.github/workflows/ports_qemu-arm.yml b/.github/workflows/ports_qemu-arm.yml
new file mode 100644
index 0000000000..f456dfd74a
--- /dev/null
+++ b/.github/workflows/ports_qemu-arm.yml
@@ -0,0 +1,26 @@
+name: qemu-arm port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/qemu-arm/**'
+
+jobs:
+ build_and_test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_qemu_arm_setup
+ - name: Build
+ run: source tools/ci.sh && ci_qemu_arm_build
+ - name: Print failures
+ if: failure()
+ run: grep --text "FAIL" ports/qemu-arm/build/console.out
diff --git a/.github/workflows/ports_samd.yml b/.github/workflows/ports_samd.yml
new file mode 100644
index 0000000000..bde4ed965f
--- /dev/null
+++ b/.github/workflows/ports_samd.yml
@@ -0,0 +1,23 @@
+name: samd port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/samd/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_samd_setup
+ - name: Build
+ run: source tools/ci.sh && ci_samd_build
diff --git a/.github/workflows/ports_stm32.yml b/.github/workflows/ports_stm32.yml
new file mode 100644
index 0000000000..4634339c96
--- /dev/null
+++ b/.github/workflows/ports_stm32.yml
@@ -0,0 +1,32 @@
+name: stm32 port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/stm32/**'
+
+jobs:
+ build_pyb:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_stm32_setup
+ - name: Build
+ run: source tools/ci.sh && ci_stm32_pyb_build
+
+ build_nucleo:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_stm32_setup
+ - name: Build
+ run: source tools/ci.sh && ci_stm32_nucleo_build
diff --git a/.github/workflows/ports_teensy.yml b/.github/workflows/ports_teensy.yml
new file mode 100644
index 0000000000..7ae77c80af
--- /dev/null
+++ b/.github/workflows/ports_teensy.yml
@@ -0,0 +1,23 @@
+name: teensy port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'drivers/**'
+ - 'ports/teensy/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_teensy_setup
+ - name: Build
+ run: source tools/ci.sh && ci_teensy_build
diff --git a/.github/workflows/ports_unix.yml b/.github/workflows/ports_unix.yml
new file mode 100644
index 0000000000..385b2c008a
--- /dev/null
+++ b/.github/workflows/ports_unix.yml
@@ -0,0 +1,176 @@
+name: unix port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'examples/**'
+ - 'ports/unix/**'
+
+jobs:
+ minimal:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Build
+ run: source tools/ci.sh && ci_unix_minimal_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_minimal_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ standard:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Build
+ run: source tools/ci.sh && ci_unix_standard_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_standard_run_tests
+ - name: Run performance benchmarks
+ run: source tools/ci.sh && ci_unix_standard_run_perfbench
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ coverage:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_unix_coverage_setup
+ - name: Build
+ run: source tools/ci.sh && ci_unix_coverage_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_coverage_run_tests
+ - name: Build native mpy modules
+ run: source tools/ci.sh && ci_native_mpy_modules_build
+ - name: Test importing .mpy generated by mpy_ld.py
+ run: source tools/ci.sh && ci_unix_coverage_run_native_mpy_tests
+ - name: Run lcov coverage analysis
+ run: |
+ mkdir -p coverage
+ lcov --rc lcov_branch_coverage=1 --directory ports/unix/build-coverage --capture --output-file coverage/lcov.info.all
+ lcov --remove coverage/lcov.info.all '*/lib/*' '*/ports/unix/*' '*/utils/*' --output-file coverage/lcov.info
+ - name: Send to coveralls
+ uses: coverallsapp/github-action@master
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ coverage_32bit:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_unix_32bit_setup
+ - name: Build
+ run: source tools/ci.sh && ci_unix_coverage_32bit_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_coverage_32bit_run_tests
+ - name: Build native mpy modules
+ run: source tools/ci.sh && ci_native_mpy_modules_32bit_build
+ - name: Test importing .mpy generated by mpy_ld.py
+ run: source tools/ci.sh && ci_unix_coverage_32bit_run_native_mpy_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ nanbox:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_unix_32bit_setup
+ - name: Build
+ run: source tools/ci.sh && ci_unix_nanbox_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_nanbox_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ float:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Build
+ run: source tools/ci.sh && ci_unix_float_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_float_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ stackless_clang:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_unix_clang_setup
+ - name: Build
+ run: source tools/ci.sh && ci_unix_stackless_clang_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_stackless_clang_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ float_clang:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_unix_clang_setup
+ - name: Build
+ run: source tools/ci.sh && ci_unix_float_clang_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_float_clang_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ settrace:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Build
+ run: source tools/ci.sh && ci_unix_settrace_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_settrace_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ settrace_stackless:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Build
+ run: source tools/ci.sh && ci_unix_settrace_stackless_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_settrace_stackless_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
+
+ macos:
+ runs-on: macos-11.0
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v1
+ - name: Build
+ run: source tools/ci.sh && ci_unix_macos_build
+ - name: Run tests
+ run: source tools/ci.sh && ci_unix_macos_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests --print-failures
diff --git a/.github/workflows/ports_windows.yml b/.github/workflows/ports_windows.yml
new file mode 100644
index 0000000000..1bfe40c7fd
--- /dev/null
+++ b/.github/workflows/ports_windows.yml
@@ -0,0 +1,23 @@
+name: windows port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/*.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'ports/unix/**'
+ - 'ports/windows/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_windows_setup
+ - name: Build
+ run: source tools/ci.sh && ci_windows_build
diff --git a/.github/workflows/ports_zephyr.yml b/.github/workflows/ports_zephyr.yml
new file mode 100644
index 0000000000..d9ae2b8c55
--- /dev/null
+++ b/.github/workflows/ports_zephyr.yml
@@ -0,0 +1,24 @@
+name: zephyr port
+
+on:
+ push:
+ pull_request:
+ paths:
+ - '.github/workflows/ports_zephyr.yml'
+ - 'tools/**'
+ - 'py/**'
+ - 'extmod/**'
+ - 'lib/**'
+ - 'ports/zephyr/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install packages
+ run: source tools/ci.sh && ci_zephyr_setup
+ - name: Install Zephyr
+ run: source tools/ci.sh && ci_zephyr_install
+ - name: Build
+ run: source tools/ci.sh && ci_zephyr_build