diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/pull_request_template.md | 86 | ||||
-rw-r--r-- | .github/workflows/build.yml | 127 | ||||
-rw-r--r-- | .github/workflows/shellcheck.yml | 20 |
3 files changed, 233 insertions, 0 deletions
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..ae9f4de --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,86 @@ + +<!-- Explain your changes here... --> + +---- +## git request-pull output: +``` +<!-- START REPLACE ME --> + +Generate your PR shortlog and diffstat with these commands: + git remote add axboe-tree https://github.com/axboe/liburing + git fetch axboe-tree + git request-pull axboe-tree/master your_fork_URL your_branch_name + +Then replace this with the output of `git request-pull` command. + +<!-- END REPLACE ME --> +``` +---- +<details> +<summary>Click to show/hide pull request guidelines</summary> + +## Pull Request Guidelines +1. To make everyone easily filter pull request from the email +notification, use `[GIT PULL]` as a prefix in your PR title. +``` +[GIT PULL] Your Pull Request Title +``` +2. Follow the commit message format rules below. +3. Follow the Linux kernel coding style (see: https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst). + +### Commit message format rules: +1. The first line is title (don't be more than 72 chars if possible). +2. Then an empty line. +3. Then a description (may be omitted for truly trivial changes). +4. Then an empty line again (if it has a description). +5. Then a `Signed-off-by` tag with your real name and email. For example: +``` +Signed-off-by: Foo Bar <foo.bar@gmail.com> +``` + +The description should be word-wrapped at 72 chars. Some things should +not be word-wrapped. They may be some kind of quoted text - long +compiler error messages, oops reports, Link, etc. (things that have a +certain specific format). + +Note that all of this goes in the commit message, not in the pull +request text. The pull request text should introduce what this pull +request does, and each commit message should explain the rationale for +why that particular change was made. The git tree is canonical source +of truth, not github. + +Each patch should do one thing, and one thing only. If you find yourself +writing an explanation for why a patch is fixing multiple issues, that's +a good indication that the change should be split into separate patches. + +If the commit is a fix for an issue, add a `Fixes` tag with the issue +URL. + +Don't use GitHub anonymous email like this as the commit author: +``` +123456789+username@users.noreply.github.com +``` + +Use a real email address! + +### Commit message example: +``` +src/queue: don't flush SQ ring for new wait interface + +If we have IORING_FEAT_EXT_ARG, then timeouts are done through the +syscall instead of by posting an internal timeout. This was done +to be both more efficient, but also to enable multi-threaded use +the wait side. If we touch the SQ state by flushing it, that isn't +safe without synchronization. + +Fixes: https://github.com/axboe/liburing/issues/402 +Signed-off-by: Jens Axboe <axboe@kernel.dk> +``` + +</details> + +---- +## By submitting this pull request, I acknowledge that: +1. I have followed the above pull request guidelines. +2. I have the rights to submit this work under the same license. +3. I agree to a Developer Certificate of Origin (see https://developercertificate.org for more information). diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..88192ff --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,127 @@ +name: Build test + +on: + # Trigger the workflow on push or pull requests. + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + # x86-64 gcc + - arch: x86_64 + cc_pkg: gcc-x86-64-linux-gnu + cxx_pkg: g++-x86-64-linux-gnu + cc: x86_64-linux-gnu-gcc + cxx: x86_64-linux-gnu-g++ + + # x86-64 clang + - arch: x86_64 + cc_pkg: clang + cxx_pkg: clang + cc: clang + cxx: clang++ + + # x86 (32-bit) gcc + - arch: i686 + cc_pkg: gcc-i686-linux-gnu + cxx_pkg: g++-i686-linux-gnu + cc: i686-linux-gnu-gcc + cxx: i686-linux-gnu-g++ + + # aarch64 gcc + - arch: aarch64 + cc_pkg: gcc-aarch64-linux-gnu + cxx_pkg: g++-aarch64-linux-gnu + cc: aarch64-linux-gnu-gcc + cxx: aarch64-linux-gnu-g++ + + # arm (32-bit) gcc + - arch: arm + cc_pkg: gcc-arm-linux-gnueabi + cxx_pkg: g++-arm-linux-gnueabi + cc: arm-linux-gnueabi-gcc + cxx: arm-linux-gnueabi-g++ + + # powerpc64 + - arch: powerpc64 + cc_pkg: gcc-powerpc64-linux-gnu + cxx_pkg: g++-powerpc64-linux-gnu + cc: powerpc64-linux-gnu-gcc + cxx: powerpc64-linux-gnu-g++ + + # powerpc + - arch: powerpc + cc_pkg: gcc-powerpc-linux-gnu + cxx_pkg: g++-powerpc-linux-gnu + cc: powerpc-linux-gnu-gcc + cxx: powerpc-linux-gnu-g++ + + # alpha + - arch: alpha + cc_pkg: gcc-alpha-linux-gnu + cxx_pkg: g++-alpha-linux-gnu + cc: alpha-linux-gnu-gcc + cxx: alpha-linux-gnu-g++ + + # mips64 + - arch: mips64 + cc_pkg: gcc-mips64-linux-gnuabi64 + cxx_pkg: g++-mips64-linux-gnuabi64 + cc: mips64-linux-gnuabi64-gcc + cxx: mips64-linux-gnuabi64-g++ + + # mips + - arch: mips + cc_pkg: gcc-mips-linux-gnu + cxx_pkg: g++-mips-linux-gnu + cc: mips-linux-gnu-gcc + cxx: mips-linux-gnu-g++ + + env: + FLAGS: -g -O2 -Wall -Wextra -Werror + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Install Compilers + run: | + if [[ "${{matrix.cc_pkg}}" == "clang" ]]; then \ + wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh; \ + sudo bash /tmp/llvm.sh 15; \ + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 400; \ + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 400; \ + else \ + sudo apt-get update -y; \ + sudo apt-get install -y ${{matrix.cc_pkg}} ${{matrix.cxx_pkg}}; \ + fi; + + - name: Display compiler versions + run: | + ${{matrix.cc}} --version; + ${{matrix.cxx}} --version; + + - name: Build + run: | + ./configure --cc=${{matrix.cc}} --cxx=${{matrix.cxx}}; + make -j$(nproc) V=1 CPPFLAGS="-Werror" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS"; + + - name: Build nolibc + run: | + if [[ "${{matrix.arch}}" == "x86_64" || "${{matrix.arch}}" == "i686" ]]; then \ + make clean; \ + ./configure --cc=${{matrix.cc}} --cxx=${{matrix.cxx}} --nolibc; \ + make -j$(nproc) V=1 CPPFLAGS="-Werror" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS"; \ + else \ + echo "Skipping nolibc build, this arch doesn't support building liburing without libc"; \ + fi; + + - name: Test install command + run: | + sudo make install; diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000..8873f0b --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,20 @@ +name: Shellcheck + +on: + # Trigger the workflow on push or pull requests. + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Display shellcheck version + run: shellcheck --version + + - name: Shellcheck execution + run: shellcheck test/runtest*.sh |