Update CI (#79)

This commit is contained in:
Changho Hwang
2023-05-22 02:45:41 +08:00
committed by GitHub
parent a3cf48cc5d
commit 8d54bf3301
3 changed files with 72 additions and 8 deletions

47
.github/workflows/codeql.yml vendored Normal file
View File

@@ -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}}"

View File

@@ -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 .