From 6293f86d5b1c5ed97513a94ea8cf12a8e720f436 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 28 Dec 2022 11:58:46 +0700 Subject: [PATCH] add codespell ci rename clang_and_doxy to pre-commit to also include codespell, required to pass before running build --- .codespell/exclude-file.txt | 0 .codespell/ignore-words.txt | 9 +++++ .codespellrc | 10 +++++ .github/workflows/githubci.yml | 67 +++++++++++++++++++--------------- 4 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 .codespell/exclude-file.txt create mode 100644 .codespell/ignore-words.txt create mode 100644 .codespellrc diff --git a/.codespell/exclude-file.txt b/.codespell/exclude-file.txt new file mode 100644 index 0000000..e69de29 diff --git a/.codespell/ignore-words.txt b/.codespell/ignore-words.txt new file mode 100644 index 0000000..27e1856 --- /dev/null +++ b/.codespell/ignore-words.txt @@ -0,0 +1,9 @@ +synopsys +sie +tre +hsi +fro +dout +mot +te +inout diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..e627c9f --- /dev/null +++ b/.codespellrc @@ -0,0 +1,10 @@ +# See: https://github.com/codespell-project/codespell#using-a-config-file +[codespell] +# In the event of a false positive, add the problematic word, in all lowercase, to 'ignore-words.txt' (one word per line). +# Or copy & paste the whole problematic line to 'exclude-file.txt' +ignore-words = .codespell/ignore-words.txt +exclude-file = .codespell/exclude-file.txt +check-filenames = +check-hidden = +count = +skip = .git diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index 31d1471..aa84e1a 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -2,9 +2,46 @@ name: Build on: [pull_request, push, repository_dispatch] +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: Checkout code + uses: actions/checkout@v3 + + - name: Run codespell + uses: codespell-project/actions-codespell@master + + - name: Checkout adafruit/ci-arduino + uses: actions/checkout@v3 + with: + repository: adafruit/ci-arduino + path: ci + + - name: pre-install + run: bash ci/actions_install.sh + + - name: clang + run: python3 ci/run-clang-format.py -r src/arduino + + - name: doxygen + env: + GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} + PRETTYNAME : "Adafruit TinyUSB Library" + run: bash ci/doxy_gen_and_deploy.sh + build: runs-on: ubuntu-latest + needs: pre-commit strategy: fail-fast: false matrix: @@ -47,33 +84,3 @@ jobs: - name: test platforms run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} - - clang_and_doxy: - runs-on: ubuntu-latest - needs: build - steps: - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checkout adafruit/ci-arduino - uses: actions/checkout@v3 - with: - repository: adafruit/ci-arduino - path: ci - - - name: pre-install - run: bash ci/actions_install.sh - - - name: clang - run: python3 ci/run-clang-format.py -r src/arduino - - - name: doxygen - env: - GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} - PRETTYNAME : "Adafruit TinyUSB Library" - run: bash ci/doxy_gen_and_deploy.sh