-
-
Notifications
You must be signed in to change notification settings - Fork 266
[CI] Split build dependencies into own job on Windows #984
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -56,6 +56,7 @@ | |
| outputs: | ||
| matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
| crate-build-matrix: ${{ steps.set-matrix.outputs.crate-build-matrix }} | ||
| dep-build-matrix: ${{ steps.set-matrix.outputs.dep-build-matrix }} | ||
| any_builds: ${{ steps.set-matrix.outputs.any_builds }} | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
|
|
@@ -97,6 +98,7 @@ | |
| # Extract python-build matrix | ||
| echo "matrix=$(jq -c '."python-build"' matrix.json)" >> $GITHUB_OUTPUT | ||
| echo "crate-build-matrix=$(jq -c '."crate-build"' matrix.json)" >> $GITHUB_OUTPUT | ||
| echo "dep-build-matrix=$(jq -c '."deps-build"' matrix.json)" >> $GITHUB_OUTPUT | ||
|
|
||
| # Display the matrix for debugging too | ||
| cat matrix.json | jq | ||
|
|
@@ -116,6 +118,7 @@ | |
| needs: | ||
| - generate-matrix | ||
| - crate-build | ||
| - build-deps | ||
| # Permissions used for actions/attest-build-provenance | ||
| permissions: | ||
| id-token: write | ||
|
|
@@ -151,11 +154,18 @@ | |
| - name: Bootstrap Python environment | ||
| run: | | ||
| uv run build.py --help | ||
|
|
||
Check warningCode scanning / zizmor usage of GitHub Actions misfeatures Warning
usage of GitHub Actions misfeatures
|
||
| - name: Download build dependencies | ||
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | ||
| with: | ||
| name: build-deps-${{ matrix.target_triple }}-${{ matrix.build_options}} | ||
| path: build | ||
|
|
||
| - name: Build | ||
| if: ${{ ! matrix.dry-run }} | ||
| shell: cmd | ||
| run: | | ||
| DIR | ||
| IF "%MATRIX_VS_VERSION%"=="2026" ( | ||
| call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\%MATRIX_VCVARS%" | ||
| ) ELSE ( | ||
|
|
@@ -185,3 +195,56 @@ | |
| run: | | ||
| $Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative | ||
| .\pythonbuild.exe validate-distribution --run $Dists | ||
|
|
||
| build-deps: | ||
| timeout-minutes: 90 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 90 minutes? |
||
| needs: | ||
| - generate-matrix | ||
| # Permissions used for actions/attest-build-provenance | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this comment referring to?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Left over copy and paste from the |
||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| matrix: ${{ fromJson(needs.generate-matrix.outputs.dep-build-matrix) }} | ||
| fail-fast: false | ||
| name: build-deps / ${{ matrix.target_triple }} / ${{ matrix.build_options }} | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Install Cygwin Environment | ||
| uses: cygwin/cygwin-install-action@f2009323764960f80959895c7bc3bb30210afe4d # v6 | ||
Check warningCode scanning / zizmor detects commit SHAs that don't match their version comment tags Warning
detects commit SHAs that don't match their version comment tags
|
||
| with: | ||
| packages: autoconf automake libtool | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4 | ||
| with: | ||
| enable-cache: false | ||
|
|
||
| # We need to do this before we activate the VC++ environment or else binary packages | ||
| # don't get compiled properly. | ||
| - name: Bootstrap Python environment | ||
| run: | | ||
| uv run build.py --help | ||
|
|
||
| - name: Build | ||
| if: ${{ ! matrix.dry-run }} | ||
| shell: cmd | ||
|
||
| run: | | ||
| IF "%MATRIX_VS_VERSION%"=="2026" ( | ||
| call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\%MATRIX_VCVARS%" | ||
| ) ELSE ( | ||
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\%MATRIX_VCVARS%" | ||
| ) | ||
| uv run build.py --only-deps --sh c:\cygwin\bin\sh.exe --options %MATRIX_BUILD_OPTIONS% --vs %MATRIX_VS_VERSION% | ||
| env: | ||
| MATRIX_VCVARS: ${{ matrix.vcvars }} | ||
| MATRIX_BUILD_OPTIONS: ${{ matrix.build_options }} | ||
| MATRIX_VS_VERSION: ${{ matrix.vs_version }} | ||
|
|
||
| - name: Upload Build Dependencies | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| with: | ||
| name: build-deps-${{ matrix.target_triple }}-${{ matrix.build_options }} | ||
| path: build/*.tar | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We generally prefer verbose names like "dependency" over short ones like "dep"