summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build_aarch64.yml20
-rw-r--r--.github/workflows/build_arm.yml41
-rw-r--r--.github/workflows/build_esp.yml20
-rw-r--r--.github/workflows/build_msp430.yml20
-rw-r--r--.github/workflows/build_renesas.yml20
-rw-r--r--.github/workflows/build_riscv.yml21
-rw-r--r--.github/workflows/cifuzz.yml33
-rw-r--r--.github/workflows/pre-commit.yml48
-rw-r--r--.github/workflows/test_hardware.yml17
9 files changed, 191 insertions, 49 deletions
diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml
index af26f33f2..c552a9574 100644
--- a/.github/workflows/build_aarch64.yml
+++ b/.github/workflows/build_aarch64.yml
@@ -1,11 +1,23 @@
name: Build AArch64
on:
- pull_request:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
# ---------------------------------------
diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml
index 369048fc6..c16fc0d45 100644
--- a/.github/workflows/build_arm.yml
+++ b/.github/workflows/build_arm.yml
@@ -1,34 +1,25 @@
name: Build ARM
on:
- pull_request:
push:
- release:
- types:
- - created
-
-jobs:
- # ---------------------------------------
- # Unit testing with Ceedling
- # ---------------------------------------
- unit-test:
- runs-on: ubuntu-latest
- steps:
- - name: Setup Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: '2.7'
-
- - name: Checkout TinyUSB
- uses: actions/checkout@v3
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
- - name: Unit Tests
- run: |
- # Install Ceedling
- gem install ceedling
- cd test
- ceedling test:all
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+jobs:
# ---------------------------------------
# Build ARM family
# ---------------------------------------
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
index 51d91de49..2e2859c95 100644
--- a/.github/workflows/build_esp.yml
+++ b/.github/workflows/build_esp.yml
@@ -1,11 +1,23 @@
name: Build ESP
on:
- pull_request:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
build-esp:
diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml
index 1ef25a6a0..7e1c5b128 100644
--- a/.github/workflows/build_msp430.yml
+++ b/.github/workflows/build_msp430.yml
@@ -1,11 +1,23 @@
name: Build MSP430
on:
- pull_request:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
build-msp430:
diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml
index 2e272c832..d9254dea8 100644
--- a/.github/workflows/build_renesas.yml
+++ b/.github/workflows/build_renesas.yml
@@ -1,11 +1,23 @@
name: Build Renesas
on:
- pull_request:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
build-rx:
diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml
index 61c1c60c5..66f4fd153 100644
--- a/.github/workflows/build_riscv.yml
+++ b/.github/workflows/build_riscv.yml
@@ -1,11 +1,23 @@
name: Build RISC-V
on:
- pull_request:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
jobs:
build-riscv:
@@ -15,6 +27,7 @@ jobs:
matrix:
family:
# Alphabetical order
+ - 'ch32v307'
- 'fomu'
- 'gd32vf103'
steps:
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
new file mode 100644
index 000000000..7314fd9e6
--- /dev/null
+++ b/.github/workflows/cifuzz.yml
@@ -0,0 +1,33 @@
+name: CIFuzz
+on:
+ pull_request:
+ branches:
+ - master
+ paths:
+ - '**.c'
+ - '**.cc'
+ - '**.cpp'
+ - '**.cxx'
+ - '**.h'
+jobs:
+ Fuzzing:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Build Fuzzers
+ id: build
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'tinyusb'
+ language: c++
+ - name: Run Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'tinyusb'
+ language: c++
+ fuzz-seconds: 600
+ - name: Upload Crash
+ uses: actions/upload-artifact@v3
+ if: failure() && steps.build.outcome == 'success'
+ with:
+ name: artifacts
+ path: ./out/artifacts
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
new file mode 100644
index 000000000..d2150d13f
--- /dev/null
+++ b/.github/workflows/pre-commit.yml
@@ -0,0 +1,48 @@
+name: pre-commit
+
+on:
+ push:
+ pull_request:
+ branches: [ master ]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ pre-commit:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+
+ - name: Setup Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: '3.0'
+
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v3
+
+ - name: Run codespell
+ uses: codespell-project/actions-codespell@master
+
+ - name: Run Unit Tests
+ run: |
+ # Install Ceedling
+ gem install ceedling
+ cd test/unit-test
+ ceedling test:all
+
+ - name: Build Fuzzer
+ run: |
+ export CC=clang
+ export CXX=clang++
+ fuzz_harness=$(ls -d test/fuzz/device/*/)
+ for h in $fuzz_harness
+ do
+ make -C $h get-deps
+ make -C $h all
+ done
diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml
index 3ef1fdc56..601a97e99 100644
--- a/.github/workflows/test_hardware.yml
+++ b/.github/workflows/test_hardware.yml
@@ -1,10 +1,19 @@
name: Hardware Test
+
on:
- pull_request:
push:
- release:
- types:
- - created
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'src/**'
+ - 'examples/**'
+ - 'lib/**'
+ - 'hw/**'
# Hardware in the loop (HIL)
# Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user