-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Add Windows release binary builds #150793
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
Open
tstellar
wants to merge
124
commits into
llvm:main
Choose a base branch
from
tstellar:windows-release-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 107 commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
2bc5c1a
Add Windows release binary builds
tstellar 860dff2
Fix
tstellar 6533e44
Fix
tstellar 04381bb
Fix
tstellar 1a9dddd
Fix
tstellar d2dcb30
Fix
tstellar 02bb6da
Merge branch 'main' into windows-release-build
tstellar ccd8dc7
Disable tests
tstellar fd92cc4
Disable tests more
tstellar abd2683
Change ref
tstellar efb08ab
Use subst
tstellar b349aea
Merge remote-tracking branch 'origin/main' into windows-release-build
tstellar 23f5d4a
Use local
tstellar 4216795
Fix
tstellar 006890e
Fix
tstellar 824b6ba
XXX: fix
tstellar 7da80e7
Fix typo
tstellar 3c6be6c
Fix paths
tstellar 71d8dea
Add offload
tstellar 3e7b095
Disable openmp
tstellar a67009d
debug
tstellar 4dc458a
debug
tstellar b1edfb3
Remove subst
tstellar c7d970e
Remove diff
tstellar 84e8055
Fixes
tstellar 4e92806
Don't run tests so many times
tstellar 33283a8
Autocrlf
tstellar 80daeaf
Fix typo
tstellar c6b62cb
Fix
tstellar f12b824
Fix
tstellar 83d7b48
Setup windows
tstellar f0e129a
Merge remote-tracking branch 'origin/main' into HEAD
tstellar 7c70b55
Update
tstellar 16d8f1e
Fix version
tstellar 0e922b6
Remove subst
tstellar a28d6ca
No subst
tstellar 4c28998
Revert "No subst"
tstellar 44da3b2
Revert "Remove subst"
tstellar 8b243f2
Fixes for release script
tstellar eddcf32
Setup python
tstellar c1d9b44
Try to fix python
tstellar 676d58f
More python removal
tstellar 261e061
Fix python again
tstellar 3890307
Fix python
tstellar 7671714
Try with python3.9
tstellar 36a3d0c
Debug
tstellar f613030
Debug
tstellar d0587a9
Debug
tstellar 302d295
debug
tstellar 2ffbafc
Disable tests
tstellar aee79f4
Retry
tstellar d463f0b
fixes
tstellar dd7aa0e
Add upload
tstellar f48bd50
Fix typo
tstellar a636473
Fix typo
tstellar af9dc8b
Fix typo
tstellar cd0aee7
Undo script hacks
tstellar 81a0b9c
workflows: Factor out artifact attestation and upload into a composit…
tstellar 1175fa4
Merge commit '81a0b9c35c57' into windows-release-build
tstellar 5105f2d
Lots of changes
tstellar 0994cfb
Fix
tstellar 16e2c77
Fixes to disable python
tstellar 60eb734
Fix verbose flag
tstellar 0e5f6bd
lldb debug
tstellar 911b195
Debug
tstellar 23ac07e
Debug
tstellar f298a1d
Debug
tstellar b9b23cb
Python fix
tstellar 1764bd5
Fix moving binaries
tstellar 9d2a24e
Fix artifact paths
tstellar 22e2711
Fix typo
tstellar 4eaf6fc
Revert "remove Fortran support for this patch"
ro-i c3a2ecd
remove Fortran specific parts
ro-i e1bf61f
Fix tarball name
tstellar e4bf725
Revert "remove Fortran support for this patch"
ro-i 3eea738
remove Fortran specific parts
ro-i c47a935
Merge remote-tracking branch 'origin/main' into HEAD
tstellar 64c9a4f
use KMP_EXPAND_NAME and add versioned symbol
ro-i 4c4236e
fix formatting
ro-i f4745be
Merge remote-tracking branch 'origin/users/ro-i/openmp-device-uid-fix…
tstellar 7530ab5
Disable attestion creation when uploads are disabled
tstellar e6e54df
Disable attestion creation when uploads are disabled
tstellar 6ba7738
Merge remote-tracking branch 'tstellar/refactor-attestations-pr-2' in…
tstellar 3a49a3d
Remove search
tstellar 7cc3ca7
Remove search
tstellar fc0eb66
Merge remote-tracking branch 'origin/main' into HEAD
tstellar d1f59b2
Revert "[flang] implement show_descriptor intrinsic, a non-standard e…
tstellar 1023d58
Reapply "[flang] implement show_descriptor intrinsic, a non-standard …
tstellar 8ca5a8d
Merge remote-tracking branch 'origin/main' into HEAD
tstellar bbfb34e
Fix path
tstellar 5f858fd
Move upload artifact out of composite action
tstellar 7f43d2a
Merge remote-tracking branch 'tstellar/refactor-attestations-pr-2' in…
tstellar 8e52d46
Integrate new attestation
tstellar 6a5e8f6
Fix
tstellar ddd1d1b
Fixes
tstellar 868383e
workflows/release-binaries: Use upload-release-artifact action for up…
tstellar 90cc60a
Merge remote-tracking branch 'tstellar/release-binary-upload' into HEAD
tstellar 1cc5f87
Integrate into main release workflow
tstellar aef4f4f
Disable old
tstellar fe0c5f2
Fix indentation
tstellar b32c1a4
Fix verswion
tstellar becb649
Fix version
tstellar a202146
Fix autocrlf
tstellar a4d145b
Run windows on depot
tstellar 06e85c2
Fix binary names
tstellar 9b000f3
Undo python debugging
tstellar 990632e
Add python debug
tstellar ba6cbf2
Fix typo
tstellar 54e737b
Fix path
tstellar dc215d3
Python fixes
tstellar 4526175
add setup-python
tstellar a48ce8a
Try setting libs env variable
tstellar 81b8ff8
Merge remote-tracking branch 'origin/main' into HEAD
tstellar 6872fed
Add comment
tstellar 7069c5a
Merge remote-tracking branch 'origin/main' into HEAD
tstellar 99b678c
Remove some debug stuff
tstellar 98255ba
Fix formatting
tstellar ceac04e
Merge remote-tracking branch 'origin/main' into HEAD
tstellar 98eef38
Update python versions
tstellar 5d0c138
Fix pythono version
tstellar a2335b6
Debug
tstellar 76503a9
Use python 3.10
tstellar 9f6e521
Merge remote-tracking branch 'origin/main' into HEAD
tstellar 6537c22
Remove debugging
tstellar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Python Debug | ||
| on: | ||
| push: | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: windows-2022 | ||
| steps: | ||
| - Name: Upload | ||
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 | ||
| with: | ||
| path: | | ||
| /c/hostedtoolcache/windows/Python/3.9.13/x64/ | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,9 +86,17 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions | ||
|
|
||
| # The name of the Windows binaries uses the version from source, so we need | ||
| # to fetch it here. | ||
| - id: version-from-source | ||
| if: runner.os == 'Windows' | ||
| uses: ./.github/workflows/get-llvm-version | ||
|
|
||
| - name: Collect Variables | ||
| id: vars | ||
| env: | ||
| LLVM_VERSION_FROM_SOURCE: ${{ format('{0}.{1}.{2}', steps.version-from-source.outputs.major, steps.version-from-source.outputs.minor, steps.version-from-source.outputs.patch) }} | ||
|
Contributor
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. Might be worth it in a future refactoring to make this an explicit output from the composite workflow. |
||
| shell: bash | ||
| # In order for the test-release.sh script to run correctly, the LLVM | ||
| # source needs to be at the following location relative to the build dir: | ||
|
|
@@ -104,7 +112,11 @@ jobs: | |
| release_version="$trimmed" | ||
| ref="llvmorg-$release_version" | ||
| else | ||
| release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA" | ||
| if [ "$RUNNER_OS" = "Windows" ]; then | ||
| release_version="$LLVM_VERSION_FROM_SOURCE" | ||
| else | ||
| release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA" | ||
| fi | ||
| ref="$GITHUB_SHA" | ||
| fi | ||
| if [ -n "${{ inputs.upload }}" ]; then | ||
|
|
@@ -116,7 +128,19 @@ jobs: | |
| echo "ref=$ref" >> $GITHUB_OUTPUT | ||
| echo "upload=$upload" >> $GITHUB_OUTPUT | ||
|
|
||
| release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH" | ||
| if [ "$RUNNER_OS" = "Windows" ]; then | ||
| case $RUNNER_ARCH in | ||
| "X64" ) | ||
| tar_arch="x86_64" | ||
| ;; | ||
| "ARM64" ) | ||
boomanaiden154 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| tar_arch="aarch64" | ||
| ;; | ||
| esac | ||
| release_binary_basename="clang+llvm-$release_version-$tar_arch-pc-windows-msvc" | ||
| else | ||
| release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH" | ||
| fi | ||
| echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT | ||
| echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT | ||
|
|
||
|
|
@@ -139,7 +163,7 @@ jobs: | |
| fi | ||
|
|
||
| case "${{ inputs.runs-on }}" in | ||
| ubuntu-22.04*) | ||
| ubuntu-22.04* | windows-2022) | ||
| build_runs_on="depot-${{ inputs.runs-on }}-16" | ||
| test_runs_on=$build_runs_on | ||
| ;; | ||
|
|
@@ -181,7 +205,14 @@ jobs: | |
| needs: prepare | ||
| if: github.repository_owner == 'llvm' | ||
| runs-on: ${{ needs.prepare.outputs.build-runs-on }} | ||
| outputs: | ||
| digest: ${{ steps.digest.outputs.digest }} | ||
| artifact-id: ${{ steps.artifact-upload.outputs.artifact-id }} | ||
| steps: | ||
| - name: Setup crlf | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| git config --global core.autocrlf false | ||
|
|
||
| - name: Checkout LLVM | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
|
|
@@ -199,8 +230,9 @@ jobs: | |
| fi | ||
| echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Configure | ||
| - name: Configure Linux/MacOS | ||
| id: build | ||
| if: runner.os != 'Windows' | ||
| shell: bash | ||
| run: | | ||
| # There were some issues on the ARM64 MacOS runners with trying to build x86 object, | ||
|
|
@@ -209,23 +241,55 @@ jobs: | |
| ${{ needs.prepare.outputs.target-cmake-flags }} \ | ||
| -C clang/cmake/caches/Release.cmake | ||
|
|
||
| - name: Build | ||
| - name: Build Linux/MacOS | ||
| if: runner.os != 'Windows' | ||
| shell: bash | ||
| run: | | ||
| ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package | ||
| release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'` | ||
| mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} . | ||
|
|
||
|
|
||
|
|
||
| - name: Build Windows | ||
| id: build-windows | ||
| if: runner.os == 'Windows' | ||
| env: | ||
| LLVM_VERSION: ${{ needs.prepare.outputs.release-version }} | ||
| run: | | ||
| subst S: ${{ github.workspace }} | ||
| cd S:\llvm\utils\release\ | ||
| .\build_llvm_release.bat "--$($env:RUNNER_ARCH.ToLower())" --version $env:LLVM_VERSION --local-python --skip-checkout | ||
| $installer = (Get-ChildItem -Recurse -Filter "*.exe" | Select-Object -First 1).fullName | ||
| $tarball = (Get-ChildItem -Recurse -Filter "*.tar.xz" | Select-Object -First 1).fullName | ||
| # Move installer to top-level directory so it is easier to upload. | ||
| mv $installer $env:GITHUB_WORKSPACE | ||
| mv $tarball $env:GITHUB_WORKSPACE | ||
| echo "windows-installer-filename=$(Split-Path -Path $installer -Leaf)" >> $env:GITHUB_OUTPUT | ||
|
|
||
| - name: Generate sha256 digest for binaries | ||
| id: digest | ||
| shell: bash | ||
| env: | ||
| RELEASE_BINARY_FILENAME: ${{ needs.prepare.outputs.release-binary-filename }} | ||
| # This will be empty on non-Windows builds. | ||
| WINDOWS_INSTALLER_FILENAME: ${{ steps.build-windows.outputs.windows-installer-filename }} | ||
| run: | | ||
| echo "digest=$(cat $WINDOWS_INSTALLER_FILENAME $RELEASE_BINARY_FILENAME | sha256sum | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT | ||
|
|
||
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | ||
| id: artifact-upload | ||
| with: | ||
| name: ${{ runner.os }}-${{ runner.arch }}-release-binary | ||
| # Due to path differences on Windows when running in bash vs running on node, | ||
| # we need to search for files in the current workspace. | ||
| # The steps.build-windows.* variables will be empty on Linux/MacOS. | ||
| path: | | ||
| ${{ needs.prepare.outputs.release-binary-filename }} | ||
| ${{ steps.build-windows.outputs.windows-installer-filename }} | ||
|
|
||
| - name: Run Tests | ||
| # These almost always fail so don't let them fail the build and prevent the uploads. | ||
| if : runner.os != 'Windows' | ||
| continue-on-error: true | ||
| run: | | ||
| ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all | ||
|
|
@@ -245,45 +309,19 @@ jobs: | |
| attestations: write # For artifact attestations | ||
|
|
||
| steps: | ||
| - name: Checkout Release Scripts | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| sparse-checkout: | | ||
| llvm/utils/release/github-upload-release.py | ||
| llvm/utils/git/requirements.txt | ||
| sparse-checkout-cone-mode: false | ||
|
|
||
| - name: 'Download artifact' | ||
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | ||
| with: | ||
| pattern: '*-release-binary' | ||
| merge-multiple: true | ||
|
|
||
| - name: Attest Build Provenance | ||
| id: provenance | ||
| uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 | ||
| with: | ||
| subject-path: ${{ needs.prepare.outputs.release-binary-filename }} | ||
|
|
||
| - name: Rename attestation file | ||
| run: | ||
| mv ${{ steps.provenance.outputs.bundle-path }} ${{ needs.prepare.outputs.release-binary-filename }}.jsonl | ||
|
|
||
| - name: Upload Build Provenance | ||
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | ||
| with: | ||
| name: ${{ needs.prepare.outputs.release-binary-filename }}-attestation | ||
| path: ${{ needs.prepare.outputs.release-binary-filename }}.jsonl | ||
|
|
||
| - name: Install Python Requirements | ||
| run: | | ||
| pip install --require-hashes -r ./llvm/utils/git/requirements.txt | ||
|
|
||
| - name: Upload Release | ||
| shell: bash | ||
| run: | | ||
| ./llvm/utils/release/github-upload-release.py \ | ||
| --token ${{ github.token }} \ | ||
| --release ${{ needs.prepare.outputs.release-version }} \ | ||
| upload \ | ||
| --files ${{ needs.prepare.outputs.release-binary-filename }}* | ||
| - name: Checkout Release Scripts | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| sparse-checkout: | | ||
| .github/workflows/upload-release-artifact | ||
| llvm/utils/release/github-upload-release.py | ||
| llvm/utils/git/requirements.txt | ||
| sparse-checkout-cone-mode: false | ||
|
|
||
| - name: Upload Artifacts | ||
| uses: ./.github/workflows/upload-release-artifact | ||
| with: | ||
| artifact-id: ${{ needs.build-release-package.outputs.artifact-id }} | ||
| attestation-name: ${{ needs.prepare.outputs.release-binary-filename }} | ||
| digest: ${{ needs.build-release-package.outputs.digest }} | ||
| upload: true | ||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.