-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Draft
tstellar
wants to merge
69
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.
+203
−23
Draft
Changes from 60 commits
Commits
Show all changes
69 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 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,91 @@ | ||
| name: Release Binaries Windows | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
| inputs: | ||
| release-version: | ||
| description: 'Release Version' | ||
| required: false | ||
| type: string | ||
| upload: | ||
| description: 'Upload binaries to the release page' | ||
| required: true | ||
| default: false | ||
|
|
||
|
|
||
| permissionks: | ||
| contents: read # Default everything to read-only | ||
|
|
||
| jobs: | ||
| build-windows-release: | ||
| runs-on: ${{ matrix.runs-on }} | ||
| if: github.repository_owner == 'llvm' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| runs-on: | ||
| - depot-windows-2022-16 | ||
| - windows-11-arm | ||
| steps: | ||
| - name: Setup crlf | ||
| run: | | ||
| git config --global core.autocrlf false | ||
| - name: Setup Python | ||
| id: setup-python | ||
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | ||
| with: | ||
| python-version: '3.9' | ||
| - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1A | ||
| with: | ||
| ref: ${{ (inputs.release-version && format('llvmorg-{0}', inputs.release-version)) || github.sha }} | ||
| - id: version | ||
| uses: ./.github/workflows/get-llvm-version | ||
| - id: variables | ||
| shell: bash | ||
| run: | | ||
| if [ -z "${{ inputs.release-version }}" ]; then | ||
| version_string="${{ format('{0}.{1}.{2}', steps.version.outputs.major, steps.version.outputs.minor, steps.version.outputs.patch) }}" | ||
| else | ||
| version_string="${{inputs.release-version }}" | ||
| fi | ||
| case $RUNNER_ARCH in | ||
| "X64" ) | ||
| installer_arch="win64" | ||
| tar_arch="x86_64" | ||
| installer_dir_arch="amd64" | ||
| script_options="--x64" | ||
| ;; | ||
| "ARM64" ) | ||
| installer_arch="woa64" | ||
| tar_arch="aarch64" | ||
| installer_dir_arch="arm64" | ||
| script_options="--arm64" | ||
| ;; | ||
| esac | ||
| echo "installer-name=LLVM-$version_string-$installer_arch.exe" >> $GITHUB_OUTPUT | ||
| echo "tar-name=$tar_arch-pc-windows-msvc.tar.xz" >> $GITHUB_OUTPUT | ||
| echo "installer-dir=build_$installer_dir_arch" >> $GITHUB_OUTPUT | ||
| echo "script-options=$script_options" >> $GITHUB_OUTPUT | ||
| echo "version-string=$version_string" >> $GITHUB_OUTPUT | ||
| - env: | ||
| LDFLAGS: "-Wl,--verbose" | ||
| run: | | ||
| subst S: ${{ github.workspace }} | ||
| cd S:\llvm\utils\release\ | ||
| .\build_llvm_release.bat ${{ steps.variables.outputs.script-options }} --version ${{ steps.variables.outputs.version-string }} --local-python --skip-checkout | ||
| # Move installer to top-level directory so it is easier to upload. | ||
| mv ${{ steps.variables.outputs.installer-dir }}/${{ steps.variables.outputs.installer-name }} . | ||
|
|
||
| - name: Upload Installer | ||
| uses: ./.github/workflows/upload-release-artifact | ||
| with: | ||
| files: ${{ steps.variables.outputs.installer-name }} | ||
| upload: false | ||
|
|
||
| - name: Upload Tar | ||
| uses: ./.github/workflows/upload-release-artifact | ||
| with: | ||
| files: ${{ steps.variables.outputs.tar-name }} | ||
| upload: false | ||
|
|
||
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 |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: Upload Release Artifact | ||
| description: >- | ||
| Upload release artifact along with an attestation. The action assumes that | ||
| the llvm-project repository has already been checked out. | ||
| inputs: | ||
| files: | ||
| description: >- | ||
| Files to be uploaded. This can contain bash wildcards. | ||
| required: true | ||
| release-version: | ||
| description: >- | ||
| The release where the artifact will be attached. | ||
| required: true | ||
| upload: | ||
| description: >- | ||
| Whether or not to upload the file and attestation to the release. If this | ||
| is set to false, then the atteastion will still be generated and attached as | ||
| an artifact to the workflow, but won't be uploaded to the release. | ||
| default: true | ||
| user-token: | ||
| description: >- | ||
| Token with premissions to read llvm teams that is used to ensure that | ||
| the person who triggred the action has permission to upload artifacts. | ||
| This is required if upload is true. | ||
| requred: false | ||
| attestation-name: | ||
| description: >- | ||
| This will be used for the artifact name that is attached to the workflow and | ||
| will be used as the basename for the attestation file which will be called | ||
| $attestation-name.jsonl. If this is not set, it will default | ||
| to the falue of `files`. | ||
| required: false | ||
|
|
||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Collect Variables | ||
| id: vars | ||
| shell: bash | ||
| env: | ||
| INPUTS_ATTESTATION_NAME: ${{ inputs.attestation-name }} | ||
| INPUTS_FILES: ${{ inputs.files }} | ||
| run: | | ||
| if [ -z "$INPUTS_ATTESTATION_NAME" ]; then | ||
| name="$INPUTS_FILES" | ||
| else | ||
| name="$INPUTS_ATTESTATION_NAME" | ||
| fi | ||
| echo "attestation-name=$name" >> $GITHUB_OUTPUT | ||
| - name: Attest Build Provenance | ||
| id: provenance | ||
| uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 | ||
| with: | ||
| subject-path: ${{ inputs.files }} | ||
|
|
||
| - name: Rename attestation file | ||
| shell: bash | ||
| run: | | ||
| mv ${{ steps.provenance.outputs.bundle-path }} ${{ steps.vars.outputs.attestation-name }}.jsonl | ||
|
|
||
| - name: Upload Build Provenance | ||
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | ||
| with: | ||
| name: ${{ steps.vars.outputs.attestation-name }} | ||
| path: | | ||
| ${{ inputs.files }} | ||
| ${{ steps.vars.outputs.attestation-name }}.jsonl | ||
|
|
||
| - name: Install Python Requirements | ||
| if: inputs.upload == 'true' | ||
| shell: bash | ||
| run: | | ||
| pip install --require-hashes -r ./llvm/utils/git/requirements.txt | ||
|
|
||
| - name: Check Permissions | ||
| if: inputs.upload == 'true' | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| USER_TOKEN: ${{ inputs.user-token }} | ||
| shell: bash | ||
| run: | | ||
| ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions | ||
| - name: Upload Release | ||
| shell: bash | ||
| if: inputs.upload == 'true' | ||
| run: | | ||
| ./llvm/utils/release/github-upload-release.py \ | ||
| --token ${{ github.token }} \ | ||
| --release ${{ inputs.release-version }} \ | ||
| upload \ | ||
| --files ${{ inputs.files }} ${{ steps.vars.outputs.attestation-name}}.jsonl |
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.