新增多个算法实现,包括找出数组中重复的数字的三种方法及 KMP 算法的相关说明 #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| cpp-check: | |
| name: C++ Compile Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install g++ | |
| run: sudo apt-get update && sudo apt-get install -y g++ | |
| - name: Check C++ files | |
| run: | | |
| chmod +x .github/scripts/check_cpp.sh | |
| .github/scripts/check_cpp.sh | |
| python-check: | |
| name: Python Syntax Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Check Python files | |
| run: | | |
| chmod +x .github/scripts/check_python.sh | |
| .github/scripts/check_python.sh | |
| go-check: | |
| name: Go Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Check Go files | |
| run: | | |
| chmod +x .github/scripts/check_go.sh | |
| .github/scripts/check_go.sh |