-
Notifications
You must be signed in to change notification settings - Fork 1k
ci: use TinyGo version in artifact files #4552
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
Merged
Merged
Changes from all commits
Commits
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
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,4 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Extract the version string from the source code, to be stored in a variable. | ||
| grep 'const version' goenv/version.go | sed 's/^const version = "\(.*\)"$/version=\1/g' | ||
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 |
|---|---|---|
|
|
@@ -14,6 +14,8 @@ concurrency: | |
| jobs: | ||
| build-windows: | ||
| runs-on: windows-2022 | ||
| outputs: | ||
| version: ${{ steps.version.outputs.version }} | ||
| steps: | ||
| - name: Configure pagefile | ||
| uses: al-cheb/[email protected] | ||
|
|
@@ -32,6 +34,10 @@ jobs: | |
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - name: Extract TinyGo version | ||
| id: version | ||
| shell: bash | ||
| run: ./.github/workflows/tinygo-extract-version.sh | tee -a "$GITHUB_OUTPUT" | ||
| - name: Install Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
|
|
@@ -108,7 +114,7 @@ jobs: | |
| - name: Make release artifact | ||
| shell: bash | ||
| working-directory: build/release | ||
| run: 7z -tzip a release.zip tinygo | ||
| run: 7z -tzip a tinygo${{ steps.version.outputs.version }}.windows-amd64.zip tinygo | ||
| - name: Publish release artifact | ||
| # Note: this release artifact is double-zipped, see: | ||
| # https://github.com/actions/upload-artifact/issues/39 | ||
|
|
@@ -118,8 +124,8 @@ jobs: | |
| # We're doing the former here, to keep artifact uploads fast. | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: windows-amd64-double-zipped | ||
| path: build/release/release.zip | ||
| name: windows-amd64-double-zipped-${{ steps.version.outputs.version }} | ||
| path: build/release/tinygo${{ steps.version.outputs.version }}.windows-amd64.zip | ||
|
|
||
| smoke-test-windows: | ||
| runs-on: windows-2022 | ||
|
|
@@ -148,12 +154,12 @@ jobs: | |
| - name: Download TinyGo build | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: windows-amd64-double-zipped | ||
| name: windows-amd64-double-zipped-${{ needs.build-windows.outputs.version }} | ||
| path: build/ | ||
| - name: Unzip TinyGo build | ||
| shell: bash | ||
| working-directory: build | ||
| run: 7z x release.zip -r | ||
| run: 7z x tinygo*.windows-amd64.zip -r | ||
| - name: Smoke tests | ||
| shell: bash | ||
| run: make smoketest TINYGO=$(PWD)/build/tinygo/bin/tinygo | ||
|
|
@@ -178,12 +184,12 @@ jobs: | |
| - name: Download TinyGo build | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: windows-amd64-double-zipped | ||
| name: windows-amd64-double-zipped-${{ needs.build-windows.outputs.version }} | ||
| path: build/ | ||
| - name: Unzip TinyGo build | ||
| shell: bash | ||
| working-directory: build | ||
| run: 7z x release.zip -r | ||
| run: 7z x tinygo*.windows-amd64.zip -r | ||
| - name: Test stdlib packages | ||
| run: make tinygo-test TINYGO=$(PWD)/build/tinygo/bin/tinygo | ||
|
|
||
|
|
@@ -214,11 +220,11 @@ jobs: | |
| - name: Download TinyGo build | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: windows-amd64-double-zipped | ||
| name: windows-amd64-double-zipped-${{ needs.build-windows.outputs.version }} | ||
| path: build/ | ||
| - name: Unzip TinyGo build | ||
| shell: bash | ||
| working-directory: build | ||
| run: 7z x release.zip -r | ||
| run: 7z x tinygo*.windows-amd64.zip -r | ||
| - name: Test stdlib packages on wasip1 | ||
| run: make tinygo-test-wasip1-fast TINYGO=$(PWD)/build/tinygo/bin/tinygo | ||
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.