From 8d54bf3301cf8672b49e7845378b8a86777302c0 Mon Sep 17 00:00:00 2001 From: Changho Hwang Date: Mon, 22 May 2023 02:45:41 +0800 Subject: [PATCH] Update CI (#79) --- .github/workflows/codeql.yml | 47 +++++++++++++++++++++ .github/workflows/{cpplint.yml => lint.yml} | 29 ++++++++++--- src/include/mscclpp.h | 4 +- 3 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/codeql.yml rename .github/workflows/{cpplint.yml => lint.yml} (62%) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..620b4501 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,47 @@ +name: "CodeQL" + +on: + pull_request: + branches: + - '**' + schedule: + - cron: "30 1 * * 1" + +jobs: + analyze: + name: Analyze + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + container: + image: superbench/superbench:v0.8.0-cuda12.1 + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp', 'python' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - run: | + echo "Run, Build Application using script" + git config --global --add safe.directory /__w/mscclpp/mscclpp + curl -L https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.tar.gz -o /tmp/cmake-3.26.4-linux-x86_64.tar.gz + tar xzf /tmp/cmake-3.26.4-linux-x86_64.tar.gz -C /tmp + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.1/compat/lib.real + /tmp/cmake-3.26.4-linux-x86_64/bin/cmake . + make -j + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/cpplint.yml b/.github/workflows/lint.yml similarity index 62% rename from .github/workflows/cpplint.yml rename to .github/workflows/lint.yml index c2e6cb43..e61c6dc1 100644 --- a/.github/workflows/cpplint.yml +++ b/.github/workflows/lint.yml @@ -1,15 +1,12 @@ -name: C++ Lint +name: Lint on: - push: - branches: - - '**' pull_request: branches: - - '**' + - '**' jobs: - run-linters: + cpplint: runs-on: ubuntu-20.04 steps: @@ -30,3 +27,23 @@ jobs: PYTHONCPPSOURCES=$(find ./python/src/ -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)') clang-format-12 -style=file --verbose --Werror --dry-run ${CPPSOURCES} clang-format-12 --dry-run ${PYTHONCPPSOURCES} + + spelling: + runs-on: ubuntu-20.04 + + steps: + - name: Check git version + env: + min-ver: "2.18" + run: dpkg --compare-versions $(git version | awk '{print $3}') ge ${{ env.min-ver }} + + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + curl -L https://git.io/misspell | sudo bash -s -- -b /bin + + - name: Check spelling + run: | + misspell -error . diff --git a/src/include/mscclpp.h b/src/include/mscclpp.h index b57dc263..082ab059 100644 --- a/src/include/mscclpp.h +++ b/src/include/mscclpp.h @@ -66,7 +66,7 @@ using mscclppBufferHandle_t = uint32_t; * * flush(): [blocking] the sender waits for all the data transfers to complete * - * wait(): [blocking] the reciever waits on the signal() to start reading the data. + * wait(): [blocking] the receiver waits on the signal() to start reading the data. * * The sender should not reuse the buffer till the flush() returns. * The receiver should only access the data after the wait() returns. @@ -309,7 +309,7 @@ mscclppResult_t mscclppCommDestroy(mscclppComm_t comm); /* Return the string for the given error code. * - * Ouput: + * Output: * returns the string * * Inputs: