Compare commits
No commits in common. 'main' and 'master' have entirely different histories.
@ -1 +0,0 @@
|
||||
* @actions/setup-actions-team
|
@ -1,18 +0,0 @@
|
||||
name: Generate Go package
|
||||
run-name: Generate Go ${{ inputs.VERSION || '1.19.0' }}
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'releases/1.17.4.1'
|
||||
- 'releases/**'
|
||||
- main
|
||||
|
||||
jobs:
|
||||
go:
|
||||
name: Go
|
||||
uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@main
|
||||
with:
|
||||
tool-name: "go"
|
||||
tool-version: ${{ inputs.VERSION || '1.19.0' }}
|
||||
publish-release: ${{ inputs.PUBLISH_RELEASES || false }}
|
||||
secrets: inherit
|
@ -1,16 +0,0 @@
|
||||
name: CodeQL analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '0 3 * * 0'
|
||||
|
||||
jobs:
|
||||
call-codeQL-analysis:
|
||||
name: CodeQL analysis
|
||||
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
|
||||
with:
|
||||
languages: "['go']"
|
@ -1,10 +0,0 @@
|
||||
name: Create Pull Request
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
create-pr:
|
||||
uses: actions/versions-package-tools/.github/workflows/create-pr-to-update-manifest.yml@main
|
||||
with:
|
||||
tool-name: "go"
|
||||
secrets: inherit
|
@ -1,13 +0,0 @@
|
||||
name: Get Go versions
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3,15 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
get-new-go-versions:
|
||||
uses: actions/versions-package-tools/.github/workflows/get-new-tool-versions.yml@main
|
||||
with:
|
||||
tool-name: "Go"
|
||||
image-url: "https://go.dev/images/gopher-footer.jpg"
|
||||
secrets: inherit
|
@ -1,21 +0,0 @@
|
||||
name: Validate manifest
|
||||
on:
|
||||
# The GITHUB_TOKEN secret is used to create a PR
|
||||
# The pull_request event will not be triggered by it
|
||||
# That's one of the reasons we need the schedule to validate the versions-manifest.json file
|
||||
schedule:
|
||||
- cron: '0 8,20 * * *'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'versions-manifest.json'
|
||||
|
||||
jobs:
|
||||
manifest:
|
||||
uses: actions/versions-package-tools/.github/workflows/validate-manifest.yml@main
|
||||
with:
|
||||
tool-name: "Go"
|
||||
image-url: "https://go.dev/images/gopher-footer.jpg"
|
||||
secrets: inherit
|
@ -0,0 +1,65 @@
|
||||
name: $(date:yyyyMMdd)$(rev:.r)-Go-$(VERSION)
|
||||
trigger: none
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
paths:
|
||||
exclude:
|
||||
- versions-manifest.json
|
||||
|
||||
stages:
|
||||
- stage: Build_Go_Darwin
|
||||
dependsOn: []
|
||||
variables:
|
||||
Platform: darwin
|
||||
Architecture: x64
|
||||
jobs:
|
||||
- template: /azure-pipelines/templates/build-job.yml
|
||||
|
||||
- stage: Test_Go_Darwin
|
||||
condition: succeeded()
|
||||
dependsOn: Build_Go_Darwin
|
||||
variables:
|
||||
VmImage: macOS-latest
|
||||
Platform: darwin
|
||||
Architecture: x64
|
||||
jobs:
|
||||
- template: /azure-pipelines/templates/test-job.yml
|
||||
|
||||
- stage: Build_Go_Linux
|
||||
dependsOn: []
|
||||
variables:
|
||||
Platform: linux
|
||||
Architecture: x64
|
||||
jobs:
|
||||
- template: /azure-pipelines/templates/build-job.yml
|
||||
|
||||
- stage: Test_Go_Linux
|
||||
condition: succeeded()
|
||||
dependsOn: Build_Go_Linux
|
||||
variables:
|
||||
VmImage: ubuntu-latest
|
||||
Platform: linux
|
||||
Architecture: x64
|
||||
jobs:
|
||||
- template: /azure-pipelines/templates/test-job.yml
|
||||
|
||||
- stage: Build_Go_Windows
|
||||
dependsOn: []
|
||||
variables:
|
||||
Platform: win32
|
||||
Architecture: x64
|
||||
jobs:
|
||||
- template: /azure-pipelines/templates/build-job.yml
|
||||
|
||||
- stage: Test_Go_Windows
|
||||
condition: succeeded()
|
||||
dependsOn: Build_Go_Windows
|
||||
variables:
|
||||
VmImage: windows-latest
|
||||
Platform: win32
|
||||
Architecture: x64
|
||||
jobs:
|
||||
- template: /azure-pipelines/templates/test-job.yml
|
@ -0,0 +1,21 @@
|
||||
jobs:
|
||||
- job: Build_Go
|
||||
timeoutInMinutes: 90
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Build Go $(Version)'
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: './builders/build-go.ps1'
|
||||
arguments: '-Version $(Version) -Platform $(Platform) -Architecture $(Architecture)'
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: 'Publish Artifact: Go $(Version)'
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||
artifactName: 'go-$(Version)-$(Platform)-$(Architecture)'
|
@ -0,0 +1,75 @@
|
||||
jobs:
|
||||
- job: Test_Go
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
vmImage: $(VmImage)
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Fully cleanup the toolcache directory before testing
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: helpers/clean-toolcache.ps1
|
||||
arguments: -ToolName "go"
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
source: 'current'
|
||||
artifact: 'go-$(Version)-$(Platform)-$(Architecture)'
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- task: ExtractFiles@1
|
||||
inputs:
|
||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/go-$(Version)-$(Platform)-$(Architecture).*'
|
||||
destinationFolder: $(Build.BinariesDirectory)
|
||||
cleanDestinationFolder: false
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Apply build artifact to the local machines'
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
if ("$(Platform)" -match 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh }
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
- task: GoTool@0
|
||||
inputs:
|
||||
version: '$(Version)'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Wait for the logs'
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
Write-Host "Fake step that do nothing"
|
||||
Write-Host "We need it because log of previous step 'Use Go' is not available here yet."
|
||||
Write-Host "In testing step (Go.Tests.ps1) we analyze build log of 'GoTool' task"
|
||||
Write-Host "to determine if Go version was consumed from cache and was downloaded"
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Run tests'
|
||||
inputs:
|
||||
TargetType: inline
|
||||
script: |
|
||||
Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1
|
||||
Import-Module Pester
|
||||
$pesterParams = @{
|
||||
Path="./Go.Tests.ps1";
|
||||
Parameters=@{
|
||||
Version="$(Version)";
|
||||
}
|
||||
}
|
||||
Invoke-Pester -Script $pesterParams -OutputFile "$(Build.SourcesDirectory)/tests/test_results.xml" -OutputFormat NUnitXml
|
||||
workingDirectory: '$(Build.SourcesDirectory)/tests'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish test results'
|
||||
inputs:
|
||||
testResultsFiles: '*.xml'
|
||||
testResultsFormat: NUnit
|
||||
searchFolder: 'tests'
|
||||
failTaskOnFailedTests: true
|
||||
testRunTitle: "Go $(Version)-$(Platform)"
|
||||
condition: always()
|
@ -1 +1 @@
|
||||
Subproject commit 6f1aa3ce73ce0ea4b58995a63b56a8677607762a
|
||||
Subproject commit 1069e7a4ece355bd321909454fc1f9f7244eb03b
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue