Skip to content
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

Fix asset rebuilds & dependencies #1157

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ jobs:
merge-multiple: true
path: provider/cmd/pulumi-resource-#{{ .Config.Provider }}#/schema-embed.json
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ jobs:
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -73,9 +70,3 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: #{{ .Config.ActionVersions.UploadArtifact }}#
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ jobs:
schema-tools compare -r github://api.github.com/#{{ .Config.Organization }}# -p #{{ .Config.Provider }}# -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-#{{ .Config.Provider }}#/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- name: Save makefile progress
uses: #{{ .Config.ActionVersions.UploadArtifact }}#
with:
name: prerequisites.make
path: .make
include-hidden-files: true
- if: inputs.is_pr && inputs.is_automated == false
name: Comment on PR with Details of Schema Check
uses: #{{ .Config.ActionVersions.PrComment }}#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: #{{ .Config.ActionVersions.DownloadArtifact }}#
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
4 changes: 2 additions & 2 deletions provider-ci/internal/pkg/templates/bridged-provider/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ tfgen_no_deps: .make/schema
.make/schema: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
.make/schema: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT)
.make/schema: export PULUMI_MISSING_DOCS_ERROR := $(PULUMI_MISSING_DOCS_ERROR)
.make/schema: bin/$(TFGEN) provider/resources.go provider/go.mod .make/install_plugins .make/upstream
.make/schema: bin/$(TFGEN) .make/install_plugins .make/upstream
$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION_GENERIC) go generate cmd/$(PROVIDER)/main.go)
@touch $@
tfgen_build_only: bin/$(TFGEN)
bin/$(TFGEN):
bin/$(TFGEN): provider/*.go provider/go.* .make/upstream
(cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "$(LDFLAGS_PROJ_VERSION) $(LDFLAGS_EXTRAS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN))
.PHONY: tfgen schema tfgen_no_deps tfgen_build_only

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ jobs:
merge-multiple: true
path: provider/cmd/pulumi-resource-acme/schema-embed.json
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
Comment on lines -51 to -54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fewer dependent GitHub actions is always a good thing!

run: make --touch provider schema
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
Expand Down
11 changes: 1 addition & 10 deletions provider-ci/test-providers/acme/.github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ jobs:
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -79,9 +76,3 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
5 changes: 1 addition & 4 deletions provider-ci/test-providers/acme/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ jobs:
schema-tools compare -r github://api.github.com/pulumiverse -p acme -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-acme/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: prerequisites.make
path: .make
include-hidden-files: true
- if: inputs.is_pr && inputs.is_automated == false
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
4 changes: 2 additions & 2 deletions provider-ci/test-providers/acme/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ tfgen_no_deps: .make/schema
.make/schema: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
.make/schema: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT)
.make/schema: export PULUMI_MISSING_DOCS_ERROR := $(PULUMI_MISSING_DOCS_ERROR)
.make/schema: bin/$(TFGEN) provider/resources.go provider/go.mod .make/install_plugins .make/upstream
.make/schema: bin/$(TFGEN) .make/install_plugins .make/upstream
$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION_GENERIC) go generate cmd/$(PROVIDER)/main.go)
@touch $@
tfgen_build_only: bin/$(TFGEN)
bin/$(TFGEN):
bin/$(TFGEN): provider/*.go provider/go.* .make/upstream
(cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "$(LDFLAGS_PROJ_VERSION) $(LDFLAGS_EXTRAS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN))
.PHONY: tfgen schema tfgen_no_deps tfgen_build_only

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ jobs:
merge-multiple: true
path: provider/cmd/pulumi-resource-aws/schema-embed.json
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
Expand Down
11 changes: 1 addition & 10 deletions provider-ci/test-providers/aws/.github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ jobs:
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -91,9 +88,3 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
5 changes: 1 addition & 4 deletions provider-ci/test-providers/aws/.github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ jobs:
schema-tools compare -r github://api.github.com/pulumi -p aws -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-aws/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: prerequisites.make
path: .make
include-hidden-files: true
- if: inputs.is_pr && inputs.is_automated == false
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
5 changes: 1 addition & 4 deletions provider-ci/test-providers/aws/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
4 changes: 2 additions & 2 deletions provider-ci/test-providers/aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ tfgen_no_deps: .make/schema
.make/schema: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
.make/schema: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT)
.make/schema: export PULUMI_MISSING_DOCS_ERROR := $(PULUMI_MISSING_DOCS_ERROR)
.make/schema: bin/$(TFGEN) provider/resources.go provider/go.mod .make/install_plugins .make/upstream
.make/schema: bin/$(TFGEN) .make/install_plugins .make/upstream
$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
(cd provider && VERSION=$(VERSION_GENERIC) go generate cmd/$(PROVIDER)/main.go)
@touch $@
tfgen_build_only: bin/$(TFGEN)
bin/$(TFGEN):
bin/$(TFGEN): provider/*.go provider/go.* .make/upstream
(cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "$(LDFLAGS_PROJ_VERSION) $(LDFLAGS_EXTRAS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN))
.PHONY: tfgen schema tfgen_no_deps tfgen_build_only

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ jobs:
merge-multiple: true
path: provider/cmd/pulumi-resource-cloudflare/schema-embed.json
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ jobs:
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -82,9 +79,3 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Loading
Loading