parallel sdk builds
This commit is contained in:
9
.github/actions/setup-tools/action.yml
vendored
9
.github/actions/setup-tools/action.yml
vendored
@@ -4,6 +4,11 @@ description: Installs all tools necessary for building and testing the project.
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- name: Collect workflow stats
|
||||||
|
uses: catchpoint/workflow-telemetry-action@v2
|
||||||
|
with:
|
||||||
|
comment_on_pr: false
|
||||||
|
|
||||||
- name: Setup mise
|
- name: Setup mise
|
||||||
uses: jdx/mise-action@v2
|
uses: jdx/mise-action@v2
|
||||||
|
|
||||||
@@ -11,8 +16,8 @@ runs:
|
|||||||
id: go-cache-paths
|
id: go-cache-paths
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=go-build::$(go env GOCACHE)"
|
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Go build cache
|
- name: Go build cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
|||||||
68
.github/workflows/run-acceptance-tests.yml
vendored
68
.github/workflows/run-acceptance-tests.yml
vendored
@@ -63,6 +63,8 @@ jobs:
|
|||||||
body: "Please view the PR build: ${{ steps.vars.outputs.run-url }}"
|
body: "Please view the PR build: ${{ steps.vars.outputs.run-url }}"
|
||||||
if: github.event_name == 'repository_dispatch'
|
if: github.event_name == 'repository_dispatch'
|
||||||
prerequisites:
|
prerequisites:
|
||||||
|
if: github.event_name == 'repository_dispatch' ||
|
||||||
|
github.event.pull_request.head.repo.full_name == github.repository
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: prerequisites
|
name: prerequisites
|
||||||
steps:
|
steps:
|
||||||
@@ -143,50 +145,9 @@ jobs:
|
|||||||
author_name: Failure in building provider prerequisites
|
author_name: Failure in building provider prerequisites
|
||||||
fields: repo,commit,author,action
|
fields: repo,commit,author,action
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
if: github.event_name == 'repository_dispatch' ||
|
|
||||||
github.event.pull_request.head.repo.full_name == github.repository
|
- name: Generate & Build SDK
|
||||||
build_sdks:
|
run: mise run sdk
|
||||||
needs: prerequisites
|
|
||||||
runs-on: pulumi-ubuntu-8core
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
language:
|
|
||||||
- nodejs
|
|
||||||
- python
|
|
||||||
- dotnet
|
|
||||||
- go
|
|
||||||
- java
|
|
||||||
name: build_sdks
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
ref: ${{ env.PR_COMMIT_SHA }}
|
|
||||||
- name: Setup tools
|
|
||||||
uses: ./.github/actions/setup-tools
|
|
||||||
- id: version
|
|
||||||
name: Set Provider Version
|
|
||||||
uses: pulumi/provider-version-action@v1
|
|
||||||
with:
|
|
||||||
set-env: PROVIDER_VERSION
|
|
||||||
- name: Download provider + tfgen binaries
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: pulumi-${{ env.PROVIDER }}-provider.tar.gz
|
|
||||||
path: ${{ github.workspace }}/bin
|
|
||||||
- name: UnTar provider binaries
|
|
||||||
run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
|
|
||||||
github.workspace}}/bin
|
|
||||||
- name: Restore Binary Permissions
|
|
||||||
run:
|
|
||||||
find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print
|
|
||||||
-exec chmod +x {} \;
|
|
||||||
- name: Generate SDK
|
|
||||||
run: make generate_${{ matrix.language }}
|
|
||||||
- name: Build SDK
|
|
||||||
run: make build_${{ matrix.language }}
|
|
||||||
- name: Check worktree clean
|
- name: Check worktree clean
|
||||||
uses: pulumi/git-status-check-action@v1
|
uses: pulumi/git-status-check-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -198,12 +159,12 @@ jobs:
|
|||||||
sdk/python/pyproject.toml
|
sdk/python/pyproject.toml
|
||||||
- run: git status --porcelain
|
- run: git status --porcelain
|
||||||
- name: Tar SDK folder
|
- name: Tar SDK folder
|
||||||
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} .
|
run: tar -zcf sdk.tar.gz -C sdk .
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.language }}-sdk.tar.gz
|
name: sdk.tar.gz
|
||||||
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz
|
path: ${{ github.workspace}}/sdk.tar.gz
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
- if: failure() && github.event_name == 'push'
|
- if: failure() && github.event_name == 'push'
|
||||||
name: Notify Slack
|
name: Notify Slack
|
||||||
@@ -212,12 +173,11 @@ jobs:
|
|||||||
author_name: Failure while building SDKs
|
author_name: Failure while building SDKs
|
||||||
fields: repo,commit,author,action
|
fields: repo,commit,author,action
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
if: github.event_name == 'repository_dispatch' ||
|
|
||||||
github.event.pull_request.head.repo.full_name == github.repository
|
|
||||||
test:
|
test:
|
||||||
runs-on: pulumi-ubuntu-8core
|
runs-on: pulumi-ubuntu-8core
|
||||||
needs:
|
needs:
|
||||||
- build_sdks
|
- prerequisites
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@@ -259,12 +219,10 @@ jobs:
|
|||||||
- name: Download SDK
|
- name: Download SDK
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.language }}-sdk.tar.gz
|
name: sdk.tar.gz
|
||||||
path: ${{ github.workspace}}/sdk/
|
path: ${{ github.workspace}}
|
||||||
- name: UnTar SDK folder
|
- name: UnTar SDK folder
|
||||||
run:
|
run: tar -zxf ${{ github.workspace}}/sdk.tar.gz -C ${{github.workspace}}/sdk
|
||||||
tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{
|
|
||||||
github.workspace}}/sdk/${{ matrix.language}}
|
|
||||||
- name: Update path
|
- name: Update path
|
||||||
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
run: echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -19,3 +19,7 @@ sdk/dotnet/version.txt
|
|||||||
sdk/java/.gradle
|
sdk/java/.gradle
|
||||||
sdk/java/build/
|
sdk/java/build/
|
||||||
sdk/java/build.gradle
|
sdk/java/build.gradle
|
||||||
|
|
||||||
|
# Allow local mise overrides.
|
||||||
|
.mise.*.local.toml
|
||||||
|
.mise.local.toml
|
||||||
|
|||||||
79
.mise.toml
79
.mise.toml
@@ -1,12 +1,89 @@
|
|||||||
|
[tasks.provider]
|
||||||
|
run = "make provider"
|
||||||
|
sources = ["provider/**/*.go", "go.mod"]
|
||||||
|
outputs = ["bin/pulumi-resource-docker-build"]
|
||||||
|
|
||||||
|
# Generate
|
||||||
|
|
||||||
|
[tasks."generate:nodejs"]
|
||||||
|
depends = ["provider"]
|
||||||
|
run = "make generate_nodejs"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["sdk/nodejs/**/*.ts"]
|
||||||
|
|
||||||
|
[tasks."generate:python"]
|
||||||
|
run = "make generate_python"
|
||||||
|
depends = ["provider"]
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["sdk/python/**/*.py"]
|
||||||
|
|
||||||
|
[tasks."generate:dotnet"]
|
||||||
|
depends = ["provider"]
|
||||||
|
run = "make generate_dotnet"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["sdk/dotnet/**/*.cs"]
|
||||||
|
|
||||||
|
[tasks."generate:go"]
|
||||||
|
depends = ["provider"]
|
||||||
|
run = "make generate_go"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["sdk/go/**/*.go"]
|
||||||
|
|
||||||
|
[tasks."generate:java"]
|
||||||
|
depends = ["provider"]
|
||||||
|
run = "make generate_java"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["sdk/java/**/*.java"]
|
||||||
|
|
||||||
|
# Build
|
||||||
|
|
||||||
|
[tasks."build:nodejs"]
|
||||||
|
depends = ["generate:nodejs"]
|
||||||
|
run = "make build_nodejs"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["*"]
|
||||||
|
|
||||||
|
[tasks."build:python"]
|
||||||
|
depends = ["generate:python"]
|
||||||
|
run = "make build_python"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["*"]
|
||||||
|
|
||||||
|
[tasks."build:dotnet"]
|
||||||
|
depends = ["generate:dotnet"]
|
||||||
|
run = "make build_dotnet"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["*"]
|
||||||
|
|
||||||
|
[tasks."build:go"]
|
||||||
|
depends = ["generate:go"]
|
||||||
|
run = "make build_go"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["*"]
|
||||||
|
|
||||||
|
[tasks."build:java"]
|
||||||
|
depends = ["generate:java"]
|
||||||
|
run = "make build_java"
|
||||||
|
sources = ["bin/pulumi-resource-docker-build"]
|
||||||
|
outputs = ["*"]
|
||||||
|
|
||||||
|
[tasks.sdk]
|
||||||
|
depends = ["generate:*", "build:*"]
|
||||||
|
|
||||||
|
|
||||||
[tools]
|
[tools]
|
||||||
|
# Development tooling.
|
||||||
go = "latest" # Will read version from go.mod.
|
go = "latest" # Will read version from go.mod.
|
||||||
|
lefthook = "1.7.12"
|
||||||
|
golangci-lint = "1.58.1"
|
||||||
|
|
||||||
|
# Build and test tools.
|
||||||
pulumi = "3.128.0"
|
pulumi = "3.128.0"
|
||||||
node = "22"
|
node = "22"
|
||||||
dotnet = "6"
|
dotnet = "6"
|
||||||
python = "3.11.9"
|
python = "3.11.9"
|
||||||
java = "temurin-11"
|
java = "temurin-11"
|
||||||
gradle = "7.6"
|
gradle = "7.6"
|
||||||
golangci-lint = "1.58.1"
|
|
||||||
"go:github.com/pulumi/schema-tools" = "v0.6.0"
|
"go:github.com/pulumi/schema-tools" = "v0.6.0"
|
||||||
"go:github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt" = "v2.5.0"
|
"go:github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt" = "v2.5.0"
|
||||||
"go:github.com/pulumi/pulumictl/cmd/pulumictl" = "a1b89aaf4299fe5bc78e140fc60eba79088b3dc5" # blampe/replace branch doesn't work?
|
"go:github.com/pulumi/pulumictl/cmd/pulumictl" = "a1b89aaf4299fe5bc78e140fc60eba79088b3dc5" # blampe/replace branch doesn't work?
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -180,7 +180,7 @@ bin/${PROVIDER}: $(shell find ./provider -name '*.go') go.mod
|
|||||||
bin/pulumi-gen-${PACK}: # Required by CI
|
bin/pulumi-gen-${PACK}: # Required by CI
|
||||||
touch bin/pulumi-gen-${PACK}
|
touch bin/pulumi-gen-${PACK}
|
||||||
|
|
||||||
go.mod: $(shell find . -name '*.go')
|
go.mod: $(shell find provider -name '*.go')
|
||||||
go.sum: go.mod
|
go.sum: go.mod
|
||||||
|
|
||||||
sdk: $(shell mkdir -p sdk)
|
sdk: $(shell mkdir -p sdk)
|
||||||
|
|||||||
Reference in New Issue
Block a user