[PR] Apply multiple sanitizers #1190
Workflow file for this run
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: resolve CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| - name: Install deps | |
| run: make install-deps | |
| - name: Build | |
| run: make build | |
| - name: Install | |
| run: make install | |
| - name: Test | |
| run: make test | |
| - name: Build Examples | |
| run: ./examples/openssl.sh | |
| trigger-gitlab: | |
| runs-on: ubuntu-latest | |
| needs: [build-and-test] | |
| # Skip trigger gitlab on draft PRs | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
| steps: | |
| - name: Trigger GitLab pipeline | |
| env: | |
| GITLAB_URL: ${{ secrets.GITLAB_URL }} | |
| GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_PIPELINE_TRIGGER_TOKEN }} | |
| GITLAB_API_TOKEN: ${{ secrets.GITLAB_PIPELINE_STATUS_TOKEN }} | |
| GITLAB_PROJECT_ID: "376" # numeric project ID | |
| GITLAB_REF: "main" # branch to trigger in GitLab | |
| RESOLVE_REPO: ${{ github.repository }} | |
| RESOLVE_REPO_SHA: ${{ github.sha }} | |
| TRIGGERING_REF: ${{ github.ref }} | |
| TRIGGERING_BRANCH: ${{ github.event.pull_request && github.head_ref || github.ref_name }} | |
| TRIGGERING_ACTOR: ${{ github.triggering_actor }} | |
| POLL_INTERVAL: 10 | |
| run: | | |
| # Create pipeline | |
| create_resp=$(curl -sS --fail -X POST \ | |
| -F token=$GITLAB_TRIGGER_TOKEN \ | |
| -F "ref=$GITLAB_REF" \ | |
| -F "variables[RESOLVE_REPO]=$RESOLVE_REPO" \ | |
| -F "variables[RESOLVE_REPO_BRANCH]=$RESOLVE_REPO_SHA" \ | |
| -F "variables[TRIGGERING_REF]=$TRIGGERING_REF" \ | |
| -F "variables[TRIGGERING_BRANCH]=$TRIGGERING_BRANCH" \ | |
| -F "variables[TRIGGERING_ACTOR]=$TRIGGERING_ACTOR" \ | |
| "${GITLAB_URL}/api/v4/projects/$GITLAB_PROJECT_ID/trigger/pipeline") | |
| pipeline_id=$(echo "$create_resp" | jq -r '.id // empty') | |
| if [[ -z "$pipeline_id" ]]; then | |
| echo "Failed to create pipeline. Response:" | |
| echo "$create_resp" | |
| exit 2 | |
| fi | |
| echo "Started pipeline id=${pipeline_id} for ref=${GITLAB_REF}" | |
| # Poll status | |
| while true; do | |
| status_resp=$(curl -sS --fail -H "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" \ | |
| "${GITLAB_URL}/api/v4/projects/${GITLAB_PROJECT_ID}/pipelines/${pipeline_id}") | |
| status=$(echo "$status_resp" | jq -r '.status // empty') | |
| echo "pipeline=${pipeline_id} status=${status}" | |
| case "$status" in | |
| success) | |
| echo "Pipeline succeeded" | |
| exit 0 | |
| ;; | |
| failed|canceled|skipped) | |
| echo "Pipeline finished with status: $status" | |
| exit 3 | |
| ;; | |
| manual) | |
| echo "Pipeline waiting for manual action" | |
| exit 0 | |
| ;; | |
| running|pending) | |
| ;; | |
| *) | |
| echo "Unknown status: $status" | |
| ;; | |
| esac | |
| sleep "$POLL_INTERVAL" | |
| done |