-
Notifications
You must be signed in to change notification settings - Fork 7
Add Windows pipeline & Sync with upstream code #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
4becfe4
43096b6
f75cc7c
ac525b3
14b8f54
e5e59f4
5739d2e
f4b1197
ddf8d4f
24e92e0
74fb793
81d121a
db693b0
a440bb4
eabc550
b11a4c0
8b4cd4c
93a774d
48d8c4c
143152a
79f2cf9
b48e4ea
4bd25cc
47a557a
84ccb45
02ab9d5
bd7fd7a
1246e51
163eaf0
63237fc
3876c87
b01d9d1
c512246
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,109 @@ | |||||||||||||||||||||||
| name: Windows_CI | |||||||||||||||||||||||
| on: | |||||||||||||||||||||||
| push: | |||||||||||||||||||||||
| branches: | |||||||||||||||||||||||
| - main | |||||||||||||||||||||||
| - rel-* | |||||||||||||||||||||||
| pull_request: | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| concurrency: | |||||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | |||||||||||||||||||||||
| cancel-in-progress: true | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||
| Win32_debug_no_ort: | |||||||||||||||||||||||
| runs-on: windows-2022 | |||||||||||||||||||||||
| permissions: | |||||||||||||||||||||||
| actions: read | |||||||||||||||||||||||
| contents: read | |||||||||||||||||||||||
| security-events: write | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - name: Initialize CodeQL | |||||||||||||||||||||||
| uses: github/codeql-action/init@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| config-file: ./.github/codeql/codeql-config.yml | |||||||||||||||||||||||
| languages: 'cpp' | |||||||||||||||||||||||
| - run: | | |||||||||||||||||||||||
| cmake --workflow --preset windows_win32_debug_no_ort_workflow | |||||||||||||||||||||||
| - name: Perform CodeQL Analysis | |||||||||||||||||||||||
| uses: github/codeql-action/analyze@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| category: "/language:cpp" | |||||||||||||||||||||||
| output: sarif-results | |||||||||||||||||||||||
| upload: failure-only | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: filter-sarif | |||||||||||||||||||||||
| uses: advanced-security/filter-sarif@v1 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| patterns: | | |||||||||||||||||||||||
| +**/*.cc | |||||||||||||||||||||||
| +**/*.h | |||||||||||||||||||||||
| -tests/**/*.* | |||||||||||||||||||||||
| -build/**/*.* | |||||||||||||||||||||||
| input: sarif-results/cpp.sarif | |||||||||||||||||||||||
| output: sarif-results/cpp.sarif | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Upload SARIF | |||||||||||||||||||||||
| uses: github/codeql-action/upload-sarif@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| sarif_file: sarif-results/cpp.sarif | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| Win32_release_no_ort: | |||||||||||||||||||||||
| runs-on: windows-2022 | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - run: | | |||||||||||||||||||||||
| cmake --workflow --preset windows_win32_release_no_ort_workflow | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| WinX64_debug_no_ort: | |||||||||||||||||||||||
|
Comment on lines
+25
to
+33
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 6 months ago To fix the problem, add a permissions: {}Or, as a safer default if you expect the jobs may need to checkout code (typical with GitHub Actions): permissions:
contents: readThis should be immediately below the
Suggested changeset
1
.github/workflows/win_ci.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
| runs-on: windows-2022 | |||||||||||||||||||||||
| permissions: | |||||||||||||||||||||||
| actions: read | |||||||||||||||||||||||
| contents: read | |||||||||||||||||||||||
| security-events: write | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - name: Initialize CodeQL | |||||||||||||||||||||||
| uses: github/codeql-action/init@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| config-file: ./.github/codeql/codeql-config.yml | |||||||||||||||||||||||
| languages: 'cpp' | |||||||||||||||||||||||
| - run: | | |||||||||||||||||||||||
| cmake --workflow --preset windows_x64_debug_no_ort_workflow | |||||||||||||||||||||||
| - name: Perform CodeQL Analysis | |||||||||||||||||||||||
| uses: github/codeql-action/analyze@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| category: "/language:cpp" | |||||||||||||||||||||||
| output: sarif-results | |||||||||||||||||||||||
| upload: failure-only | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: filter-sarif | |||||||||||||||||||||||
| uses: advanced-security/filter-sarif@v1 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| patterns: | | |||||||||||||||||||||||
| +**/*.cc | |||||||||||||||||||||||
| +**/*.h | |||||||||||||||||||||||
| -tests/**/*.* | |||||||||||||||||||||||
| -build/**/*.* | |||||||||||||||||||||||
| input: sarif-results/cpp.sarif | |||||||||||||||||||||||
| output: sarif-results/cpp.sarif | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Upload SARIF | |||||||||||||||||||||||
| uses: github/codeql-action/upload-sarif@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| sarif_file: sarif-results/cpp.sarif | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| WinX64_release_no_ort: | |||||||||||||||||||||||
|
Comment on lines
+34
to
+41
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 6 months ago To fix this problem, we need to explicitly set a
Suggested changeset
1
.github/workflows/win_ci.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
| runs-on: windows-2022 | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - run: | | |||||||||||||||||||||||
| cmake --workflow --preset windows_x64_release_no_ort_workflow | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| WinX64_release: | |||||||||||||||||||||||
|
Comment on lines
+42
to
+49
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 6 months ago General fix approach: How to fix specifically:
Suggested changeset
1
.github/workflows/win_ci.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
| runs-on: windows-2022 | |||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||||||||
| - run: | | |||||||||||||||||||||||
| cmake --workflow --preset windows_x64_release_workflow | |||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 6 months ago
To fix the problem, we should explicitly declare a
permissions:block in the workflow file to restrict the permissions of the GITHUB_TOKEN. Since the jobs in this workflow appear to be running builds/tests and are not performing actions such as pushing to the repository or managing issues/pull requests, the minimum required privilege is likelycontents: read. This permissions block should be added at the top level, just after the workflowname:and before any jobs, to apply to all jobs unless overridden. No changes to job definitions or behavior are required. Simply add the following block:No imports or definitions are needed for this change.