diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..54896a6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,21 @@ +--- +# Basic build test + +name: build + +# yamllint disable-line rule:truthy +on: [pull_request, push, workflow_dispatch] + +env: + CMAKE_C_FLAGS="-Werror -Wall -Wmissing-prototypes -Wimplicit-fallthrough=3 -Wpointer-arith" + +jobs: + build-test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: {fetch-depth: 50, submodules: recursive} + + - name: build + run: cmake -B build/ + - run: make -C build/ diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b821ce4..11f2187 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -9,7 +9,7 @@ # github.com also has a powerful web editor that can be used without # committing. -name: checkpatch +name: codestyle # yamllint disable-line rule:truthy on: [pull_request] @@ -23,3 +23,20 @@ jobs: - name: run yamllint run: yamllint .github/workflows/*.yml + checkpatch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: install codespell + run: sudo apt update && sudo apt install -y codespell + + - name: checkpatch + with: + COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} + run: scripts/checkpatch.pl -g "${COMMIT_RANGE}" --codespell --codespellfile + /usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt + --ignore C99_COMMENT_TOLERANCE --no-tree --strict -g diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d895210..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: c - -git: - depth: false - -services: - - docker - -jobs: - include: - - name: "Build Test" - before_install: docker pull thesofproject/sof && docker tag thesofproject/sof sof - script: - - echo -e '#!/bin/bash\nmkdir build && cd build && cmake .. && make -Werror -Wall -Wmissing-prototypes -Wimplicit-fallthrough=3 -Wpointer-arith' > build.sh && chmod +x build.sh - - docker run -i -t -v $(pwd):/home/sof/work/sof.git --user $(id -u) sof ./build.sh - - name: checkpatch - before_install: - - sudo apt-get -y install codespell - script: - - git --no-pager log --oneline --graph --decorate --max-count=5 - - git --no-pager log --oneline --graph --decorate --max-count=5 "${TRAVIS_BRANCH}" - - (set -x; scripts/checkpatch.pl --no-tree --strict --codespell --no-signoff -g ${TRAVIS_COMMIT_RANGE/.../..})