Compare commits
79 Commits
1.15.1-235
...
1.18.5-277
Author | SHA1 | Date | |
---|---|---|---|
|
58362e99d6 | ||
|
82e37a11c9 | ||
|
57ea5543a0 | ||
|
6ac541a152 | ||
|
710d16ce77 | ||
|
b591576203 | ||
|
b97793e13e | ||
|
b844ed6c6d | ||
|
8a0545cb70 | ||
|
34306dce78 | ||
|
2e49d3e53d | ||
|
c18c2ac1ac | ||
|
b2fe27c0b9 | ||
|
c27e49f619 | ||
|
9d9bd2c789 | ||
|
017e64abe3 | ||
|
dfb38cff48 | ||
|
4e55ba98df | ||
|
6e78c4b835 | ||
|
6ab1ee80cb | ||
|
6712407a7f | ||
|
91c89f70d1 | ||
|
13c5817e5c | ||
|
38f14f667d | ||
|
5735a29e98 | ||
|
25beb00b9f | ||
|
260b2b7fbc | ||
|
187f998b00 | ||
|
7dad0a857d | ||
|
bf5a404e5b | ||
|
307dc6197a | ||
|
868a8c05e8 | ||
|
df37e8bf8f | ||
|
b895c36713 | ||
|
d0f2864c56 | ||
|
c8892db080 | ||
|
dc914fd71a | ||
|
293cbf311d | ||
|
090a19ca59 | ||
|
00a50d6501 | ||
|
562bf9fcb9 | ||
|
8ad5091061 | ||
|
f18d1622a0 | ||
|
e891add10b | ||
|
2021212951 | ||
|
814ab7ec6d | ||
|
68009643bb | ||
|
9291170abe | ||
|
ed61881ea7 | ||
|
15cbc5916e | ||
|
0e28055e56 | ||
|
d3edc80ad6 | ||
|
2689509c1b | ||
|
aa3776fc05 | ||
|
f1bfe9ec2a | ||
|
426f431301 | ||
|
cf20b665a4 | ||
|
0783ef2ad9 | ||
|
7b21874c08 | ||
|
98429fb586 | ||
|
ce802984c0 | ||
|
abba187441 | ||
|
eab7225c23 | ||
|
ba4d1dead0 | ||
|
bbbdbbf479 | ||
|
078e4a8546 | ||
|
690124df27 | ||
|
5d20670749 | ||
|
e89bc70e56 | ||
|
889792e4fa | ||
|
eba638186e | ||
|
808755602f | ||
|
72a65bfa06 | ||
|
37c1fbd5d5 | ||
|
f7ed56c974 | ||
|
19f60e7cf5 | ||
|
333033608c | ||
|
7cea0f8549 | ||
|
817f326783 |
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* @actions/virtual-environments-owners
|
21
.github/workflows/build-go-packages.yml
vendored
21
.github/workflows/build-go-packages.yml
vendored
@@ -10,19 +10,26 @@ on:
|
|||||||
description: 'Whether to publish releases'
|
description: 'Whether to publish releases'
|
||||||
required: true
|
required: true
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- 'versions-manifest.json'
|
||||||
|
- 'LICENSE'
|
||||||
|
- '**.md'
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ github.event.inputs.VERSION }}
|
VERSION: ${{ github.event.inputs.VERSION || '1.15.3' }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_go:
|
build_go:
|
||||||
name: Build Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}]
|
name: Build Go ${{ github.event.inputs.VERSION || '1.15.3' }} [${{ matrix.platform }}]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64
|
ARTIFACT_NAME: go-${{ github.event.inputs.VERSION || '1.15.3' }}-${{ matrix.platform }}-x64
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -44,11 +51,11 @@ jobs:
|
|||||||
path: ${{ runner.temp }}/artifact
|
path: ${{ runner.temp }}/artifact
|
||||||
|
|
||||||
test_go:
|
test_go:
|
||||||
name: Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}]
|
name: Test Go ${{ github.event.inputs.VERSION || '1.15.3' }} [${{ matrix.platform }}]
|
||||||
needs: build_go
|
needs: build_go
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64
|
ARTIFACT_NAME: go-${{ github.event.inputs.VERSION || '1.15.3' }}-${{ matrix.platform }}-x64
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -89,7 +96,7 @@ jobs:
|
|||||||
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
|
||||||
|
|
||||||
- name: Setup Go ${{ env.VERSION }}
|
- name: Setup Go ${{ env.VERSION }}
|
||||||
uses: actions/setup-go@v2.1.1
|
uses: actions/setup-go@v2.1.3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.VERSION }}
|
go-version: ${{ env.VERSION }}
|
||||||
|
|
||||||
@@ -110,7 +117,7 @@ jobs:
|
|||||||
|
|
||||||
publish_release:
|
publish_release:
|
||||||
name: Publish release
|
name: Publish release
|
||||||
if: github.event.inputs.PUBLISH_RELEASES == 'true'
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.PUBLISH_RELEASES == 'true'
|
||||||
needs: test_go
|
needs: test_go
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
97
.github/workflows/get-go-versions.yml
vendored
Normal file
97
.github/workflows/get-go-versions.yml
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
name: Get Go versions
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3,15 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
TOOL_NAME: "Go"
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
find_new_versions:
|
||||||
|
name: Find new versions
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
versions_output: ${{ steps.Get_new_versions.outputs.TOOL_VERSIONS }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- id: Get_new_versions
|
||||||
|
name: Get new versions
|
||||||
|
run: ./helpers/get-new-tool-versions/get-new-tool-versions.ps1 -ToolName ${{ env.TOOL_NAME }}
|
||||||
|
|
||||||
|
check_new_versions:
|
||||||
|
name: Check new versions
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: find_new_versions
|
||||||
|
env:
|
||||||
|
TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Check Versions
|
||||||
|
if: env.TOOL_VERSIONS == ''
|
||||||
|
run: |
|
||||||
|
Write-Host "No new versions were found"
|
||||||
|
Import-Module "./helpers/github/github-api.psm1"
|
||||||
|
$gitHubApi = Get-GitHubApi -RepositoryFullName "$env:GITHUB_REPOSITORY" `
|
||||||
|
-AccessToken "${{ secrets.PERSONAL_TOKEN }}"
|
||||||
|
|
||||||
|
$gitHubApi.CancelWorkflow("$env:GITHUB_RUN_ID")
|
||||||
|
Start-Sleep -Seconds 60
|
||||||
|
|
||||||
|
- name: Send Slack notification
|
||||||
|
run: |
|
||||||
|
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
|
||||||
|
$message = "The following versions of '${{ env.TOOL_NAME }}' are available to upload: ${{ env.TOOL_VERSIONS }}\nLink to the pipeline: $pipelineUrl"
|
||||||
|
./helpers/get-new-tool-versions/send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
|
||||||
|
-ToolName "${{ env.TOOL_NAME }}" `
|
||||||
|
-ImageUrl "https://golang.org/lib/godoc/images/footer-gopher.jpg" `
|
||||||
|
-Text "$message"
|
||||||
|
|
||||||
|
trigger_builds:
|
||||||
|
name: Trigger builds
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [find_new_versions, check_new_versions]
|
||||||
|
env:
|
||||||
|
TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}}
|
||||||
|
environment: Get Available Tools Versions - Publishing Approval
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Trigger "Build go packages" workflow
|
||||||
|
run:
|
||||||
|
./helpers/github/run-ci-builds.ps1 -RepositoryFullName "$env:GITHUB_REPOSITORY" `
|
||||||
|
-AccessToken "${{ secrets.PERSONAL_TOKEN }}" `
|
||||||
|
-WorkflowFileName "build-go-packages.yml" `
|
||||||
|
-WorkflowDispatchRef "main" `
|
||||||
|
-ToolVersions "${{ env.TOOL_VERSIONS }}" `
|
||||||
|
-PublishReleases "true"
|
||||||
|
|
||||||
|
check_build:
|
||||||
|
name: Check build for failures
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [find_new_versions, check_new_versions, trigger_builds]
|
||||||
|
if: failure()
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Send Slack notification if build fails
|
||||||
|
run: |
|
||||||
|
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
|
||||||
|
$message = "The build of the '${{ env.TOOL_NAME }}' detection pipeline failed :progress-error:\nLink to the pipeline: $pipelineUrl"
|
||||||
|
./helpers/get-new-tool-versions/send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
|
||||||
|
-ToolName "${{ env.TOOL_NAME }}" `
|
||||||
|
-Text "$message" `
|
||||||
|
-ImageUrl "https://golang.org/lib/godoc/images/footer-gopher.jpg"
|
48
.github/workflows/validate-manifest.yml
vendored
Normal file
48
.github/workflows/validate-manifest.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
name: Validate manifest
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 8,20 * * *'
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'versions-manifest.json'
|
||||||
|
|
||||||
|
env:
|
||||||
|
TOOL_NAME: "Go"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Validate python-versions manifest
|
||||||
|
run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestPath '.\versions-manifest.json'
|
||||||
|
|
||||||
|
check_build:
|
||||||
|
name: Check validation for failures
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [validation]
|
||||||
|
if: failure()
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Send Slack notification if validation fails
|
||||||
|
run: |
|
||||||
|
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
|
||||||
|
$message = "The validation of go-versions manifest failed. \nLink to the pipeline: $pipelineUrl"
|
||||||
|
.\helpers\get-new-tool-versions\send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
|
||||||
|
-ToolName "${{ env.TOOL_NAME }}" `
|
||||||
|
-Text "$message" `
|
||||||
|
-ImageUrl "https://golang.org/lib/godoc/images/footer-gopher.jpg"
|
@@ -1,5 +1,5 @@
|
|||||||
using module "./builders/win-go-builder.psm1"
|
using module "./win-go-builder.psm1"
|
||||||
using module "./builders/nix-go-builder.psm1"
|
using module "./nix-go-builder.psm1"
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
using module "./builders/go-builder.psm1"
|
using module "./go-builder.psm1"
|
||||||
|
|
||||||
class NixGoBuilder : GoBuilder {
|
class NixGoBuilder : GoBuilder {
|
||||||
<#
|
<#
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
using module "./builders/go-builder.psm1"
|
using module "./go-builder.psm1"
|
||||||
|
|
||||||
class WinGoBuilder : GoBuilder {
|
class WinGoBuilder : GoBuilder {
|
||||||
<#
|
<#
|
||||||
|
2
helpers
2
helpers
Submodule helpers updated: 3b38e3de4c...6f1aa3ce73
@@ -57,7 +57,9 @@ Describe "Go" {
|
|||||||
Set-Location -Path $simpleLocation
|
Set-Location -Path $simpleLocation
|
||||||
"go run simple.go" | Should -ReturnZeroExitCode
|
"go run simple.go" | Should -ReturnZeroExitCode
|
||||||
"go build simple.go" | Should -ReturnZeroExitCode
|
"go build simple.go" | Should -ReturnZeroExitCode
|
||||||
"./simple" | Should -ReturnZeroExitCode
|
$compiledPackageName = "simple"
|
||||||
|
if ($IsWindows) { $compiledPackageName += ".exe" }
|
||||||
|
(Resolve-Path "./$compiledPackageName").Path | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Run maps code" {
|
It "Run maps code" {
|
||||||
@@ -65,7 +67,9 @@ Describe "Go" {
|
|||||||
Set-Location -Path $mapsLocation
|
Set-Location -Path $mapsLocation
|
||||||
"go run maps.go" | Should -ReturnZeroExitCode
|
"go run maps.go" | Should -ReturnZeroExitCode
|
||||||
"go build maps.go" | Should -ReturnZeroExitCode
|
"go build maps.go" | Should -ReturnZeroExitCode
|
||||||
"./maps" | Should -ReturnZeroExitCode
|
$compiledPackageName = "maps"
|
||||||
|
if ($IsWindows) { $compiledPackageName += ".exe" }
|
||||||
|
(Resolve-Path "./$compiledPackageName").Path | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Run methods code" {
|
It "Run methods code" {
|
||||||
@@ -73,6 +77,8 @@ Describe "Go" {
|
|||||||
Set-Location -Path $methodsLocation
|
Set-Location -Path $methodsLocation
|
||||||
"go run methods.go" | Should -ReturnZeroExitCode
|
"go run methods.go" | Should -ReturnZeroExitCode
|
||||||
"go build methods.go" | Should -ReturnZeroExitCode
|
"go build methods.go" | Should -ReturnZeroExitCode
|
||||||
"./methods" | Should -ReturnZeroExitCode
|
$compiledPackageName = "methods"
|
||||||
|
if ($IsWindows) { $compiledPackageName += ".exe" }
|
||||||
|
(Resolve-Path "./$compiledPackageName").Path | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user