add build.sh, install_driver.sh, install_env.sh for CI/CD pipeline #22
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: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| env: | |
| DOCKER_IMAGE: registry-egc.enflame-tech.com/enflame/ci_sast:v1.0-os | |
| SAST_REPO: EnflameTechnology/sast | |
| SAST_BRANCH: main | |
| jobs: | |
| static-check: | |
| runs-on: S60 | |
| steps: | |
| - name: Setup SSH Agent | |
| uses: webfactory/ssh-agent@v0.9.0 | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: Checkout SAST tools | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{env.SAST_REPO}} | |
| ref: ${{env.SAST_BRANCH}} | |
| path: ./sast | |
| ssh-key: ${{ secrets.SSH_PUB_KEY }} | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for full git history to compare changes | |
| path: ./vllm-gcu | |
| ssh-key: ${{ secrets.SSH_PUB_KEY }} | |
| - name: Run static code analysis | |
| run: | | |
| sudo docker run --rm \ | |
| -v "$(pwd)/vllm-gcu:/app" \ | |
| -v "$(pwd)/sast:/sast" \ | |
| -u "$(id -u):$(id -g)" \ | |
| -w /app \ | |
| "${{ env.DOCKER_IMAGE }}" \ | |
| bash -c 'cd /app && python3 /sast/run.py --all_ci_check' |